diff --git a/common/activities/activity_types/ecumenical_council.txt b/common/activities/activity_types/ecumenical_council.txt index 08aa67423..44cc84d69 100644 --- a/common/activities/activity_types/ecumenical_council.txt +++ b/common/activities/activity_types/ecumenical_council.txt @@ -893,9 +893,12 @@ is_healthy = yes in_diplomatic_range = scope:host # Specific Checks - NOT = { government_has_flag = government_is_republic } - NOT = { government_has_flag = government_is_landless_adventurer } - NOT = { government_has_flag = government_is_mercenary } + NOR = { + government_has_flag = government_is_republic + government_has_flag = government_is_merchant + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_mercenary + } OR = { is_clergy = yes # You must be a king+ @@ -1435,20 +1438,9 @@ scope:activity ?= { has_current_phase = ecumenical_council_phase_summons activity_location = { - religion = religion:christianity_religion OR = { - geographical_region = graphical_mena - geographical_region = graphical_india - geographical_region = world_europe_south_east - geographical_region = world_asia_minor - rite = { - rite_has_doctrine = special_doctrine_is_eastern_christian_faith - } - } - NOT = { - rite = { - rite_has_doctrine = special_doctrine_is_western_christian_faith - } + religion = religion:eastern_orthodox_religion + religion = religion:oriental_orthodox_religion } } } diff --git a/common/artifacts/features/00_features.txt b/common/artifacts/features/00_features.txt index 1192ce9a7..1074d063a 100644 --- a/common/artifacts/features/00_features.txt +++ b/common/artifacts/features/00_features.txt @@ -5342,7 +5342,7 @@ has_artifact_feature = book_subject_stewardship trigger_if = { limit = { exists = scope:owner.var:book_topic_category } - scope:owner.var:book_topic_category = flag:stewardship_development + scope:owner.var:book_topic_category = flag:stewardship_prosperity } trigger_if = { # If the topic has been pre-saved from events etc. we make sure it's picked limit = { exists = scope:owner.var:book_artifact_topic } @@ -5395,7 +5395,7 @@ has_artifact_feature = book_subject_stewardship trigger_if = { limit = { exists = scope:owner.var:book_topic_category } - scope:owner.var:book_topic_category = flag:stewardship_development + scope:owner.var:book_topic_category = flag:stewardship_prosperity } trigger_if = { # If the topic has been pre-saved from events etc. we make sure it's picked limit = { exists = scope:owner.var:book_artifact_topic } @@ -5432,7 +5432,7 @@ has_artifact_feature = book_subject_stewardship trigger_if = { limit = { exists = scope:owner.var:book_topic_category } - scope:owner.var:book_topic_category = flag:stewardship_development + scope:owner.var:book_topic_category = flag:stewardship_prosperity } trigger_if = { # If the topic has been pre-saved from events etc. we make sure it's picked limit = { exists = scope:owner.var:book_artifact_topic } @@ -6386,7 +6386,10 @@ NOT = { exists = scope:owner.var:book_topic_category } trigger_if = { # If the topic has been pre-saved from events etc. we make sure it's picked limit = { exists = scope:owner.var:book_artifact_topic } - scope:owner.var:book_artifact_topic = flag:the_great_book_of_mercy + OR = { + scope:owner.var:book_artifact_topic = flag:the_great_book_of_mercy + scope:owner.var:book_artifact_topic = flag:artifact_book_topic_alchemy + } } } weight = { @@ -6413,7 +6416,10 @@ NOT = { exists = scope:owner.var:book_topic_category } trigger_if = { # If the topic has been pre-saved from events etc. we make sure it's picked limit = { exists = scope:owner.var:book_artifact_topic } - scope:owner.var:book_artifact_topic = flag:the_book_of_seventy + OR = { + scope:owner.var:book_artifact_topic = flag:the_book_of_seventy + scope:owner.var:book_artifact_topic = flag:artifact_book_topic_alchemy + } } } weight = { @@ -6443,7 +6449,10 @@ } trigger_if = { # If the topic has been pre-saved from events etc. we make sure it's picked limit = { exists = scope:owner.var:book_artifact_topic } - scope:owner.var:book_artifact_topic = flag:mercury + OR = { + scope:owner.var:book_artifact_topic = flag:mercury + scope:owner.var:book_artifact_topic = flag:artifact_book_topic_alchemy + } } } weight = 1 @@ -6459,7 +6468,10 @@ } trigger_if = { # If the topic has been pre-saved from events etc. we make sure it's picked limit = { exists = scope:owner.var:book_artifact_topic } - scope:owner.var:book_artifact_topic = flag:arsenic + OR = { + scope:owner.var:book_artifact_topic = flag:arsenic + scope:owner.var:book_artifact_topic = flag:artifact_book_topic_alchemy + } } } weight = 1 @@ -6475,7 +6487,10 @@ } trigger_if = { # If the topic has been pre-saved from events etc. we make sure it's picked limit = { exists = scope:owner.var:book_artifact_topic } - scope:owner.var:book_artifact_topic = flag:gold + OR = { + scope:owner.var:book_artifact_topic = flag:gold + scope:owner.var:book_artifact_topic = flag:artifact_book_topic_alchemy + } } } weight = 1 @@ -6491,7 +6506,10 @@ } trigger_if = { # If the topic has been pre-saved from events etc. we make sure it's picked limit = { exists = scope:owner.var:book_artifact_topic } - scope:owner.var:book_artifact_topic = flag:silver + OR = { + scope:owner.var:book_artifact_topic = flag:silver + scope:owner.var:book_artifact_topic = flag:artifact_book_topic_alchemy + } } } weight = 1 diff --git a/common/artifacts/types/00_types.txt b/common/artifacts/types/00_types.txt index 0380b3ee8..7c4aab8e4 100644 --- a/common/artifacts/types/00_types.txt +++ b/common/artifacts/types/00_types.txt @@ -408,6 +408,11 @@ chronicle = { optional_features = { book_topic book_title book_decoration decoration_pattern generic_material_wood decoration_material_gem decoration_material_inlay_HSB } } +library_item = { + slot = library + optional_features = { book_topic book_title book_decoration decoration_pattern generic_material_wood decoration_material_gem decoration_material_inlay_HSB } +} + # Alchemy elixir = { slot = pedestal diff --git a/common/artifacts/visuals/00_court_artifacts.txt b/common/artifacts/visuals/00_court_artifacts.txt index ba9f17342..e978e983c 100644 --- a/common/artifacts/visuals/00_court_artifacts.txt +++ b/common/artifacts/visuals/00_court_artifacts.txt @@ -476,6 +476,14 @@ tapestry = { small_animal_hide = { default_type = wall_small icon = "artifact_animal_hide.dds" + asset = { + trigger = { scope:artifact = { var:animal_type ?= flag:caracal } } + reference = ep1_generic_animal_hide_small_01_a_entity + } + asset = { + trigger = { scope:artifact = { var:animal_type ?= flag:lynx } } + reference = ep1_generic_animal_hide_medium_02_b_entity + } asset = { #tan trigger = { scope:artifact = { @@ -557,6 +565,50 @@ small_animal_hide = { large_animal_hide = { default_type = wall_big icon = "artifact_animal_hide.dds" + asset = { + trigger = { scope:artifact = { var:animal_type ?= flag:tiger } } + reference = ep1_generic_animal_hide_big_01_a_entity + } + asset = { + trigger = { scope:artifact = { var:animal_type ?= flag:lion } } + reference = ep2_generic_animal_hide_medium_01_white_stag_entity + } + asset = { + trigger = { + scope:artifact = { var:animal_type ?= flag:leopard } + location = { + OR = { + geographical_region = world_tibet + geographical_region = world_steppe_tarim + geographical_region = world_steppe_central + geographical_region = world_steppe_east + } + } + } + reference = ep1_generic_animal_hide_big_02_a_entity + } + asset = { + trigger = { + scope:artifact = { var:animal_type ?= flag:leopard } + location = { + NOR = { + geographical_region = world_tibet + geographical_region = world_steppe_tarim + geographical_region = world_steppe_central + geographical_region = world_steppe_east + } + } + } + reference = ep2_generic_animal_hide_medium_01_white_stag_entity + } + asset = { + trigger = { scope:artifact = { var:animal_type ?= flag:bear } } + reference = ep1_generic_animal_hide_big_02_a_entity + } + asset = { + trigger = { scope:artifact = { var:animal_type ?= flag:elephant } } + reference = ep1_generic_animal_hide_big_01_b_entity + } # TIGER asset = { #striped @@ -1387,6 +1439,10 @@ wall_shield_medi = { animal_trophy = { icon = "artifact_animal_trophy.dds" default_type = wall_small + asset = { + trigger = { scope:artifact = { var:animal_type ?= flag:monkey } } + reference = ep1_generic_trophy_boar_01_a_entity + } asset = { trigger = { scope:artifact = { has_artifact_feature = animal_skull_type_rabbit } } reference = ep1_generic_trophy_rabbit_01_a_entity @@ -1787,6 +1843,24 @@ pouch = { } reference = ep1_indian_pouch_basic_01_a_entity } + asset = { + trigger = { + NOR = { + artifact_should_use_gfx_type_trigger = { TYPE = indian_building } + artifact_should_use_gfx_type_trigger = { TYPE = southeast_asian_building } + artifact_should_use_gfx_type_trigger = { TYPE = western_building } + artifact_should_use_gfx_type_trigger = { TYPE = norse_building } + artifact_should_use_gfx_type_trigger = { TYPE = mena_building } + artifact_should_use_gfx_type_trigger = { TYPE = iranian_building } + artifact_should_use_gfx_type_trigger = { TYPE = steppe_building } + artifact_should_use_gfx_type_trigger = { TYPE = mediterranean_building } + artifact_should_use_gfx_type_trigger = { TYPE = iberian_building } + artifact_should_use_gfx_type_trigger = { TYPE = chinese_building } + artifact_should_use_gfx_type_trigger = { TYPE = japanese_building } + } + } + reference = ep1_western_pouch_basic_01_a_entity + } } urn = { @@ -2032,6 +2106,22 @@ book = { } reference = tgp_chinese_book_01_a_entity } + asset = { + trigger = { + NOR = { + artifact_should_use_gfx_type_trigger = { TYPE = chinese_building } + artifact_should_use_gfx_type_trigger = { TYPE = japanese_building } + artifact_should_use_gfx_type_trigger = { TYPE = mediterranean_building } + artifact_should_use_gfx_type_trigger = { TYPE = iberian_building } + artifact_should_use_gfx_type_trigger = { TYPE = mena_building } + artifact_should_use_gfx_type_trigger = { TYPE = iranian_building } + artifact_should_use_gfx_type_trigger = { TYPE = steppe_building } + artifact_should_use_gfx_type_trigger = { TYPE = western_building } + artifact_should_use_gfx_type_trigger = { TYPE = norse_building } + } + } + reference = ep1_western_book_big_01_a_entity + } } reliquary = { diff --git a/common/artifacts/visuals/00_personal_misc.txt b/common/artifacts/visuals/00_personal_misc.txt index aa9a393a9..4a35dea5f 100644 --- a/common/artifacts/visuals/00_personal_misc.txt +++ b/common/artifacts/visuals/00_personal_misc.txt @@ -890,6 +890,23 @@ pelt = { } reference = tgp_box_medium_01_a_entity } + asset = { + trigger = { + NOR = { + artifact_should_use_gfx_type_trigger = { TYPE = indian_building } + artifact_should_use_gfx_type_trigger = { TYPE = southeast_asian_building } + artifact_should_use_gfx_type_trigger = { TYPE = iberian_building } + artifact_should_use_gfx_type_trigger = { TYPE = mediterranean_building } + artifact_should_use_gfx_type_trigger = { TYPE = mena_building } + artifact_should_use_gfx_type_trigger = { TYPE = steppe_building } + artifact_should_use_gfx_type_trigger = { TYPE = western_building } + artifact_should_use_gfx_type_trigger = { TYPE = norse_building } + artifact_should_use_gfx_type_trigger = { TYPE = chinese_building } + artifact_should_use_gfx_type_trigger = { TYPE = japanese_building } + } + } + reference = ep1_western_box_medium_basic_01_a_entity + } } bone = { @@ -998,6 +1015,23 @@ fabric_roll = { } reference = tgp_box_medium_01_a_entity } + asset = { + trigger = { + NOR = { + artifact_should_use_gfx_type_trigger = { TYPE = indian_building } + artifact_should_use_gfx_type_trigger = { TYPE = southeast_asian_building } + artifact_should_use_gfx_type_trigger = { TYPE = mediterranean_building } + artifact_should_use_gfx_type_trigger = { TYPE = iberian_building } + artifact_should_use_gfx_type_trigger = { TYPE = mena_building } + artifact_should_use_gfx_type_trigger = { TYPE = steppe_building } + artifact_should_use_gfx_type_trigger = { TYPE = western_building } + artifact_should_use_gfx_type_trigger = { TYPE = norse_building } + artifact_should_use_gfx_type_trigger = { TYPE = chinese_building } + artifact_should_use_gfx_type_trigger = { TYPE = japanese_building } + } + } + reference = ep1_western_box_medium_basic_01_a_entity + } } pocket_figurine = { @@ -1103,6 +1137,24 @@ artifact_scroll = { } reference = tgp_scroll_01_entity } + asset = { + trigger = { + NOR = { + artifact_should_use_gfx_type_trigger = { TYPE = indian_building } + artifact_should_use_gfx_type_trigger = { TYPE = southeast_asian_building } + artifact_should_use_gfx_type_trigger = { TYPE = chinese_building } + artifact_should_use_gfx_type_trigger = { TYPE = western_building } + artifact_should_use_gfx_type_trigger = { TYPE = norse_building } + artifact_should_use_gfx_type_trigger = { TYPE = mena_building } + artifact_should_use_gfx_type_trigger = { TYPE = iranian_building } + artifact_should_use_gfx_type_trigger = { TYPE = steppe_building } + artifact_should_use_gfx_type_trigger = { TYPE = mediterranean_building } + artifact_should_use_gfx_type_trigger = { TYPE = iberian_building } + artifact_should_use_gfx_type_trigger = { TYPE = japanese_building } + } + } + reference = ep1_western_scroll_01_a_entity + } } ryukyuan_regalia = { diff --git a/common/buildings/00_duchy_capital_buildings.txt b/common/buildings/00_duchy_capital_buildings.txt index 05c8ec372..774f60acf 100644 --- a/common/buildings/00_duchy_capital_buildings.txt +++ b/common/buildings/00_duchy_capital_buildings.txt @@ -4691,6 +4691,2246 @@ edenic_garden_03 = { rite_has_parameter = can_build_edenic_garden } } + ai_popular_opinion_need_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 1 } + } +} + +#################### +# Mustering Camp # +#################### + +military_duchy_building_01 = { + construction_time = district_tier_1_construction_time + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + culture = { has_innovation = innovation_burhs } + } + + show_disabled = yes + + cost_gold = district_tier_1_cost + + province_modifier = { + building_slots_for_host_district = 1 + } + duchy_capital_county_modifier = { + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_1 + levy_size = 0.05 + additional_fort_level = 1 + military_district_district_build_speed = -0.05 + walls_district_district_build_speed = -0.05 + border_forts_district_district_build_speed = -0.05 + } + + next_building = military_duchy_building_02 + + type_icon = "district_buildings/mustering_grounds_district.dds" + + flag = duchy_building + + ai_value = { + base = 10 + directive_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_new_district_modifier = yes + } +} + +military_duchy_building_02 = { + construction_time = district_tier_2_construction_time + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + culture = { has_innovation = innovation_castle_baileys } + holding_district_level_2_trigger = yes + } + + show_disabled = yes + + cost_gold = district_tier_2_cost + + province_modifier = { + building_slots_for_host_district = 2 + } + duchy_capital_county_modifier = { + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_2 + levy_size = 0.1 + additional_fort_level = 2 + military_district_district_build_speed = -0.1 + walls_district_district_build_speed = -0.1 + border_forts_district_district_build_speed = -0.1 + } + + next_building = military_duchy_building_03 + + flag = duchy_building + + ai_value = { + base = 10 + directive_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_upgrade_modifier = { LEVEL = 2 } + } +} + +military_duchy_building_03 = { + construction_time = district_tier_3_construction_time + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + culture = { has_innovation = innovation_castle_baileys } + holding_district_level_3_trigger = yes + } + + show_disabled = yes + + cost_gold = district_tier_3_cost + + province_modifier = { + building_slots_for_host_district = 3 + } + duchy_capital_county_modifier = { + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_3 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_3 + levy_size = 0.15 + additional_fort_level = 3 + military_district_district_build_speed = -0.15 + walls_district_district_build_speed = -0.15 + border_forts_district_district_build_speed = -0.15 + } + + next_building = military_duchy_building_04 + + flag = duchy_building + + ai_value = { + base = 10 + directive_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_upgrade_modifier = { LEVEL = 3 } + } +} + +military_duchy_building_04 = { + construction_time = district_tier_4_construction_time + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + culture = { has_innovation = innovation_royal_armory } + holding_district_level_4_trigger = yes + } + + show_disabled = yes + + cost_gold = district_tier_4_cost + + province_modifier = { + building_slots_for_host_district = 4 + } + duchy_capital_county_modifier = { + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_4 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_4 + levy_size = 0.2 + additional_fort_level = 4 + military_district_district_build_speed = -0.2 + walls_district_district_build_speed = -0.2 + border_forts_district_district_build_speed = -0.2 + } + + flag = duchy_building + flag = fully_upgraded_duchy_capital_building + + ai_value = { + base = 10 + directive_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_upgrade_modifier = { LEVEL = 4 } + } +} + +################### +# Archery Grounds # +################### + +archery_ranges_01 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_3_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.06 + stationed_maa_maintenance_high_modifier = -0.06 + stationed_archers_damage_mult = duchy_very_high_maa_damage_tier_1 + stationed_archers_toughness_mult = duchy_low_maa_toughness_tier_1 + stationed_skirmishers_screen_mult = duchy_high_maa_screen_tier_1 + stationed_skirmishers_damage_mult = duchy_very_high_maa_damage_tier_1 + stationed_skirmishers_toughness_mult = duchy_high_maa_toughness_tier_1 + stationed_skirmishers_pursuit_mult = duchy_high_maa_pursuit_tier_1 + stationed_archer_cavalry_screen_mult = duchy_high_maa_screen_tier_1 + stationed_archer_cavalry_damage_mult = duchy_high_maa_damage_tier_1 + stationed_archer_cavalry_toughness_mult = duchy_low_maa_toughness_tier_1 + stationed_archer_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_1 + } + + next_building = archery_ranges_02 + + type_icon = "regular_buildings/archery_ranges_2.dds" + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_armored_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = archers + value > 0 + } + number_maa_regiments_of_base_type = { + type = skirmishers + value > 0 + } + number_maa_regiments_of_base_type = { + type = archer_cavalry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 1 } + } +} + +archery_ranges_02 = { + construction_time = slow_construction_time + district_level_requirement = 2 + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.07 + stationed_maa_maintenance_high_modifier = -0.07 + stationed_archers_damage_mult = duchy_very_high_maa_damage_tier_1 + stationed_archers_toughness_mult = duchy_low_maa_toughness_tier_1 + stationed_skirmishers_screen_mult = duchy_high_maa_screen_tier_1 + stationed_skirmishers_damage_mult = duchy_very_high_maa_damage_tier_1 + stationed_skirmishers_toughness_mult = duchy_high_maa_toughness_tier_1 + stationed_skirmishers_pursuit_mult = duchy_high_maa_pursuit_tier_1 + stationed_archer_cavalry_screen_mult = duchy_high_maa_screen_tier_1 + stationed_archer_cavalry_damage_mult = duchy_high_maa_damage_tier_1 + stationed_archer_cavalry_toughness_mult = duchy_low_maa_toughness_tier_1 + stationed_archer_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_1 + } + + next_building = archery_ranges_03 + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_armored_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = archers + value > 0 + } + number_maa_regiments_of_base_type = { + type = skirmishers + value > 0 + } + number_maa_regiments_of_base_type = { + type = archer_cavalry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 2 } + } +} + +archery_ranges_03 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + + district_level_requirement = 3 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.08 + stationed_maa_maintenance_high_modifier = -0.08 + stationed_archers_damage_mult = duchy_very_high_maa_damage_tier_2 + stationed_archers_toughness_mult = duchy_low_maa_toughness_tier_2 + stationed_skirmishers_screen_mult = duchy_high_maa_screen_tier_2 + stationed_skirmishers_damage_mult = duchy_very_high_maa_damage_tier_2 + stationed_skirmishers_toughness_mult = duchy_high_maa_toughness_tier_2 + stationed_skirmishers_pursuit_mult = duchy_high_maa_pursuit_tier_2 + stationed_archer_cavalry_screen_mult = duchy_high_maa_screen_tier_2 + stationed_archer_cavalry_damage_mult = duchy_high_maa_damage_tier_2 + stationed_archer_cavalry_toughness_mult = duchy_low_maa_toughness_tier_2 + stationed_archer_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_2 + } + + next_building = archery_ranges_04 + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_armored_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = archers + value > 0 + } + number_maa_regiments_of_base_type = { + type = skirmishers + value > 0 + } + number_maa_regiments_of_base_type = { + type = archer_cavalry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 3 } + } +} + +archery_ranges_04 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.09 + stationed_maa_maintenance_high_modifier = -0.09 + stationed_archers_damage_mult = duchy_very_high_maa_damage_tier_2 + stationed_archers_toughness_mult = duchy_low_maa_toughness_tier_2 + stationed_skirmishers_screen_mult = duchy_high_maa_screen_tier_2 + stationed_skirmishers_damage_mult = duchy_very_high_maa_damage_tier_2 + stationed_skirmishers_toughness_mult = duchy_high_maa_toughness_tier_2 + stationed_skirmishers_pursuit_mult = duchy_high_maa_pursuit_tier_2 + stationed_archer_cavalry_screen_mult = duchy_high_maa_screen_tier_2 + stationed_archer_cavalry_damage_mult = duchy_high_maa_damage_tier_2 + stationed_archer_cavalry_toughness_mult = duchy_low_maa_toughness_tier_2 + stationed_archer_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_2 + } + + next_building = archery_ranges_05 + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_armored_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = archers + value > 0 + } + number_maa_regiments_of_base_type = { + type = skirmishers + value > 0 + } + number_maa_regiments_of_base_type = { + type = archer_cavalry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 4 } + } +} + +archery_ranges_05 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_archery_cost_discount_effect_toto_desc + } + } + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.1 + stationed_maa_maintenance_high_modifier = -0.1 + stationed_archers_damage_mult = duchy_very_high_maa_damage_tier_3 + stationed_archers_toughness_mult = duchy_low_maa_toughness_tier_3 + stationed_skirmishers_screen_mult = duchy_high_maa_screen_tier_3 + stationed_skirmishers_damage_mult = duchy_very_high_maa_damage_tier_3 + stationed_skirmishers_toughness_mult = duchy_high_maa_toughness_tier_3 + stationed_skirmishers_pursuit_mult = duchy_high_maa_pursuit_tier_3 + stationed_archer_cavalry_screen_mult = duchy_high_maa_screen_tier_3 + stationed_archer_cavalry_damage_mult = duchy_high_maa_damage_tier_3 + stationed_archer_cavalry_toughness_mult = duchy_low_maa_toughness_tier_3 + stationed_archer_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_3 + } + + flag = duchy_building + flag = fully_upgraded_duchy_capital_building + + ai_value = { + base = 10 + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_armored_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = archers + value > 0 + } + number_maa_regiments_of_base_type = { + type = skirmishers + value > 0 + } + number_maa_regiments_of_base_type = { + type = archer_cavalry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 5 } + } +} + +################## +# Crown Smithies # +################## + +blacksmiths_01 = { + construction_time = slow_construction_time + effect_desc = { + desc = unlocks_building_desc + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = blacksmiths_toto_effect_desc + } + triggered_desc = { + trigger = { has_dlc_feature = royal_court } + desc = blacksmiths_roco_effect_desc + } + desc = blacksmiths_effect_desc + } + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_3_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.06 + stationed_maa_maintenance_high_modifier = -0.06 + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_pikemen_toughness_mult = duchy_very_high_maa_toughness_tier_1 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_heavy_infantry_toughness_mult = duchy_very_high_maa_toughness_tier_1 + } + character_culture_modifier = { + parameter = better_blacksmith_buildings + prowess = 2 + } + duchy_capital_county_culture_modifier = { + parameter = better_blacksmith_buildings + supply_limit_mult = 0.25 + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_pikemen_toughness_mult = duchy_normal_maa_toughness_tier_1 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_heavy_infantry_toughness_mult = duchy_normal_maa_toughness_tier_1 + } + duchy_capital_county_culture_modifier = { + parameter = coking_smith_bonuses + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_pikemen_toughness_mult = duchy_normal_maa_toughness_tier_1 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_heavy_infantry_toughness_mult = duchy_normal_maa_toughness_tier_1 + } + + next_building = blacksmiths_02 + + type_icon = "duchy_buildings/blacksmiths.dds" + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = pikemen + value > 0 + } + number_maa_regiments_of_base_type = { + type = heavy_infantry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 1 } + } +} + +blacksmiths_02 = { + construction_time = slow_construction_time + district_level_requirement = 2 + effect_desc = { + desc = unlocks_building_desc + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = blacksmiths_toto_effect_desc + } + triggered_desc = { + trigger = { has_dlc_feature = royal_court } + desc = blacksmiths_roco_effect_desc + } + desc = blacksmiths_effect_desc + } + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.07 + stationed_maa_maintenance_high_modifier = -0.07 + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_pikemen_toughness_mult = duchy_very_high_maa_toughness_tier_1 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_heavy_infantry_toughness_mult = duchy_very_high_maa_toughness_tier_1 + } + character_culture_modifier = { + parameter = better_blacksmith_buildings + prowess = 2 + pikemen_toughness_mult = 0.05 + heavy_infantry_toughness_mult = 0.05 + } + duchy_capital_county_culture_modifier = { + parameter = better_blacksmith_buildings + supply_limit_mult = 0.375 + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_pikemen_toughness_mult = duchy_normal_maa_toughness_tier_1 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_heavy_infantry_toughness_mult = duchy_normal_maa_toughness_tier_1 + } + duchy_capital_county_culture_modifier = { + parameter = coking_smith_bonuses + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_pikemen_toughness_mult = duchy_normal_maa_toughness_tier_1 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_heavy_infantry_toughness_mult = duchy_normal_maa_toughness_tier_1 + } + + next_building = blacksmiths_03 + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = pikemen + value > 0 + } + number_maa_regiments_of_base_type = { + type = heavy_infantry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 2 } + } +} + +blacksmiths_03 = { + construction_time = slow_construction_time + effect_desc = { + desc = unlocks_building_desc + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = blacksmiths_toto_effect_desc + } + triggered_desc = { + trigger = { has_dlc_feature = royal_court } + desc = blacksmiths_roco_effect_desc + } + desc = blacksmiths_effect_desc + } + + district_level_requirement = 3 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.08 + stationed_maa_maintenance_high_modifier = -0.08 + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_pikemen_toughness_mult = duchy_very_high_maa_toughness_tier_2 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_heavy_infantry_toughness_mult = duchy_very_high_maa_toughness_tier_2 + } + character_culture_modifier = { + parameter = better_blacksmith_buildings + prowess = 3 + pikemen_toughness_mult = 0.05 + heavy_infantry_toughness_mult = 0.05 + } + duchy_capital_county_culture_modifier = { + parameter = better_blacksmith_buildings + supply_limit_mult = 0.5 + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_pikemen_toughness_mult = duchy_normal_maa_toughness_tier_2 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_heavy_infantry_toughness_mult = duchy_normal_maa_toughness_tier_2 + } + duchy_capital_county_culture_modifier = { + parameter = coking_smith_bonuses + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_pikemen_toughness_mult = duchy_normal_maa_toughness_tier_2 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_heavy_infantry_toughness_mult = duchy_normal_maa_toughness_tier_2 + } + + next_building = blacksmiths_04 + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = pikemen + value > 0 + } + number_maa_regiments_of_base_type = { + type = heavy_infantry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 3 } + } +} + +blacksmiths_04 = { + construction_time = slow_construction_time + effect_desc = { + desc = unlocks_building_desc + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = blacksmiths_toto_effect_desc + } + triggered_desc = { + trigger = { has_dlc_feature = royal_court } + desc = blacksmiths_roco_effect_desc + } + desc = blacksmiths_effect_desc + } + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.09 + stationed_maa_maintenance_high_modifier = -0.09 + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_pikemen_toughness_mult = duchy_very_high_maa_toughness_tier_2 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_heavy_infantry_toughness_mult = duchy_very_high_maa_toughness_tier_2 + } + character_culture_modifier = { + parameter = better_blacksmith_buildings + prowess = 3 + pikemen_toughness_mult = 0.08 + heavy_infantry_toughness_mult = 0.08 + } + duchy_capital_county_culture_modifier = { + parameter = better_blacksmith_buildings + supply_limit_mult = 0.625 + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_pikemen_toughness_mult = duchy_normal_maa_toughness_tier_2 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_heavy_infantry_toughness_mult = duchy_normal_maa_toughness_tier_2 + } + duchy_capital_county_culture_modifier = { + parameter = coking_smith_bonuses + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_pikemen_toughness_mult = duchy_normal_maa_toughness_tier_2 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_heavy_infantry_toughness_mult = duchy_normal_maa_toughness_tier_2 + } + + next_building = blacksmiths_05 + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = pikemen + value > 0 + } + number_maa_regiments_of_base_type = { + type = heavy_infantry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 4 } + } +} + +blacksmiths_05 = { + construction_time = slow_construction_time + effect_desc = { + desc = unlocks_building_desc + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = blacksmiths_toto_effect_desc + } + triggered_desc = { + trigger = { has_dlc_feature = royal_court } + desc = blacksmiths_roco_effect_desc + } + desc = blacksmiths_effect_desc + } + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.1 + stationed_maa_maintenance_high_modifier = -0.1 + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_3 + stationed_pikemen_toughness_mult = duchy_very_high_maa_toughness_tier_3 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_3 + stationed_heavy_infantry_toughness_mult = duchy_very_high_maa_toughness_tier_3 + } + character_culture_modifier = { + parameter = better_blacksmith_buildings + prowess = 4 + pikemen_toughness_mult = 0.08 + heavy_infantry_toughness_mult = 0.08 + } + duchy_capital_county_culture_modifier = { + parameter = better_blacksmith_buildings + supply_limit_mult = 0.75 + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_3 + stationed_pikemen_toughness_mult = duchy_normal_maa_toughness_tier_3 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_3 + stationed_heavy_infantry_toughness_mult = duchy_normal_maa_toughness_tier_3 + } + duchy_capital_county_culture_modifier = { + parameter = coking_smith_bonuses + stationed_pikemen_damage_mult = duchy_normal_maa_damage_tier_3 + stationed_pikemen_toughness_mult = duchy_normal_maa_toughness_tier_3 + stationed_heavy_infantry_damage_mult = duchy_normal_maa_damage_tier_3 + stationed_heavy_infantry_toughness_mult = duchy_normal_maa_toughness_tier_3 + } + + flag = duchy_building + flag = fully_upgraded_duchy_capital_building + + ai_value = { + base = 10 + ai_anti_synergy_cavalry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = pikemen + value > 0 + } + number_maa_regiments_of_base_type = { + type = heavy_infantry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 5 } + } +} + +################### +# Jousting Grounds # +################### + +jousting_lists_01 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = unlocks_building_desc + } + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_horse_cost_discount_effect_toto_desc + } + } + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_3_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.06 + stationed_maa_maintenance_high_modifier = -0.06 + stationed_heavy_cavalry_damage_mult = duchy_very_high_maa_damage_tier_1 + stationed_heavy_cavalry_toughness_mult = duchy_very_high_maa_toughness_tier_1 + stationed_heavy_cavalry_screen_mult = duchy_very_high_maa_screen_tier_1 + stationed_heavy_cavalry_pursuit_mult = duchy_very_high_maa_pursuit_tier_1 + stationed_light_cavalry_damage_mult = duchy_high_maa_damage_tier_1 + stationed_light_cavalry_toughness_mult = duchy_high_maa_toughness_tier_1 + stationed_light_cavalry_screen_mult = duchy_high_maa_screen_tier_1 + stationed_light_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_1 + stationed_elephant_cavalry_damage_mult = duchy_very_high_maa_damage_tier_1 + stationed_elephant_cavalry_toughness_mult = duchy_very_high_maa_toughness_tier_1 + stationed_camel_cavalry_damage_mult = duchy_high_maa_damage_tier_1 + stationed_camel_cavalry_toughness_mult = duchy_high_maa_toughness_tier_1 + stationed_camel_cavalry_screen_mult = duchy_high_maa_screen_tier_1 + stationed_camel_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_1 + } + + next_building = jousting_lists_02 + + type_icon = "duchy_buildings/jousting_lists.dds" + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_armored_infantry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = heavy_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = light_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = elephant_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = camel_cavalry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 1 } + } +} + +jousting_lists_02 = { + construction_time = slow_construction_time + district_level_requirement = 2 + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = unlocks_building_desc + } + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_horse_cost_discount_effect_toto_desc + } + } + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.07 + stationed_maa_maintenance_high_modifier = -0.07 + stationed_heavy_cavalry_damage_mult = duchy_very_high_maa_damage_tier_1 + stationed_heavy_cavalry_toughness_mult = duchy_very_high_maa_toughness_tier_1 + stationed_heavy_cavalry_screen_mult = duchy_very_high_maa_screen_tier_1 + stationed_heavy_cavalry_pursuit_mult = duchy_very_high_maa_pursuit_tier_1 + stationed_light_cavalry_damage_mult = duchy_high_maa_damage_tier_1 + stationed_light_cavalry_toughness_mult = duchy_high_maa_toughness_tier_1 + stationed_light_cavalry_screen_mult = duchy_high_maa_screen_tier_1 + stationed_light_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_1 + stationed_elephant_cavalry_damage_mult = duchy_very_high_maa_damage_tier_1 + stationed_elephant_cavalry_toughness_mult = duchy_very_high_maa_toughness_tier_1 + stationed_camel_cavalry_damage_mult = duchy_high_maa_damage_tier_1 + stationed_camel_cavalry_toughness_mult = duchy_high_maa_toughness_tier_1 + stationed_camel_cavalry_screen_mult = duchy_high_maa_screen_tier_1 + stationed_camel_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_1 + } + + next_building = jousting_lists_03 + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_armored_infantry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = heavy_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = light_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = elephant_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = camel_cavalry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 2 } + } +} + +jousting_lists_03 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = unlocks_building_desc + } + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_horse_cost_discount_effect_toto_desc + } + } + + district_level_requirement = 3 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.08 + stationed_maa_maintenance_high_modifier = -0.08 + stationed_heavy_cavalry_damage_mult = duchy_very_high_maa_damage_tier_2 + stationed_heavy_cavalry_toughness_mult = duchy_very_high_maa_toughness_tier_2 + stationed_heavy_cavalry_screen_mult = duchy_very_high_maa_screen_tier_2 + stationed_heavy_cavalry_pursuit_mult = duchy_very_high_maa_pursuit_tier_2 + stationed_light_cavalry_damage_mult = duchy_high_maa_damage_tier_2 + stationed_light_cavalry_toughness_mult = duchy_high_maa_toughness_tier_2 + stationed_light_cavalry_screen_mult = duchy_high_maa_screen_tier_2 + stationed_light_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_2 + stationed_elephant_cavalry_damage_mult = duchy_very_high_maa_damage_tier_2 + stationed_elephant_cavalry_toughness_mult = duchy_very_high_maa_toughness_tier_2 + stationed_camel_cavalry_damage_mult = duchy_high_maa_damage_tier_2 + stationed_camel_cavalry_toughness_mult = duchy_high_maa_toughness_tier_2 + stationed_camel_cavalry_screen_mult = duchy_high_maa_screen_tier_2 + stationed_camel_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_2 + } + + next_building = jousting_lists_04 + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_armored_infantry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = heavy_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = light_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = elephant_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = camel_cavalry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 3 } + } +} + +jousting_lists_04 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = unlocks_building_desc + } + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_horse_cost_discount_effect_toto_desc + } + } + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.09 + stationed_maa_maintenance_high_modifier = -0.09 + stationed_heavy_cavalry_damage_mult = duchy_very_high_maa_damage_tier_2 + stationed_heavy_cavalry_toughness_mult = duchy_very_high_maa_toughness_tier_2 + stationed_heavy_cavalry_screen_mult = duchy_very_high_maa_screen_tier_2 + stationed_heavy_cavalry_pursuit_mult = duchy_very_high_maa_pursuit_tier_2 + stationed_light_cavalry_damage_mult = duchy_high_maa_damage_tier_2 + stationed_light_cavalry_toughness_mult = duchy_high_maa_toughness_tier_2 + stationed_light_cavalry_screen_mult = duchy_high_maa_screen_tier_2 + stationed_light_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_2 + stationed_elephant_cavalry_damage_mult = duchy_very_high_maa_damage_tier_2 + stationed_elephant_cavalry_toughness_mult = duchy_very_high_maa_toughness_tier_2 + stationed_camel_cavalry_damage_mult = duchy_high_maa_damage_tier_2 + stationed_camel_cavalry_toughness_mult = duchy_high_maa_toughness_tier_2 + stationed_camel_cavalry_screen_mult = duchy_high_maa_screen_tier_2 + stationed_camel_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_2 + } + + next_building = jousting_lists_05 + + flag = duchy_building + + ai_value = { + base = 10 + ai_anti_synergy_armored_infantry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = heavy_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = light_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = elephant_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = camel_cavalry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 4 } + } +} + +jousting_lists_05 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = unlocks_building_desc + } + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_horse_cost_discount_effect_toto_desc + } + } + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.1 + stationed_maa_maintenance_high_modifier = -0.1 + stationed_heavy_cavalry_damage_mult = duchy_very_high_maa_damage_tier_3 + stationed_heavy_cavalry_toughness_mult = duchy_very_high_maa_toughness_tier_3 + stationed_heavy_cavalry_screen_mult = duchy_very_high_maa_screen_tier_3 + stationed_heavy_cavalry_pursuit_mult = duchy_very_high_maa_pursuit_tier_3 + stationed_light_cavalry_damage_mult = duchy_high_maa_damage_tier_3 + stationed_light_cavalry_toughness_mult = duchy_high_maa_toughness_tier_3 + stationed_light_cavalry_screen_mult = duchy_high_maa_screen_tier_3 + stationed_light_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_3 + stationed_elephant_cavalry_damage_mult = duchy_very_high_maa_damage_tier_3 + stationed_elephant_cavalry_toughness_mult = duchy_very_high_maa_toughness_tier_3 + stationed_camel_cavalry_damage_mult = duchy_high_maa_damage_tier_3 + stationed_camel_cavalry_toughness_mult = duchy_high_maa_toughness_tier_3 + stationed_camel_cavalry_screen_mult = duchy_high_maa_screen_tier_3 + stationed_camel_cavalry_pursuit_mult = duchy_high_maa_pursuit_tier_3 + } + + flag = duchy_building + flag = fully_upgraded_duchy_capital_building + + ai_value = { + base = 10 + ai_anti_synergy_armored_infantry_modifier = yes + ai_anti_synergy_light_infantry_modifier = yes + modifier = { # Don't build unsuitable MaA-boosting duchy buildings + factor = 0 + scope:holder = { + NOR = { + number_maa_regiments_of_base_type = { + type = heavy_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = light_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = elephant_cavalry + value > 0 + } + number_maa_regiments_of_base_type = { + type = camel_cavalry + value > 0 + } + } + } + } + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 5 } + } +} + +########### +# Marches # +########### + +march_01 = { + construction_time = slow_construction_time + effect_desc = marches_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_3_cost + + duchy_capital_county_modifier = { + supply_limit_mult = 0.25 + levy_reinforcement_rate = 0.25 + garrison_size = 0.25 + hostile_raid_time = 0.25 + defender_holding_advantage = 5 + additional_fort_level = normal_building_fort_level_tier_2 + travel_danger = -10 + mountains_tax_mult = 0.075 + desert_mountains_tax_mult = 0.075 + hills_tax_mult = 0.075 + } + + next_building = march_02 + + type_icon = "duchy_buildings/march.dds" + + flag = duchy_building + flag = raid_protection_1 + + ai_value = { + base = 10 + culture_likely_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 1 } + } +} + +march_02 = { + construction_time = slow_construction_time + district_level_requirement = 2 + effect_desc = marches_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + duchy_capital_county_modifier = { + supply_limit_mult = 0.375 + levy_reinforcement_rate = 0.375 + garrison_size = 0.375 + hostile_raid_time = 0.375 + defender_holding_advantage = 7.5 + additional_fort_level = normal_building_fort_level_tier_2 + travel_danger = -15 + mountains_tax_mult = 0.09 + desert_mountains_tax_mult = 0.09 + hills_tax_mult = 0.09 + } + + next_building = march_03 + + flag = duchy_building + flag = raid_protection_1 + + ai_value = { + base = 10 + culture_likely_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 2 } + } +} + +march_03 = { + construction_time = slow_construction_time + effect_desc = marches_effect_2_desc + + district_level_requirement = 3 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + duchy_capital_county_modifier = { + supply_limit_mult = 0.5 + levy_reinforcement_rate = 0.5 + garrison_size = 0.5 + hostile_raid_time = 0.5 + defender_holding_advantage = 10 + additional_fort_level = normal_building_fort_level_tier_4 + travel_danger = -20 + mountains_tax_mult = 0.1 + desert_mountains_tax_mult = 0.1 + hills_tax_mult = 0.1 + } + + next_building = march_04 + + flag = duchy_building + flag = raid_protection_2 + + ai_value = { + base = 10 + culture_likely_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 3 } + } +} + +march_04 = { + construction_time = slow_construction_time + effect_desc = marches_effect_2_desc + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + duchy_capital_county_modifier = { + supply_limit_mult = 0.75 + levy_reinforcement_rate = 0.75 + garrison_size = 0.75 + hostile_raid_time = 0.625 + defender_holding_advantage = 12.5 + additional_fort_level = normal_building_fort_level_tier_4 + travel_danger = -25 + mountains_tax_mult = 0.125 + desert_mountains_tax_mult = 0.125 + hills_tax_mult = 0.125 + } + + next_building = march_05 + + flag = duchy_building + flag = raid_protection_2 + + ai_value = { + base = 10 + culture_likely_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 4 } + } +} + +march_05 = { + construction_time = slow_construction_time + effect_desc = marches_effect_2_desc + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + duchy_capital_county_modifier = { + supply_limit_mult = 1 + levy_reinforcement_rate = 1 + garrison_size = 1 + hostile_raid_time = 0.75 + defender_holding_advantage = 15 + additional_fort_level = normal_building_fort_level_tier_6 + travel_danger = -30 + mountains_tax_mult = 0.15 + desert_mountains_tax_mult = 0.15 + hills_tax_mult = 0.15 + } + + flag = duchy_building + flag = fully_upgraded_duchy_capital_building + flag = raid_protection_2 + + ai_value = { + base = 10 + culture_likely_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 5 } + } +} + +###################### +# Military Academies # +###################### + +military_academy_01 = { + construction_time = slow_construction_time + effect_desc = academies_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_3_cost + + character_modifier = { + knight_limit = 2 + knight_effectiveness_mult = 0.04 + men_at_arms_recruitment_cost = -0.1 + men_at_arms_limit = 1 + } + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.025 + stationed_maa_maintenance_high_modifier = -0.025 + } + + next_building = military_academy_02 + + type_icon = "duchy_buildings/military_academy.dds" + + flag = duchy_building + + ai_value = { + base = 10 + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 1 } + } +} + +military_academy_02 = { + construction_time = slow_construction_time + district_level_requirement = 2 + effect_desc = academies_effect_desc + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + character_modifier = { + knight_limit = 3 + knight_effectiveness_mult = 0.08 + men_at_arms_recruitment_cost = -0.15 + men_at_arms_limit = 1 + } + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.03 + stationed_maa_maintenance_high_modifier = -0.03 + } + + next_building = military_academy_03 + + flag = duchy_building + + ai_value = { + base = 10 + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 2 } + } +} + +military_academy_03 = { + construction_time = slow_construction_time + effect_desc = academies_effect_desc + + district_level_requirement = 3 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + character_modifier = { + knight_limit = 4 + knight_effectiveness_mult = 0.12 + men_at_arms_recruitment_cost = -0.2 + men_at_arms_limit = 2 + } + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.035 + stationed_maa_maintenance_high_modifier = -0.035 + } + + next_building = military_academy_04 + + flag = duchy_building + + ai_value = { + base = 10 + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 3 } + } +} + +military_academy_04 = { + construction_time = slow_construction_time + effect_desc = academies_effect_desc + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + character_modifier = { + knight_limit = 5 + knight_effectiveness_mult = 0.16 + men_at_arms_recruitment_cost = -0.25 + men_at_arms_limit = 2 + } + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.0425 + stationed_maa_maintenance_high_modifier = -0.0425 + } + + next_building = military_academy_05 + + flag = duchy_building + + ai_value = { + base = 10 + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 4 } + } +} + +military_academy_05 = { + construction_time = slow_construction_time + effect_desc = academies_effect_desc + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + character_modifier = { + knight_limit = 6 + knight_effectiveness_mult = 0.2 + men_at_arms_recruitment_cost = -0.3 + men_at_arms_limit = 3 + } + duchy_capital_county_modifier = { + stationed_maa_maintenance_low_modifier = -0.05 + stationed_maa_maintenance_high_modifier = -0.05 + } + + flag = duchy_building + flag = fully_upgraded_duchy_capital_building + + ai_value = { + base = 10 + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 5 } + } +} + +################## +# Royal Armories # +################## + +royal_armory_01 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_melee_cost_discount_effect_toto_desc + } + } + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_3_cost + + duchy_capital_county_modifier = { + levy_size = 0.2 + stationed_maa_maintenance_low_modifier = -0.025 + stationed_maa_maintenance_high_modifier = -0.025 + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_1 + } + character_culture_modifier = { + parameter = better_armory_buildings + prowess = 2 + knight_effectiveness_mult = 0.03 + } + duchy_capital_county_culture_modifier = { + parameter = better_armory_buildings + build_gold_cost = -0.1 + holding_build_gold_cost = -0.1 + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_1 + } + + next_building = royal_armory_02 + + type_icon = "duchy_buildings/royal_armory.dds" + + flag = duchy_building + + ai_value = { + base = 10 + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 1 } + } +} + +royal_armory_02 = { + construction_time = slow_construction_time + district_level_requirement = 2 + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_melee_cost_discount_effect_toto_desc + } + } + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + duchy_capital_county_modifier = { + levy_size = 0.25 + stationed_maa_maintenance_low_modifier = -0.0375 + stationed_maa_maintenance_high_modifier = -0.0375 + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_1 + } + character_culture_modifier = { + parameter = better_armory_buildings + prowess = 2 + knight_effectiveness_mult = 0.06 + } + duchy_capital_county_culture_modifier = { + parameter = better_armory_buildings + build_gold_cost = -0.125 + holding_build_gold_cost = -0.125 + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_1 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_1 + } + + next_building = royal_armory_03 + + flag = duchy_building + + ai_value = { + base = 10 + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 2 } + } +} + +royal_armory_03 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_activity_cost_max_discount_effect_desc + } + } + + district_level_requirement = 3 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + duchy_capital_county_modifier = { + levy_size = 0.3 + stationed_maa_maintenance_low_modifier = -0.05 + stationed_maa_maintenance_high_modifier = -0.05 + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_2 + } + character_culture_modifier = { + parameter = better_armory_buildings + prowess = 3 + knight_effectiveness_mult = 0.09 + } + duchy_capital_county_culture_modifier = { + parameter = better_armory_buildings + build_gold_cost = -0.15 + holding_build_gold_cost = -0.15 + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_2 + } + + next_building = royal_armory_04 + + flag = duchy_building + + ai_value = { + base = 10 + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 3 } + } +} + +royal_armory_04 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_activity_cost_max_discount_effect_desc + } + } + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + duchy_capital_county_modifier = { + levy_size = 0.35 + stationed_maa_maintenance_low_modifier = -0.075 + stationed_maa_maintenance_high_modifier = -0.075 + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_2 + } + character_culture_modifier = { + parameter = better_armory_buildings + prowess = 3 + knight_effectiveness_mult = 0.12 + } + duchy_capital_county_culture_modifier = { + parameter = better_armory_buildings + build_gold_cost = -0.175 + holding_build_gold_cost = -0.175 + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_2 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_2 + } + + next_building = royal_armory_05 + + flag = duchy_building + + ai_value = { + base = 10 + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 4 } + } +} + +royal_armory_05 = { + construction_time = slow_construction_time + effect_desc = { + triggered_desc = { + trigger = { has_dlc_feature = tours_and_tournaments } + desc = tournament_activity_cost_max_discount_effect_desc + } + } + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + duchy_capital_county_modifier = { + levy_size = 0.4 + stationed_maa_maintenance_low_modifier = -0.1 + stationed_maa_maintenance_high_modifier = -0.1 + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_3 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_3 + } + character_culture_modifier = { + parameter = better_armory_buildings + prowess = 4 + knight_effectiveness_mult = 0.15 + } + duchy_capital_county_culture_modifier = { + parameter = better_armory_buildings + build_gold_cost = -0.2 + holding_build_gold_cost = -0.2 + stationed_maa_damage_mult = duchy_normal_maa_damage_tier_3 + stationed_maa_toughness_mult = duchy_normal_maa_toughness_tier_3 + } + + flag = duchy_building + flag = fully_upgraded_duchy_capital_building + + ai_value = { + base = 10 + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 5 } + } +} + +############### +# Siege Works # +############### + +siege_works_01 = { + construction_time = slow_construction_time + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_3_cost + + character_modifier = { + siege_weapon_recruitment_cost_mult = -0.15 + } + duchy_capital_county_modifier = { + stationed_siege_weapon_siege_value_mult = duchy_very_high_maa_siege_value_tier_1 + stationed_siege_weapon_toughness_add = 2.5 + additional_fort_level = normal_building_fort_level_tier_2 + stationed_siege_weapon_maintenance_low_modifier = -0.15 + stationed_siege_weapon_maintenance_high_modifier = -0.15 + } + + next_building = siege_works_02 + + type_icon = "duchy_buildings/siege_works.dds" + + flag = duchy_building + + ai_value = { + base = 10 + culture_likely_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 1 } + } +} + +siege_works_02 = { + construction_time = slow_construction_time + district_level_requirement = 2 + + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + character_modifier = { + siege_weapon_recruitment_cost_mult = -0.225 + } + duchy_capital_county_modifier = { + stationed_siege_weapon_siege_value_mult = duchy_very_high_maa_siege_value_tier_1 + stationed_siege_weapon_toughness_add = 3.75 + additional_fort_level = normal_building_fort_level_tier_2 + stationed_siege_weapon_maintenance_low_modifier = -0.225 + stationed_siege_weapon_maintenance_high_modifier = -0.225 + } + + next_building = siege_works_03 + + flag = duchy_building + + ai_value = { + base = 10 + culture_likely_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 2 } + } +} + +siege_works_03 = { + construction_time = slow_construction_time + + district_level_requirement = 3 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_4_cost + + character_modifier = { + siege_weapon_recruitment_cost_mult = -0.3 + } + duchy_capital_county_modifier = { + stationed_siege_weapon_siege_value_mult = duchy_very_high_maa_siege_value_tier_2 + stationed_siege_weapon_toughness_add = 5 + additional_fort_level = normal_building_fort_level_tier_4 + stationed_siege_weapon_maintenance_low_modifier = -0.3 + stationed_siege_weapon_maintenance_high_modifier = -0.3 + } + + next_building = siege_works_04 + + flag = duchy_building + + ai_value = { + base = 10 + culture_likely_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 3 } + } +} + +siege_works_04 = { + construction_time = slow_construction_time + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + character_modifier = { + siege_weapon_recruitment_cost_mult = -0.375 + } + duchy_capital_county_modifier = { + stationed_siege_weapon_siege_value_mult = duchy_very_high_maa_siege_value_tier_2 + stationed_siege_weapon_toughness_add = 6.25 + additional_fort_level = normal_building_fort_level_tier_4 + stationed_siege_weapon_maintenance_low_modifier = -0.375 + stationed_siege_weapon_maintenance_high_modifier = -0.375 + } + + next_building = siege_works_05 + + flag = duchy_building + + ai_value = { + base = 10 + culture_likely_to_fortify_modifier = yes + ai_capital_preference_modifier = yes + ai_duchy_district_building_modifier = { LEVEL = 4 } + } +} + +siege_works_05 = { + construction_time = slow_construction_time + + district_level_requirement = 4 + can_construct_potential = { + building_requirement_castle_city_church = { LEVEL = 01 } + building_requirement_tribal = no + } + + can_construct_showing_failures_only = { + } + + show_disabled = yes + + cost_gold = expensive_building_tier_5_cost + + character_modifier = { + siege_weapon_recruitment_cost_mult = -0.45 + } + duchy_capital_county_modifier = { + stationed_siege_weapon_siege_value_mult = duchy_very_high_maa_siege_value_tier_3 + stationed_siege_weapon_toughness_add = 7.5 + additional_fort_level = normal_building_fort_level_tier_6 + stationed_siege_weapon_maintenance_low_modifier = -0.45 + stationed_siege_weapon_maintenance_high_modifier = -0.45 } is_enabled = { diff --git a/common/buildings/regular_primary_buildings.txt b/common/buildings/regular_primary_buildings.txt index 8af5edccb..743c46617 100644 --- a/common/buildings/regular_primary_buildings.txt +++ b/common/buildings/regular_primary_buildings.txt @@ -7423,7 +7423,7 @@ pb_tribal_wanua_04 = { } can_construct_showing_failures_only = { - culture = { has_innovation = innovation_hereditary_rule } + culture = { has_innovation = innovation_royal_prerogative } holding_district_level_4_trigger = yes } diff --git a/common/casus_belli_groups/00_casus_belli_groups.txt b/common/casus_belli_groups/00_casus_belli_groups.txt index 943736faf..17bfb8bff 100644 --- a/common/casus_belli_groups/00_casus_belli_groups.txt +++ b/common/casus_belli_groups/00_casus_belli_groups.txt @@ -1,5 +1,6 @@ religious = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes OR = { # Cannot Holy War if your Liege(s) are of a different Faith than you. top_liege = this any_liege_or_above = { @@ -17,15 +18,18 @@ } } herders_and_tributary_constraints = yes - pam_personal_pacifism_offensive_war_ban_trigger = yes tgp_dynastic_cycle_offensive_wars_ban_trigger = yes tgp_war_ban_all_ministers_trigger = yes } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } #Holy wars that should be restricted if your liege disagrees, or your faith does, but which don't require organised religion. E.g., human sacrifice raids. religious_disorganised = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes OR = { # Cannot Holy War if your Liege(s) are of a different Faith than you. top_liege = this any_liege_or_above = { @@ -37,10 +41,12 @@ religious_disorganised = { NOT = { has_doctrine_parameter = holy_wars_forbidden } # Pacifists cannot Holy War } herders_and_tributary_constraints = yes - pam_personal_pacifism_offensive_war_ban_trigger = yes tgp_dynastic_cycle_offensive_wars_ban_trigger = yes tgp_war_ban_all_ministers_trigger = yes } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } religious_script_only = { @@ -55,8 +61,8 @@ religious_script_only = { de_jure = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes herders_and_tributary_constraints = yes - pam_personal_pacifism_offensive_war_ban_trigger = yes tgp_dynastic_cycle_offensive_wars_ban_trigger = yes tgp_war_ban_all_ministers_trigger = yes OR = { @@ -67,6 +73,9 @@ de_jure = { } } } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } debug = { @@ -80,8 +89,8 @@ debug = { claim = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes herders_and_tributary_constraints = yes - pam_personal_pacifism_offensive_war_ban_trigger = yes tgp_dynastic_cycle_offensive_wars_ban_trigger = yes tgp_war_ban_all_ministers_trigger = yes OR = { @@ -92,6 +101,9 @@ claim = { } } } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } civil_war = { @@ -104,8 +116,8 @@ civil_war = { invasion = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes herders_and_tributary_constraints = yes - pam_personal_pacifism_offensive_war_ban_trigger = yes tgp_dynastic_cycle_offensive_wars_ban_trigger = yes tgp_war_ban_all_ministers_trigger = yes OR = { @@ -116,12 +128,15 @@ invasion = { } } } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } vassalization = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes herders_and_tributary_constraints = yes - pam_personal_pacifism_offensive_war_ban_trigger = yes tgp_dynastic_cycle_offensive_wars_ban_trigger = yes tgp_war_ban_all_ministers_trigger = yes OR = { @@ -132,12 +147,28 @@ vassalization = { } } } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } conquest = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes herders_and_tributary_constraints = yes + tgp_dynastic_cycle_offensive_wars_ban_trigger = yes + tgp_war_ban_all_ministers_trigger = yes + NOT = { government_has_flag = government_is_theocracy } + } + allowed_for_character_display_regardless = { pam_personal_pacifism_offensive_war_ban_trigger = yes + } +} + +# Seize Realm CBs only, kept open to merchants +merchant_seize_realm = { + allowed_for_character = { + herders_and_tributary_constraints = yes tgp_dynastic_cycle_offensive_wars_ban_trigger = yes tgp_war_ban_all_ministers_trigger = yes OR = { @@ -148,13 +179,16 @@ conquest = { } } } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } struggle = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes can_use_struggle_cbs_trigger = yes herders_and_tributary_constraints = yes - pam_personal_pacifism_offensive_war_ban_trigger = yes tgp_dynastic_cycle_offensive_wars_ban_trigger = yes tgp_war_ban_all_ministers_trigger = yes OR = { @@ -165,12 +199,15 @@ struggle = { } } } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } subjugation = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes herders_and_tributary_constraints = yes - pam_personal_pacifism_offensive_war_ban_trigger = yes tgp_dynastic_cycle_offensive_wars_ban_trigger = yes tgp_war_ban_all_ministers_trigger = yes OR = { @@ -187,10 +224,13 @@ subjugation = { } } } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } independence = { - allowed_for_character = { + allowed_for_character_display_regardless = { pam_personal_pacifism_offensive_war_ban_trigger = yes } } @@ -205,7 +245,10 @@ event = { artifact = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes herders_and_tributary_constraints = yes + } + allowed_for_character_display_regardless = { pam_personal_pacifism_offensive_war_ban_trigger = yes } } @@ -217,6 +260,7 @@ migration = { humiliation = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes herders_and_tributary_constraints = yes pam_personal_pacifism_offensive_war_ban_trigger = yes OR = { @@ -227,10 +271,14 @@ humiliation = { } } } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } mandala = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes herders_and_tributary_constraints = yes pam_personal_pacifism_offensive_war_ban_trigger = yes OR = { @@ -241,12 +289,15 @@ mandala = { } } } + allowed_for_character_display_regardless = { + pam_personal_pacifism_offensive_war_ban_trigger = yes + } } celestial = { allowed_for_character = { + gdp_merchant_cb_group_constraints_trigger = yes herders_and_tributary_constraints = yes - pam_personal_pacifism_offensive_war_ban_trigger = yes tgp_war_ban_civilian_ministers_trigger = yes OR = { NOT = { government_has_flag = government_is_theocracy } diff --git a/common/casus_belli_types/00_claim.txt b/common/casus_belli_types/00_claim.txt index 045c1574d..65b550098 100644 --- a/common/casus_belli_types/00_claim.txt +++ b/common/casus_belli_types/00_claim.txt @@ -16,8 +16,7 @@ AND = { government_has_flag = government_is_landless_adventurer has_realm_law = camp_purpose_legitimists - has_variable = legitimist_claimed_title - var:legitimist_claimed_title = { + var:legitimist_claimed_title ?= { OR = { holder = scope:defender de_jure_liege.holder = scope:defender @@ -42,7 +41,7 @@ #allowed_for_character = {} # allowed_against_character = { - # faith.religion = scope:attacker.faith.religion + # faith.religion = scope:attacker.faith.religion # } # Root is the title @@ -50,7 +49,7 @@ # scope:attacker is the attacker # scope:defender is the defender is_allowed_claim_title = { - # So Claim CB can only be used on titles that have de jure vassals, otherwise this CB will show up but you are unable to click the button to start the actual war because -- the title doesn't have de jure vassals + #Titular titles like the Italian communes have no de jure vassals, so the CB would show but the war could not start is_titular = no trigger_if = { limit = { @@ -221,52 +220,7 @@ } # LEGITIMACY AFFECTS COST - multiply = { - value = { - value = 0 - scope:attacker = { - if = { - limit = { has_legitimacy_flag = reduced_claim_cb_cost } - add = 0.5 - } - else_if = { - limit = { has_legitimacy_flag = very_reduced_claim_cb_cost } - add = 0.25 - } - else_if = { - limit = { has_legitimacy_flag = extra_reduced_claim_cb_cost } - add = 0.15 - } - else = { - add = 1 - } - } - } - desc = legitimacy_high_modifier_tt - } - multiply = { - value = { - value = 0 - scope:attacker = { - if = { - limit = { has_legitimacy_flag = massively_increased_claim_cb_cost } - add = 2.5 - } - else_if = { - limit = { has_legitimacy_flag = very_increased_claim_cb_cost } - add = 2 - } - else_if = { - limit = { has_legitimacy_flag = increased_claim_cb_cost } - add = 1.5 - } - else = { - add = 1 - } - } - } - desc = legitimacy_low_modifier_tt - } + multiply = claim_cb_cost_multiplier_legitimacy } } @@ -287,21 +241,8 @@ should_invalidate = { OR = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier >= tier_county - holder ?= { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } - AND = { + war_should_invalidate_defender_lost_target_titles_trigger = yes + AND = { scope:claimant != scope:attacker scope:claimant = { OR = { @@ -375,7 +316,10 @@ } on_victory = { + on_victory_aggressive_war_effect = yes + pam_notify_claim_war_instigator_effect_win = yes + gg_claim_unites_pope_and_emperor_tooltip_effect = yes #Grab the higher title tier ordered_in_list = { @@ -421,6 +365,48 @@ } } } + if = { + limit = { is_landless_merchant = yes } + save_scope_as = the_merchant + hidden_effect = { + save_scope_as = the_merchant + every_courtier = { + gdp_merchant_courtier_becomes_associate_effect = yes + } + # Now we reforge any Domicile Artifacts + if = { + limit = { + any_character_artifact = { artifact_type = library_item } + } + every_character_artifact = { + limit = { artifact_type = library_item } + reforge_artifact = { type = book } + } + } + if = { + limit = { + any_character_artifact = { artifact_type = curio } + } + every_character_artifact = { + limit = { artifact_type = curio } + reforge_artifact = { type = pedestal } + } + } + if = { + limit = { + any_character_artifact = { artifact_type = creature } + } + every_character_artifact = { + limit = { artifact_type = creature } + set_variable = { + name = og_owner + value = artifact_owner + } + reforge_creature_artifact_effect = yes + } + } + } + } if = { limit = { has_variable = install_claimants_oath @@ -436,52 +422,8 @@ } } - show_pow_release_message_effect = yes - #EP2 Accolade glory gain from winning against higher ranked enemy accolade_attacker_war_end_glory_gain_med_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable) - fp1_remember_recent_conquest_victory_effect = yes - } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes - - scope:defender ?= { - if = { - limit = { - top_liege = this - government_has_mechanic = administrative - primary_title = { is_in_list = target_titles } - } - every_held_title = { - title_tier >= county - limit = { is_noble_family_title = no } - add_to_list = target_titles - } - } - - # EP3 Laamp possibility warning - ep3_war_loss_adventurer_tt_effect = yes - } - - create_title_and_vassal_change = { - type = conquest_claim - save_scope_as = change - add_claim_on_loss = yes - } - - # Create a claim CB which is executed to handle title/vassal changes, in addition to being used to calculate Prestige awards for war participants. - setup_claim_cb = { - titles = target_titles - attacker = scope:attacker - defender = scope:defender - claimant = scope:claimant - change = scope:change } resolve_title_and_vassal_change = scope:change @@ -591,15 +533,6 @@ WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - # truce - add_truce_attacker_victory_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -610,42 +543,17 @@ } desc = claim_cb_white_peace_desc } - } on_white_peace = { pam_notify_claim_war_instigator_effect_draw = yes - scope:attacker = { - show_pow_release_message_effect = yes - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } - } + on_white_peace_effect = yes + on_white_peace_claim_cb_effect = yes #EP2 accolade glory gain for defender doing alright scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } - # press claims - every_in_list = { - list = target_titles - if = { - limit = { scope:claimant = { has_weak_claim_on = prev } } - scope:claimant = { - make_claim_strong = prev - } - } - } - - # Create an 'helper' claim CB which we won't execute, but can use to determine how much Prestige should be given to war participants. - setup_claim_cb = { - titles = target_titles - attacker = scope:attacker - defender = scope:defender - claimant = scope:claimant - victory = no - } # Prestige loss for the attacker scope:attacker = { add_prestige = { @@ -661,36 +569,6 @@ WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - # Defender neither gains nor loses any prestige. - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - if = { - limit = { - scope:claimant != scope:attacker - scope:attacker = { - can_add_hook = { - type = favor_hook - target = scope:claimant - } - } - } - scope:attacker = { - add_hook = { - target = scope:claimant - type = favor_hook - } - } - } - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -715,60 +593,21 @@ on_defeat = { pam_notify_claim_war_instigator_effect_loss = yes - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes + on_defeat_claim_cb_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes accolade_defender_war_end_glory_gain_med_effect = yes } - # lose claims - every_in_list = { - list = target_titles - scope:claimant = { - remove_claim = prev - } - } - - if = { - limit = { - scope:claimant != scope:attacker - scope:attacker = { - can_add_hook = { - type = favor_hook - target = scope:claimant - } - } - } - scope:attacker = { - add_hook = { - target = scope:claimant - type = favor_hook - } - } - } - # Attacker pays gold to the defender as reparations. scope:attacker = { pay_short_term_gold_reparations_effect = { GOLD_VALUE = 3 } } - # Create an 'helper' claim CB which we won't execute, but can use to determine how much Prestige should be given to war participants. - setup_claim_cb = { - titles = target_titles - attacker = scope:attacker - defender = scope:defender - claimant = scope:claimant - victory = no - } + # Attacker loses Prestige, all other war participants gain Prestige (Defender gains full prestige, all allies on both sides gain based on war contribution). modify_all_participants_fame_values = { WINNER = scope:defender @@ -780,20 +619,6 @@ WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } on_primary_attacker_death = inherit @@ -821,8 +646,9 @@ ai_score_mult = { value = 1 - # HOUSE RELATIONS - add = house_relation_ai_score_value + + add = common_cb_ai_score_mult_additive + #There is no fighting in the admin room! if = { limit = { diff --git a/common/casus_belli_types/00_conquest.txt b/common/casus_belli_types/00_conquest.txt index 8f4d0965a..1f95d6f7b 100644 --- a/common/casus_belli_types/00_conquest.txt +++ b/common/casus_belli_types/00_conquest.txt @@ -23,27 +23,16 @@ } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - trigger_if = { - limit = { - government_has_flag = government_is_nomadic - } - scope:defender = { - NOT = { - government_has_flag = government_is_nomadic - } - } - } + scope:attacker.top_liege != scope:defender.top_liege + NAND = { + scope:attacker = { government_has_flag = government_is_nomadic } + scope:defender = { government_has_flag = government_is_nomadic } } } target_titles = all target_title_tier = county ignore_effect = change_title_holder - + attacker_score_from_occupation_scale = 150 attacker_score_from_battles_scale = 150 defender_score_from_battles_scale = 150 @@ -84,20 +73,7 @@ } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_county_conquest_war_invalidated_message @@ -105,41 +81,11 @@ cost = { piety = { - value = 0 - if = { - limit = { - scope:defender.faith = scope:attacker.faith - } - add = { - value = 25 - desc = CB_SAME_FAITH_COST - } - add = { - value = 5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 75 - } - } + add = county_cb_piety_base_cost multiply = common_cb_piety_cost_multiplier } prestige = { - value = 0 - if = { - limit = { - scope:defender.faith != scope:attacker.faith - } - add = { - value = 50 - desc = CB_COST_DIFFERENT_FAITH - } - add = { - value = 5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 100 - } - } + add = county_cb_prestige_base_cost multiply = common_cb_prestige_cost_multiplier } } @@ -159,13 +105,7 @@ } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -176,9 +116,6 @@ add_claim_on_loss = yes } - # EP3 Laamp possibility warning - scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } - #As this is just a county conquest, simply grab the designated county. every_in_list = { list = target_titles @@ -206,18 +143,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -231,17 +156,13 @@ } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -252,17 +173,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -285,16 +195,9 @@ } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_low_effect = yes # Prestige for Defender @@ -319,19 +222,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } transfer_behavior = transfer @@ -351,7 +241,7 @@ use_de_jure_wargoal_only = yes attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 } @@ -363,7 +253,7 @@ duchy_conquest_cb = { combine_into_one = yes should_show_war_goal_subview = yes mutually_exclusive_titles = { always = yes } - + attacker_score_from_occupation_scale = 150 attacker_score_from_battles_scale = 150 defender_score_from_battles_scale = 150 @@ -425,21 +315,10 @@ duchy_conquest_cb = { } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - trigger_if = { - limit = { - government_has_flag = government_is_nomadic - } - scope:defender = { - NOT = { - government_has_flag = government_is_nomadic - } - } - } + scope:attacker.top_liege != scope:defender.top_liege + NAND = { + scope:attacker = { government_has_flag = government_is_nomadic } + scope:defender = { government_has_flag = government_is_nomadic } } } target_titles = all @@ -484,40 +363,11 @@ duchy_conquest_cb = { neighboring_county_or_viking_conquest_trigger = { CHARACTER = root } } } - scope:target = { - trigger_if = { - limit = { - scope:attacker = { - is_ai = yes - } - } - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - count >= 2 - tier = tier_county - holder ?= { - OR = { - this = scope:defender - is_vassal_or_below_of = scope:defender - } - } - } - } - } + ai_aggressive_cb_constraints = yes } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_religious_war_invalidation_region_message @@ -528,80 +378,13 @@ duchy_conquest_cb = { cost = { piety = { add = common_cb_impious_piety_cost - if = { - limit = { - scope:defender.faith = scope:attacker.faith - } - add = { - value = 100 - desc = CB_SAME_FAITH_COST - } - add = { - value = 10 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 800 - } - } + add = duchy_cb_piety_base_cost multiply = common_cb_piety_cost_multiplier } prestige = { - value = 0 - if = { - limit = { - scope:defender.faith != scope:attacker.faith - } - add = { - value = 150 - desc = CB_COST_DIFFERENT_FAITH - } - add = { - value = 10 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 800 - } - } + add = duchy_cb_prestige_base_cost multiply = common_cb_prestige_cost_multiplier - if = { - limit = { - scope:attacker.house = { - OR = { - has_house_modifier = fp2_struggle_hostility_house_culture_modifier - has_house_modifier = fp2_struggle_hostility_house_combined_modifier - } - } - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - this = scope:attacker.culture - } - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - this = scope:defender.culture - } - } - divide = { - value = 2 - desc = CB_COST_FP2_STRUGGLE_HOSTILITY_CULTURE_DISCOUNT - } - } - if = { - limit = { - has_global_variable = fp2_struggle_compromise_ending - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - this = scope:attacker.culture - } - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - this = scope:defender.culture - } - } - multiply = { - value = 2 - desc = CB_COST_FP2_STRUGGLE_COMPROMISE_MULTIPLIER - } - } + multiply = conquest_cb_prestige_cost_multiplier } } @@ -620,10 +403,7 @@ duchy_conquest_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -634,10 +414,7 @@ duchy_conquest_cb = { add_claim_on_loss = yes } - # EP3 Laamp possibility warning - scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } - - # go through the dejure hierarchy under target titles, transfer eligible vassals and sieze counties from ineligible ones + # go through the dejure hierarchy under target titles, transfer eligible vassals and seize counties from ineligible ones every_in_list = { list = target_titles custom_tooltip = CONQUEST_CB_TITLE @@ -682,66 +459,6 @@ duchy_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - if = { # Warning that only counties are changing hands - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - } - } - random_in_list = { - list = target_titles - limit = { tier = tier_duchy } - save_scope_as = de_jure_target - } - } - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - holder = scope:defender - } - } - if = { - limit = { - scope:defender = { - any_held_title = { - title_tier = county - NOT = { target_is_de_jure_liege_or_above = scope:de_jure_target } - } - } - } - custom_tooltip = conquest_title_not_transferred_tt - } - else = { custom_tooltip = conquest_title_destroyed_tt } - } - else = { - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - is_title_created = yes - } - } - custom_tooltip = conquest_title_usurp_tt - } - else = { custom_tooltip = conquest_title_create_tt } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -755,8 +472,7 @@ duchy_conquest_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } - # Prestige loss for the attacker + on_white_peace_effect = yes #EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -776,11 +492,6 @@ duchy_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -803,13 +514,9 @@ duchy_conquest_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_med_effect = yes # Prestige for Defender @@ -837,19 +544,6 @@ duchy_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } transfer_behavior = transfer @@ -869,7 +563,7 @@ duchy_conquest_cb = { use_de_jure_wargoal_only = yes attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 } @@ -881,7 +575,7 @@ ducal_conquest_cb = { combine_into_one = yes should_show_war_goal_subview = yes mutually_exclusive_titles = { always = yes } - + attacker_score_from_occupation_scale = 150 attacker_score_from_battles_scale = 150 defender_score_from_battles_scale = 150 @@ -890,40 +584,32 @@ ducal_conquest_cb = { has_perk = ducal_conquest_perk can_use_conquest_cbs_trigger = no NOR = { + government_has_flag = government_is_merchant government_has_flag = government_is_landless_adventurer government_has_flag = government_is_nomadic + government_has_flag = government_is_republic } } allowed_against_character = { - #scope:attacker = { - # ALL_FALSE = { - # top_liege = scope:defender.top_liege - # liege = scope:defender - # } - #} + # scope:attacker.top_liege != scope:defender.top_liege } target_titles = neighbor_land - target_title_tier = all + target_title_tier = duchy target_de_jure_regions_above = yes ignore_effect = change_title_holder valid_to_start = { scope:target = { is_landless_type_title = no - tier = tier_county - } - scope:attacker = { # The attacker has a County in an uncreated Duchy - any_sub_realm_title = { - tier = tier_county - duchy = { - is_title_created = no - any_in_de_jure_hierarchy = { - this = scope:target - } + is_title_created = no + any_de_jure_county = { + holder = { + target_is_same_character_or_above = scope:attacker } } } + ai_aggressive_cb_constraints = yes } allowed_for_character_display_regardless = { @@ -936,20 +622,7 @@ ducal_conquest_cb = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_county_conquest_war_invalidated_message @@ -999,10 +672,7 @@ ducal_conquest_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -1013,69 +683,13 @@ ducal_conquest_cb = { add_claim_on_loss = yes } - # EP3 Laamp possibility warning - scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } - - # go through the dejure hierarchy under target titles, transfer titles with same or worse tolerance holders (their religion equaly or less tolerated than the defender's), - # take the holder as vassal otherwise and don't go deeper + # go through the dejure hierarchy under target titles, transfer eligible vassals and seize counties from ineligible ones every_in_list = { list = target_titles custom_tooltip = CONQUEST_CB_TITLE - every_in_de_jure_hierarchy = { - continue = { - OR = { - NOT = { - exists = holder - } - NOT = { - holder = { - target_is_liege_or_above = scope:defender - } - } - AND = { - scope:attacker.faith = { - faith_hostility_level_comparison = { - prev.holder.faith <= scope:defender.faith - } - } - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - tier > tier_county - } - limit = { - tier = tier_county - holder ?= { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - if = { - limit = { - OR = { - scope:attacker.faith = { - faith_hostility_level_comparison = { - prev.holder.faith >= scope:defender.faith - } - } - holder.primary_title.tier >= scope:attacker.primary_title.tier - } - } - add_to_temporary_list = titles_taken - } - else = { - holder = { - add_to_temporary_list = vassals_taken - } - } + conquest_cb_title_transfer = { + RELIGIOUS_WAR = yes } } @@ -1114,18 +728,6 @@ ducal_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -1139,7 +741,7 @@ ducal_conquest_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { @@ -1156,11 +758,6 @@ ducal_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1183,19 +780,15 @@ ducal_conquest_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_low_effect = yes # Prestige for Defender add_prestige_war_defender_effect = { PRESTIGE_VALUE = medium_prestige_value - } + } } # Prestige loss for the attacker @@ -1217,19 +810,6 @@ ducal_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } transfer_behavior = transfer @@ -1249,7 +829,7 @@ ducal_conquest_cb = { use_de_jure_wargoal_only = yes attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 @@ -1270,7 +850,7 @@ ireland_laudabiliter_conquest_cb = { combine_into_one = yes should_show_war_goal_subview = yes mutually_exclusive_titles = { always = yes } - + attacker_score_from_occupation_scale = 150 attacker_score_from_battles_scale = 150 defender_score_from_battles_scale = 150 @@ -1283,24 +863,18 @@ ireland_laudabiliter_conquest_cb = { } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } target_titles = all - target_title_tier = all + target_title_tier = county target_de_jure_regions_above = yes ignore_effect = change_title_holder ai_only_against_neighbors = yes valid_to_start = { scope:target = { - tier = tier_county is_landless_type_title = no - scope:attacker.house = { # + scope:attacker.house = { has_house_modifier = ireland_laudabiliter_modifier } title_province = { geographical_region = custom_roman_hibernia } @@ -1317,20 +891,7 @@ ireland_laudabiliter_conquest_cb = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated = { @@ -1338,30 +899,13 @@ ireland_laudabiliter_conquest_cb = { cost = { piety = { - value = 0 add = common_cb_impious_piety_cost - if = { - limit = { - scope:defender.faith = scope:attacker.faith - } - add = { - value = 25 - desc = CB_SAME_FAITH_COST - } - } + add = county_cb_piety_base_cost multiply = common_cb_piety_cost_multiplier } prestige = { value = 0 - if = { - limit = { - scope:defender.faith != scope:attacker.faith - } - add = { - value = 50 - desc = CB_COST_DIFFERENT_FAITH - } - } + add = county_cb_prestige_base_cost multiply = common_cb_prestige_cost_multiplier } } @@ -1385,10 +929,7 @@ ireland_laudabiliter_conquest_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -1399,69 +940,13 @@ ireland_laudabiliter_conquest_cb = { add_claim_on_loss = yes } - # EP3 Laamp possibility warning - scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } - - # go through the dejure hierarchy under target titles, transfer titles with same or worse tolerance holders (their religion equaly or less tolerated than the defender's), - # take the holder as vassal otherwise and don't go deeper + # go through the dejure hierarchy under target titles, transfer eligible vassals and seize counties from ineligible ones every_in_list = { list = target_titles custom_tooltip = CONQUEST_CB_TITLE - every_in_de_jure_hierarchy = { - continue = { - OR = { - NOT = { - exists = holder - } - NOT = { - holder = { - target_is_liege_or_above = scope:defender - } - } - AND = { - scope:attacker.faith = { - faith_hostility_level_comparison = { - prev.holder.faith <= scope:defender.faith - } - } - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - tier > tier_county - } - limit = { - tier = tier_county - holder ?= { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - if = { - limit = { - OR = { - scope:attacker.faith = { - faith_hostility_level_comparison = { - prev.holder.faith >= scope:defender.faith - } - } - holder.primary_title.tier >= scope:attacker.primary_title.tier - } - } - add_to_temporary_list = titles_taken - } - else = { - holder = { - add_to_temporary_list = vassals_taken - } - } + conquest_cb_title_transfer = { + RELIGIOUS_WAR = yes } } @@ -1500,18 +985,6 @@ ireland_laudabiliter_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -1525,7 +998,7 @@ ireland_laudabiliter_conquest_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { @@ -1542,11 +1015,6 @@ ireland_laudabiliter_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1569,14 +1037,9 @@ ireland_laudabiliter_conquest_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_low_effect = yes # Prestige for Defender @@ -1604,19 +1067,6 @@ ireland_laudabiliter_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } on_invalidated_desc = msg_county_conquest_war_invalidated_message @@ -1638,7 +1088,7 @@ ireland_laudabiliter_conquest_cb = { use_de_jure_wargoal_only = yes attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 diff --git a/common/casus_belli_types/00_dejure_war.txt b/common/casus_belli_types/00_dejure_war.txt index eeb4f46a5..9751fa606 100644 --- a/common/casus_belli_types/00_dejure_war.txt +++ b/common/casus_belli_types/00_dejure_war.txt @@ -18,7 +18,7 @@ allowed_for_character_display_regardless = { tgp_japan_offensive_wars_ban_trigger = yes } - + allowed_against_character = { scope:attacker = { has_de_jure_claim_on = scope:defender @@ -39,10 +39,7 @@ scope:target = { any_this_title_or_de_jure_above = { holder ?= { - OR = { - this = scope:attacker - target_is_liege_or_above = scope:attacker - } + target_is_same_character_or_above = scope:attacker } } } @@ -56,9 +53,9 @@ prestige = { value = 0 # scale base value based on number of counties x 100 - add = { - every_in_list = { - list = target_titles + add = { + every_in_list = { + list = target_titles limit = { tier = tier_county OR = { @@ -89,7 +86,7 @@ } on_invalidated_desc = msg_de_jure_all_war_invalidated_message - + on_invalidated = { } @@ -101,14 +98,11 @@ } desc = de_jure_cb_victory_desc } - + } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -118,13 +112,13 @@ de_jure_liege.holder = { save_scope_as = temp_de_jure_liege } add_hook_from_temp_de_jure_liege_to_attacker = yes } - + create_title_and_vassal_change = { type = conquest save_scope_as = change add_claim_on_loss = yes } - + # Setup and execute the changes to titles and vassals. setup_de_jure_cb = { attacker = scope:attacker @@ -144,18 +138,6 @@ WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - - # truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -166,11 +148,11 @@ } desc = de_jure_cb_white_peace_desc } - + } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -187,10 +169,6 @@ value = scope:cb_prestige_factor # Set by 'setup_de_jure_cb' multiply = -5.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -201,18 +179,6 @@ WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - # Defender neither gains nor loses any prestige. - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -228,17 +194,13 @@ desc = de_jure_cb_defeat_desc } - + } - + on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_med_effect = yes } @@ -267,40 +229,26 @@ WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + transfer_behavior = transfer - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "DEJURE_CB_WAR_NAME" war_name_base = "DEJURE_CB_WAR_NAME_BASE" cb_name = DEJURE_CB_NAME interface_priority = 100 - + attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 - + max_ai_diplo_distance_to_title = 500 ai_score_mult = { @@ -314,7 +262,7 @@ individual_county_de_jure_cb = { icon = individual_county_de_jure_cb group = de_jure - + combine_into_one = yes should_show_war_goal_subview = yes mutually_exclusive_titles = { always = yes } @@ -342,40 +290,23 @@ individual_county_de_jure_cb = { } } target_titles = all - target_title_tier = all + target_title_tier = county target_de_jure_regions_above = yes ignore_effect = change_title_holder ai_only_against_neighbors = yes - + valid_to_start = { scope:target = { - tier = tier_county any_this_title_or_de_jure_above = { holder ?= { - OR = { - this = scope:attacker - target_is_liege_or_above = scope:attacker - } + target_is_same_character_or_above = scope:attacker } } } } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = { @@ -396,7 +327,7 @@ individual_county_de_jure_cb = { desc = msg_de_jure_county_war_invalidated_message } - + } on_invalidated = { @@ -431,14 +362,11 @@ individual_county_de_jure_cb = { desc = individual_county_de_jure_cb_victory_desc } - + } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winnning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -453,18 +381,18 @@ individual_county_de_jure_cb = { } add_hook_from_temp_de_jure_liege_to_attacker = yes } - + create_title_and_vassal_change = { type = conquest save_scope_as = change add_claim_on_loss = yes } - + every_in_list = { list = target_titles save_temporary_scope_as = target } - + setup_de_jure_cb = { attacker = scope:attacker defender = scope:defender @@ -472,7 +400,7 @@ individual_county_de_jure_cb = { title = scope:target } resolve_title_and_vassal_change = scope:change - + # Attacker gets Prestige Experience, Defender loses Prestige, all other participants gain Prestige based on their war contribution. modify_all_participants_fame_values = { WINNER = scope:attacker @@ -484,18 +412,6 @@ individual_county_de_jure_cb = { WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - - # truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -507,11 +423,11 @@ individual_county_de_jure_cb = { desc = individual_county_de_jure_cb_white_peace_desc } - + } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Create an 'helper' de jure CB which we won't execute, but can use to determine how much Prestige should be given to war participants. every_in_list = { list = target_titles @@ -538,13 +454,6 @@ individual_county_de_jure_cb = { WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - # Defender neither gains nor loses any prestige. - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -560,19 +469,15 @@ individual_county_de_jure_cb = { desc = individual_county_de_jure_cb_defeat_desc } - + } - + on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - + on_defeat_aggressive_war_effect = yes + scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy - accolade_defender_war_end_glory_gain_low_effect = yes + accolade_defender_war_end_glory_gain_low_effect = yes } # Attacker must pay the defender war reparations. @@ -604,41 +509,27 @@ individual_county_de_jure_cb = { WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + transfer_behavior = transfer - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "DEJURE_CB_WAR_SPECIFIC_NAME" war_name_base = "DEJURE_CB_WAR_SPECIFIC_NAME_BASE" cb_name = DEJURE_CB_COUNTY_NAME cb_name_no_target = DEJURE_CB_COUNTY_NAME_GENERIC interface_priority = 99 # Below the "take all" one - + attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 - + max_ai_diplo_distance_to_title = 500 ai_score_mult = { @@ -653,11 +544,11 @@ individual_duchy_de_jure_cb = { icon = individual_duchy_de_jure_cb group = de_jure should_check_for_interface_availability = no # Covered by the county dejure cb - + combine_into_one = yes should_show_war_goal_subview = yes mutually_exclusive_titles = { always = yes } - + allowed_for_character = { scope:attacker = { culture ?= { @@ -681,43 +572,20 @@ individual_duchy_de_jure_cb = { } } target_titles = all - target_title_tier = all + target_title_tier = duchy target_de_jure_regions_above = yes ignore_effect = change_title_holder ai_only_against_neighbors = yes - + valid_to_start = { scope:target = { - tier = tier_duchy any_this_title_or_de_jure_above = { holder ?= { - OR = { - this = scope:attacker - target_is_liege_or_above = scope:attacker - } - } - } - } - scope:target = { - trigger_if = { - limit = { - scope:attacker = { - is_ai = yes - } - } - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - count >= 2 - tier = tier_county - holder ?= { - OR = { - this = scope:defender - is_vassal_or_below_of = scope:defender - } - } + target_is_same_character_or_above = scope:attacker } } } + ai_aggressive_cb_constraints = yes } cost = { @@ -751,20 +619,7 @@ individual_duchy_de_jure_cb = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = { @@ -792,7 +647,7 @@ individual_duchy_de_jure_cb = { on_declaration = { on_declared_war = yes - } + } on_victory_desc = { first_valid = { @@ -803,14 +658,11 @@ individual_duchy_de_jure_cb = { desc = de_jure_cb_victory_desc } - + } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -818,22 +670,22 @@ individual_duchy_de_jure_cb = { every_in_list = { list = target_titles limit = { exists = holder } - + holder = { save_scope_as = temp_de_jure_liege } add_hook_from_temp_de_jure_liege_to_attacker = yes } - + create_title_and_vassal_change = { type = conquest save_scope_as = change add_claim_on_loss = yes } - + every_in_list = { list = target_titles save_temporary_scope_as = target } - + setup_de_jure_cb = { attacker = scope:attacker defender = scope:defender @@ -853,18 +705,6 @@ individual_duchy_de_jure_cb = { WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - - # truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -875,12 +715,10 @@ individual_duchy_de_jure_cb = { } desc = de_jure_cb_white_peace_desc } - - } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -911,13 +749,6 @@ individual_duchy_de_jure_cb = { WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - # Defender neither gains nor loses any prestige. - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -933,19 +764,15 @@ individual_duchy_de_jure_cb = { desc = de_jure_cb_defeat_desc } - + } - + on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - + on_defeat_aggressive_war_effect = yes + scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy - accolade_defender_war_end_glory_gain_med_effect = yes + accolade_defender_war_end_glory_gain_med_effect = yes } # Attacker must pay the defender war reparations. @@ -977,41 +804,27 @@ individual_duchy_de_jure_cb = { WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + transfer_behavior = transfer - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "DEJURE_CB_WAR_SPECIFIC_NAME" war_name_base = "DEJURE_CB_WAR_SPECIFIC_NAME_BASE" cb_name = DEJURE_CB_DUCHY_NAME cb_name_no_target = DEJURE_CB_DUCHY_NAME_GENERIC interface_priority = 99 # Below the "take all" one - + attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 - + max_ai_diplo_distance_to_title = 500 ai_score_mult = { diff --git a/common/casus_belli_types/00_event_war.txt b/common/casus_belli_types/00_event_war.txt index 6b1ba8648..812ac9973 100644 --- a/common/casus_belli_types/00_event_war.txt +++ b/common/casus_belli_types/00_event_war.txt @@ -2238,7 +2238,7 @@ raiktor_claim_cb = { icon = claim_cb group = event - + should_show_war_goal_subview = yes mutually_exclusive_titles = { always = yes } allow_hostages = no @@ -2246,7 +2246,7 @@ raiktor_claim_cb = { allowed_for_character = {} allowed_for_character_display_regardless = {} - + allowed_against_character = {} target_titles = claim target_title_tier = all @@ -2256,14 +2256,23 @@ raiktor_claim_cb = { valid_to_start = { always = no } should_invalidate = { - + NOT = { + title:k_epirus ?= { + any_in_de_jure_hierarchy = { + tier >= tier_county + holder ?= { + target_is_same_character_or_above = scope:defender + } + } + } + } } on_invalidated_desc = msg_invasion_war_invalidated_message cost = {} - - on_declaration = { on_declared_war = yes } + + on_declaration = { on_declared_war = yes } on_victory_desc = { first_valid = { @@ -2280,13 +2289,13 @@ raiktor_claim_cb = { desc = claim_cb_victory_desc } } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } + on_victory_aggressive_war_effect = yes #EP2 Accolade glory gain from winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } - + custom_tooltip = you_gain_epirus scope:defender = { pay_short_term_gold = { @@ -2309,13 +2318,13 @@ raiktor_claim_cb = { add_to_list = epirus_titles } } - + create_title_and_vassal_change = { type = conquest save_scope_as = change_epirus add_claim_on_loss = yes } - + title:k_epirus = { if = { limit = { @@ -2335,7 +2344,7 @@ raiktor_claim_cb = { } } } - + every_in_list = { list = epirus_titles change_title_holder = { @@ -2346,66 +2355,11 @@ raiktor_claim_cb = { resolve_title_and_vassal_change = scope:change_epirus } - + custom_tooltip = raiktor_gains_byzantium - hidden_effect = { - create_title_and_vassal_change = { - type = conquest_claim - save_scope_as = change - add_claim_on_loss = yes - } - setup_claim_cb = { - titles = target_titles - attacker = scope:attacker - defender = scope:defender - claimant = scope:claimant - change = scope:change - } - - resolve_title_and_vassal_change = scope:change - } - - if = { - limit = { - scope:claimant != scope:attacker - scope:claimant.primary_title.tier < scope:attacker.primary_title.tier - scope:claimant = { - NOT = { target_is_liege_or_above = scope:attacker } - } - } - - create_title_and_vassal_change = { - type = conquest_claim - save_scope_as = change_two - add_claim_on_loss = yes - } - scope:claimant = { - change_liege = { - liege = scope:attacker - change = scope:change_two - } - } - resolve_title_and_vassal_change = scope:change_two - } - - if = { - limit = { - scope:claimant != scope:attacker - scope:attacker = { - can_add_hook = { - type = loyalty_hook - target = scope:claimant - } - } - } - scope:attacker = { - add_hook = { - target = scope:claimant - type = loyalty_hook - } - } - } + save_scope_as = hide_title_change + on_victory_claim_cb_effect = yes # Attacker gets Prestige Experience, Defender loses Prestige, all other participants gain Prestige based on their war contribution. modify_all_participants_fame_values = { @@ -2419,24 +2373,12 @@ raiktor_claim_cb = { LOSER_ALLY_FAME_SCALE = 10 } - # truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - hidden_effect = { scope:claimant = { remove_trait = devoted add_gold = 750 } } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -2447,40 +2389,15 @@ raiktor_claim_cb = { } desc = claim_cb_white_peace_desc } - } on_white_peace = { - scope:attacker = { - show_pow_release_message_effect = yes - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } - } + on_white_peace_effect = yes + on_white_peace_claim_cb_effect = yes #EP2 accolade glory gain for defender doing alright scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } - # press claims - every_in_list = { - list = target_titles - if = { - limit = { scope:claimant = { has_weak_claim_on = prev } } - scope:claimant = { - make_claim_strong = prev - } - } - } - - # Create an 'helper' claim CB which we won't execute, but can use to determine how much Prestige should be given to war participants. - setup_claim_cb = { - titles = target_titles - attacker = scope:attacker - defender = scope:defender - claimant = scope:claimant - victory = no - } # Prestige loss for the attacker scope:attacker = { add_prestige = { @@ -2496,36 +2413,6 @@ raiktor_claim_cb = { WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - # Defender neither gains nor loses any prestige. - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - if = { - limit = { - scope:claimant != scope:attacker - scope:attacker = { - can_add_hook = { - type = favor_hook - target = scope:claimant - } - } - } - scope:attacker = { - add_hook = { - target = scope:claimant - type = favor_hook - } - } - } - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -2544,58 +2431,24 @@ raiktor_claim_cb = { } desc = claim_cb_defeat_desc } - + } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat_aggressive_war_effect = yes + on_defeat_claim_cb_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_med_effect = yes } - # lose claims - every_in_list = { - list = target_titles - scope:claimant = { - remove_claim = prev - } - } - - if = { - limit = { - scope:claimant != scope:attacker - scope:attacker = { - can_add_hook = { - type = favor_hook - target = scope:claimant - } - } - } - scope:attacker = { - add_hook = { - target = scope:claimant - type = favor_hook - } - } - } - # Attacker pays gold to the defender as reparations. scope:attacker = { pay_short_term_gold_reparations_effect = { GOLD_VALUE = 3 } } - # Create an 'helper' claim CB which we won't execute, but can use to determine how much Prestige should be given to war participants. - setup_claim_cb = { - titles = target_titles - attacker = scope:attacker - defender = scope:defender - claimant = scope:claimant - victory = no - } # Attacker loses Prestige, all other war participants gain Prestige (Defender gains full prestige, all allies on both sides gain based on war contribution). modify_all_participants_fame_values = { WINNER = scope:defender @@ -2607,39 +2460,25 @@ raiktor_claim_cb = { WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + transfer_behavior = transfer - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "CLAIM_WAR_NAME" my_war_name = "CLAIM_WAR_NAME_MY" war_name_base = "CLAIM_WAR_NAME_BASE" cb_name = "CLAIM_CB_NAME" - + interface_priority = 100 - + attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 } @@ -2661,7 +2500,7 @@ raiktor_conquest_cb = { allowed_for_character = {} allowed_for_character_display_regardless = {} - + allowed_against_character = {} target_titles = all target_title_tier = all @@ -2671,14 +2510,14 @@ raiktor_conquest_cb = { valid_to_start = { always = no } should_invalidate = { - + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_invasion_war_invalidated_message cost = {} - - on_declaration = { on_declared_war = yes } + + on_declaration = { on_declared_war = yes } on_victory_desc = { first_valid = { @@ -2689,9 +2528,9 @@ raiktor_conquest_cb = { desc = county_conquest_cb_victory_desc } } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } @@ -2703,7 +2542,7 @@ raiktor_conquest_cb = { save_scope_as = vassal_to_be } } - + if = { limit = { exists = scope:vassal_to_be @@ -2713,9 +2552,8 @@ raiktor_conquest_cb = { else = { custom_tooltip = raiktor_vassal_backup_desc } - + hidden_effect = { - create_title_and_vassal_change = { type = conquest save_scope_as = change @@ -2729,7 +2567,7 @@ raiktor_conquest_cb = { take_occupied = no } resolve_title_and_vassal_change = scope:change - + if = { limit = { exists = scope:vassal_to_be @@ -2750,25 +2588,24 @@ raiktor_conquest_cb = { resolve_title_and_vassal_change = scope:change } - } - + if = { limit = { exists = scope:vassal_to_be scope:attacker = { can_add_hook = { - type = loyalty_hook - target = scope:vassal_to_be + type = loyalty_hook + target = scope:vassal_to_be } } } scope:attacker = { add_hook = { - target = scope:vassal_to_be - type = loyalty_hook - } + target = scope:vassal_to_be + type = loyalty_hook + } } } @@ -2784,24 +2621,12 @@ raiktor_conquest_cb = { LOSER_ALLY_FAME_SCALE = 10 } - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - hidden_effect = { scope:claimant = { remove_trait = devoted add_gold = 100 } } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -2813,9 +2638,9 @@ raiktor_conquest_cb = { desc = invasion_war_white_peace_desc } } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -2830,25 +2655,9 @@ raiktor_conquest_cb = { LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_white_peace_effect = yes - scope:attacker = { add_prestige = mongol_invasion_cb_prestige_white_peace - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -2860,12 +2669,11 @@ raiktor_conquest_cb = { desc = invasion_war_white_peace_desc } } - + on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat_aggressive_war_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -2880,7 +2688,7 @@ raiktor_conquest_cb = { multiply = -1.0 } } - + setup_invasion_cb = { titles = target_titles attacker = scope:attacker @@ -2900,44 +2708,31 @@ raiktor_conquest_cb = { WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - + imprison_character_effect = { TARGET = scope:attacker IMPRISONER = scope:defender } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + transfer_behavior = transfer - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "CONQUEST_WAR_NAME" war_name_base = "CONQUEST_WAR_NAME_BASE" cb_name = "CONQUEST_COUNTY_CB_NAME" - + interface_priority = 100 - + use_de_jure_wargoal_only = yes - + attacker_wargoal_percentage = 0.8 - + attacker_ticking_warscore_delay = { days = 0 } attacker_score_from_occupation_scale = 300 defender_score_from_occupation_scale = 300 @@ -2977,21 +2772,11 @@ fp1_scandi_adventurer_conquest = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_religious_war_invalidation_region_message - + on_invalidated = { scope:attacker = { clean_scandinavian_adventurer_effect = yes } } @@ -3027,9 +2812,8 @@ fp1_scandi_adventurer_conquest = { } on_victory = { - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - + on_victory_aggressive_war_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -3039,60 +2823,13 @@ fp1_scandi_adventurer_conquest = { add_claim_on_loss = yes } - # go through the dejure hierarchy under target titles, transfer titles with same or worse tolerance holders (their religion equally or less tolerated than the defender's), - # take the holder as vassal otherwise and don't go deeper + # go through the dejure hierarchy under target titles, transfer eligible vassals and seize counties from ineligible ones every_in_list = { list = target_titles custom_tooltip = CONQUEST_CB_TITLE - every_in_de_jure_hierarchy = { - continue = { - OR = { - NOT = { exists = holder } - NOT = { - holder = { target_is_liege_or_above = scope:defender } - } - AND = { - scope:attacker.faith = { - faith_hostility_level_comparison = { prev.holder.faith <= scope:defender.faith } - } - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - tier > tier_county - } - limit = { - tier <= tier_duchy - holder ?= { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - if = { - limit = { - OR = { - scope:attacker.faith = { - faith_hostility_level_comparison = { - prev.holder.faith >= scope:defender.faith - } - } - holder.primary_title.tier >= scope:attacker.primary_title.tier - } - } - add_to_temporary_list = titles_taken - } - else = { - holder = { - add_to_temporary_list = vassals_taken - } - } + conquest_cb_title_transfer = { + RELIGIOUS_WAR = no } } @@ -3131,21 +2868,6 @@ fp1_scandi_adventurer_conquest = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - #Clean-up adventurer things. - scope:attacker = { clean_scandinavian_adventurer_effect = yes } - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -3159,6 +2881,8 @@ fp1_scandi_adventurer_conquest = { } on_white_peace = { + on_white_peace_effect = yes + #EP2 accolade glory gain for doing ok against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -3179,16 +2903,11 @@ fp1_scandi_adventurer_conquest = { LOSER_ALLY_FAME_SCALE = 1 } - add_truce_white_peace_effect = yes - #Clean-up adventurer things. scope:attacker = { clean_scandinavian_adventurer_effect = yes } # Since they failed to win, take away their efficacy loan. scope:attacker = { remove_short_term_gold = scandinavian_adventurer_efficacy_loan_value } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -3211,11 +2930,9 @@ fp1_scandi_adventurer_conquest = { } on_defeat = { - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat_aggressive_war_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_med_effect = yes } @@ -3248,14 +2965,6 @@ fp1_scandi_adventurer_conquest = { LOSER_ALLY_FAME_SCALE = 1 } - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - - on_lost_aggression_war_discontent_loss = yes - # Give scope:defender some goodies. scope:defender = { # Including a break from the fighting. @@ -3309,12 +3018,6 @@ fp1_scandi_adventurer_conquest = { # Since they lost, take away their efficacy loan. scope:attacker = { remove_short_term_gold = scandinavian_adventurer_efficacy_loan_value } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } transfer_behavior = transfer @@ -3334,7 +3037,7 @@ fp1_scandi_adventurer_conquest = { use_de_jure_wargoal_only = yes attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 } @@ -3356,17 +3059,22 @@ diarch_vassalisation_cb = { should_invalidate = { scope:attacker = { + OR = { # No longer same realm. top_liege != scope:defender.top_liege # No longer of a suitable tier. - highest_held_title_tier <= scope:secondary_recipient.highest_held_title_tier + any_in_list = { + list = target_titles + holder ?= { highest_held_title_tier >= scope:attacker.highest_held_title_tier } + } } + } } - + on_declaration = { on_declared_war = yes } - + on_invalidated_desc = msg_vassalization_war_invalidated_message - + on_invalidated = {} on_victory_desc = { @@ -3382,16 +3090,13 @@ diarch_vassalisation_cb = { desc = diarch_vassalization_cb_victory_desc } } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } - + create_title_and_vassal_change = { type = conquest save_scope_as = change @@ -3403,7 +3108,7 @@ diarch_vassalisation_cb = { change = scope:change } resolve_title_and_vassal_change = scope:change - + # Prestige level progress for the attacker scope:attacker = { add_prestige_experience = { @@ -3427,15 +3132,6 @@ diarch_vassalisation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -3447,19 +3143,15 @@ diarch_vassalisation_cb = { desc = diarch_vassalization_cb_white_peace_desc } } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -3470,18 +3162,6 @@ diarch_vassalisation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -3502,19 +3182,15 @@ diarch_vassalisation_cb = { desc = diarch_vassalization_cb_white_peace_desc } } - - on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat = { + on_defeat_aggressive_war_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_low_effect = yes } - + # Prestige loss for the attacker scope:attacker = { pay_short_term_gold_reparations_effect = { @@ -3541,40 +3217,25 @@ diarch_vassalisation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:attacker = { - save_temporary_scope_as = loser - } - - # Truce - add_truce_attacker_defeat_effect = yes - - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "DIARCH_VASSALIZATION_WAR_NAME" war_name_base = "DIARCH_VASSALIZATION_WAR_NAME_BASE" cb_name = "DIARCH_VASSALIZATION_CB_NAME" interface_priority = 59 - + ticking_war_score_targets_entire_realm = yes max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 attacker_ticking_warscore = 0 attacker_wargoal_percentage = 0.8 - + max_ai_diplo_distance_to_title = 500 } @@ -3604,10 +3265,17 @@ remove_regent_cb = { ignore_effect = change_title_holder valid_to_start = { always = no } - should_invalidate = {} + should_invalidate = { + scope:attacker = { + any_liege_or_above = { + has_active_diarchy = yes + diarch = scope:defender + } + } + } on_invalidated_desc = msg_remove_regent_cb_invalidated_message - + on_invalidated = { #remove the temporary fort level root.war.var:barony_with_temporary_fort ?= { remove_province_modifier = temporary_fort_province_modifier } @@ -3630,11 +3298,11 @@ remove_regent_cb = { add_province_modifier = temporary_fort_province_modifier } } - } - war ?= { - set_variable = { - name = barony_with_temporary_fort - value = scope:defender_capital + war ?= { + set_variable = { + name = barony_with_temporary_fort + value = scope:defender_capital + } } } } @@ -3652,7 +3320,9 @@ remove_regent_cb = { } on_victory = { - # Scope:attacker imprisons the diarch instead. + on_victory_effect = yes + + # scope:attacker imprisons the diarch instead. imprison_character_effect = { TARGET = scope:defender IMPRISONER = scope:attacker @@ -3697,15 +3367,6 @@ remove_regent_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -3719,6 +3380,7 @@ remove_regent_cb = { } on_white_peace = { + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -3728,10 +3390,6 @@ remove_regent_cb = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -3756,15 +3414,7 @@ remove_regent_cb = { } } } - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -3778,8 +3428,9 @@ remove_regent_cb = { } on_defeat = { - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_med_effect = yes } @@ -3828,14 +3479,6 @@ remove_regent_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } transfer_behavior = transfer @@ -3853,7 +3496,7 @@ remove_regent_cb = { interface_priority = 79 attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 } diff --git a/common/casus_belli_types/00_invasion_war.txt b/common/casus_belli_types/00_invasion_war.txt index 2d6f8de4f..30b95a24b 100644 --- a/common/casus_belli_types/00_invasion_war.txt +++ b/common/casus_belli_types/00_invasion_war.txt @@ -17,10 +17,7 @@ has_character_flag = bp2_inspired_culture_for_conquest has_variable = mpo_desperate_stance_invasion_cb_enable_var ai_should_get_extreme_conqueror_bonuses = yes - AND = { - house ?= { has_house_head_parameter = has_mandala_invasion_cb } - is_house_head = yes - } + has_mandala_invasion_cb_trigger = yes } trigger_if = { limit = { ai_should_get_extreme_conqueror_bonuses = no } @@ -32,16 +29,11 @@ allowed_for_character_display_regardless = { trigger_if = { limit = { - has_character_flag = bp2_inspired_culture_for_conquest ai_should_get_extreme_conqueror_bonuses = no } - prestige_level >= 0 - } - trigger_else_if = { - limit = { - government_has_flag = government_is_clan - house ?= { - has_house_unity_stage = antagonistic + trigger_if = { + limit = { + has_character_flag = bp2_inspired_culture_for_conquest } culture ?= { has_cultural_parameter = cb_lower_prestige_level_requirement @@ -65,13 +57,6 @@ } ai_should_get_extreme_conqueror_bonuses = no } - prestige_level >= 3 - } - trigger_else_if = { - limit = { ai_should_get_extreme_conqueror_bonuses = yes } - } - trigger_else = { - prestige_level >= 4 } custom_tooltip = { @@ -80,14 +65,9 @@ } tgp_japan_offensive_wars_ban_trigger = yes } - + allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } target_titles = all target_title_tier = kingdom @@ -114,49 +94,22 @@ valid_to_start = { scope:target = { + is_landless_type_title = no any_in_de_jure_hierarchy = { tier = tier_county neighboring_county_or_viking_conquest_trigger = { CHARACTER = root } } } - scope:target = { - trigger_if = { - limit = { - scope:attacker = { - is_ai = yes - } - } - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - count >= 4 - tier = tier_county - holder ?= { - OR = { - this = scope:defender - is_vassal_or_below_of = scope:defender - } - } - } - } - } + ai_aggressive_cb_constraints = yes } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + # you can still invasion outside the target + # war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_invasion_war_invalidated_message - + on_invalidated = { scope:attacker = { if = { @@ -173,11 +126,7 @@ if = { limit = { scope:attacker = { - NOT = { - government_has_flag = government_is_mandala - house ?= { has_house_head_parameter = has_mandala_invasion_cb } - is_house_head = yes - } + has_mandala_invasion_cb_trigger = no } } value = common_cb_impious_piety_cost @@ -194,9 +143,7 @@ if = { limit = { scope:attacker = { - government_has_flag = government_is_mandala - house ?= { has_house_head_parameter = has_mandala_invasion_cb } - is_house_head = yes + has_mandala_invasion_cb_trigger = yes } } value = 0 @@ -210,13 +157,13 @@ } } } - + on_declaration = { on_declared_war = yes scope:attacker = { add_character_flag = used_lifetime_invasion } - } + } on_victory_desc = { first_valid = { @@ -231,15 +178,9 @@ desc = invasion_war_warning_desc } } - - on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - # Influence - add_influence_attacker_victory_effect = yes + on_victory = { + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } @@ -250,32 +191,8 @@ add_claim_on_loss = yes } - show_as_tooltip = { - every_in_list = { - list = target_titles - custom_tooltip = invasion_title_transfer_tt - custom_tooltip = invasion_title_transfer_2_tt - every_in_de_jure_hierarchy = { - limit = { holder.top_liege = scope:defender } - change_title_holder = { - holder = scope:attacker - change = scope:change - } - } - } - scope:defender = { - every_sub_realm_county = { - limit = { - county_controller = scope:attacker - } - change_title_holder = { - holder = scope:attacker - change = scope:change - } - } - } - } - + on_victory_invasion_cb_take_occupied_tooltip = { VASSALIZE = no } + hidden_effect = { setup_invasion_cb = { titles = target_titles @@ -298,18 +215,6 @@ WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -321,9 +226,9 @@ desc = invasion_war_white_peace_desc } } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -338,25 +243,9 @@ LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_white_peace_effect = yes - scope:attacker = { add_prestige = mongol_invasion_cb_prestige_white_peace - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -370,16 +259,9 @@ } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes - # Influence - add_influence_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -394,7 +276,7 @@ multiply = -1.0 } } - + setup_invasion_cb = { titles = target_titles attacker = scope:attacker @@ -414,39 +296,26 @@ WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + transfer_behavior = transfer - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "INVASION_WAR_NAME" war_name_base = "INVASION_WAR_NAME_BASE" cb_name = "INVASION_CB_NAME" - + interface_priority = 100 - + use_de_jure_wargoal_only = yes - + attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 } @@ -461,7 +330,7 @@ clan_invasion_war = { allow_hostages = no allowed_for_character = { - government_has_flag = government_is_clan + government_has_flag = government_uses_house_unity NAND = { house ?= { has_house_unity_parameter = unity_disable_invasions @@ -530,17 +399,12 @@ clan_invasion_war = { } tgp_japan_offensive_wars_ban_trigger = yes } - + allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } target_titles = all - target_title_tier = all + target_title_tier = kingdom target_de_jure_regions_above = yes ignore_effect = change_title_holder ai_only_against_neighbors = yes @@ -559,52 +423,20 @@ clan_invasion_war = { multiply = zealous_war_on_head_of_faith_ai_score_value add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing } - + valid_to_start = { scope:target = { - tier = tier_kingdom - } - scope:target = { - trigger_if = { - limit = { - scope:attacker = { - is_ai = yes - } - } - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - count >= 5 - tier = tier_county - holder ?= { - OR = { - this = scope:defender - is_vassal_or_below_of = scope:defender - } - } - } - } + is_landless_type_title = no } + ai_aggressive_cb_constraints = yes } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_invasion_war_invalidated_message - + on_invalidated = { scope:attacker = { remove_character_flag = pending_lifetime_invasion # If the war is invalidated, you should be permitted to try again @@ -624,7 +456,7 @@ clan_invasion_war = { } add = { value = 20 - multiply = scope:attacker.realm_size + multiply = scope:attacker.sub_realm_size desc = CB_REALM_SIZE_COST max = 5000 } @@ -632,7 +464,7 @@ clan_invasion_war = { multiply = common_cb_prestige_cost_multiplier } } - + on_declaration = { on_declared_war = yes scope:attacker = { @@ -642,7 +474,7 @@ clan_invasion_war = { years = unity_antagonistic_invasion_cooldown_value } } - } + } on_victory_desc = { first_valid = { @@ -653,8 +485,8 @@ clan_invasion_war = { desc = clan_invasion_war_victory_desc } triggered_desc = { - trigger = { - scope:attacker = { + trigger = { + scope:attacker = { is_local_player = yes #Let's not display this warning if you have unlimited invasions NOT = { @@ -665,12 +497,9 @@ clan_invasion_war = { desc = invasion_war_warning_desc } } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } @@ -691,54 +520,8 @@ clan_invasion_war = { } } - show_as_tooltip = { - every_in_list = { - list = target_titles - if = { - limit = { - scope:defender.primary_title.tier >= scope:attacker.primary_title.tier - } - custom_tooltip = invasion_title_transfer_tt - custom_tooltip = invasion_title_transfer_2_tt - } - every_in_de_jure_hierarchy = { - limit = { - holder.top_liege = scope:defender - } - change_title_holder = { - holder = scope:attacker - change = scope:change - } - } - } - scope:defender = { - every_sub_realm_county = { - limit = { - county_controller = scope:attacker - } - change_title_holder = { - holder = scope:attacker - change = scope:change - } - } - # Vassal transfer tooltip for display - every_vassal = { - limit = { - primary_title = { - any_this_title_or_de_jure_above = { - is_in_list = target_titles - } - } - } - custom = invasion_vassal_transfer_tt - change_liege = { - liege = scope:attacker - change = scope:change - } - } - } - } - + on_victory_invasion_cb_take_occupied_tooltip = { VASSALIZE = yes } + #If target is lower tier, vassalise them. if = { limit = { @@ -754,7 +537,7 @@ clan_invasion_war = { #If target has any personally-held titles of equal tier, excepting empires take them. #If target is equal tier, - if = { + else_if = { limit = { #Conquering, or indirectly butchering, an entire empire in one war is a bit much. scope:defender.primary_title.tier < tier_empire @@ -763,8 +546,8 @@ clan_invasion_war = { every_in_list = { list = target_titles limit = { - holder.top_liege = scope:defender - } + holder.top_liege = scope:defender + } change_title_holder = { holder = scope:attacker change = scope:change @@ -800,18 +583,6 @@ clan_invasion_war = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -823,9 +594,9 @@ clan_invasion_war = { desc = invasion_war_white_peace_desc } } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -840,27 +611,11 @@ clan_invasion_war = { LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_white_peace_effect = yes - scope:attacker = { add_prestige = mongol_invasion_cb_prestige_white_peace - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } add_character_flag = used_lifetime_invasion remove_character_flag = pending_lifetime_invasion } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -872,15 +627,11 @@ clan_invasion_war = { desc = invasion_war_white_peace_desc } } - - on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat = { + on_defeat_aggressive_war_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -895,7 +646,7 @@ clan_invasion_war = { multiply = -1.0 } } - + setup_invasion_cb = { titles = target_titles attacker = scope:attacker @@ -915,43 +666,34 @@ clan_invasion_war = { WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - add_truce_attacker_defeat_effect = yes - + scope:attacker = { save_temporary_scope_as = loser add_character_flag = used_lifetime_invasion remove_character_flag = pending_lifetime_invasion } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + transfer_behavior = transfer - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "INVASION_WAR_NAME" war_name_base = "INVASION_WAR_NAME_BASE" cb_name = "CLAN_INVASION_CB_NAME" - + interface_priority = 100 - + use_de_jure_wargoal_only = yes - + attacker_wargoal_percentage = 0.8 max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 - + max_ai_diplo_distance_to_title = 500 } diff --git a/common/casus_belli_types/00_religious_war.txt b/common/casus_belli_types/00_religious_war.txt index e0b74ac3b..36bb1f6e1 100644 --- a/common/casus_belli_types/00_religious_war.txt +++ b/common/casus_belli_types/00_religious_war.txt @@ -11,7 +11,7 @@ combine_into_one = yes should_show_war_goal_subview = yes mutually_exclusive_titles = { always = yes } - + attacker_score_from_occupation_scale = 150 attacker_score_from_battles_scale = 150 defender_score_from_battles_scale = 150 @@ -30,12 +30,15 @@ } allowed_for_character_display_regardless = { - #Piety level reqs should be ignored if this is an interaction - trigger_if = { - limit = { - NOT = { has_character_flag = holy_war_incited } - } + tgp_japan_offensive_wars_ban_trigger = yes + } + allowed_against_character_display_regardless = { + scope:attacker = { + #Piety level reqs should be ignored if this is an interaction trigger_if = { + limit = { has_character_flag = holy_war_incited } + } + trigger_else_if = { limit = { highest_held_title_tier >= tier_kingdom } @@ -96,26 +99,23 @@ } } } - tgp_japan_offensive_wars_ban_trigger = yes } - allowed_against_character = { scope:attacker = { - is_valid_religious_war_target_trigger = { TARGET = scope:defender } ALL_FALSE = { top_liege = scope:defender.top_liege liege = scope:defender } + is_valid_religious_war_target_trigger = { TARGET = scope:defender } } } target_titles = neighbor_land_or_water - target_title_tier = all + target_title_tier = county target_de_jure_regions_above = yes ignore_effect = change_title_holder valid_to_start = { scope:target = { - tier = tier_county is_landless_type_title = no } # Filter for struggles @@ -142,23 +142,9 @@ should_invalidate = { OR = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes #Faith change does not immediately invalidate, it's run through event war_event.3100 - scope:war = { exists = var:invalidate_defender_faith_change } - scope:war = { exists = var:invalidate_attacker_faith_change } + religious_war_should_invalidate_faith_change_trigger = yes } } @@ -166,31 +152,13 @@ first_valid = { triggered_desc = { trigger = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } desc = msg_religious_war_invalidation_region_message } triggered_desc = { trigger = { - scope:war = { - OR = { - exists = var:invalidate_defender_faith_change - exists = var:invalidate_attacker_faith_change - } - } + religious_war_should_invalidate_faith_change_trigger = yes } desc = msg_religious_war_invalidated_hostility_level_message } @@ -200,46 +168,9 @@ on_invalidated = { pam_notify_holy_war_instigator_effect_draw = yes } - + ai_score_mult = { value = 1 - # Increase odds if the character is a vassal with Ghazi Contract - add = { - if = { - limit = { - scope:attacker = { - top_liege != this - vassal_contract_has_flag = vassal_contract_cheaper_religious_war - } - } - add = 1 - } - } - - # As a feudal gov, do not attack owner of tribal holdings if you have a tribal holding to convert already - add = { - every_in_list = { - list = target_titles - if = { - limit = { feudal_clan_tribal_conquest_constraints = yes } - add = -1000 - } - } - } - - # Holy War are limited to connected neighbour to limit big empire expansions over weak realms. - add = { - if = { - limit = { religious_war_vassals_constraints = yes } - add = -1000 - } - } - # HOUSE RELATIONS - add = house_relation_ai_score_value - # AI in struggles act insularly for wars that don't have a familial or legal basis. - multiply = struggle_wars_prioritise_struggle_targets_value - # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. - multiply = byzantium_conquests_ai_score_value add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing } @@ -252,41 +183,7 @@ } multiply = common_cb_piety_cost_multiplier multiply = holy_war_cb_piety_cost_multiplier - if = { - limit = { - scope:attacker = { - top_participant_group:the_christian_church ?= { - has_participant_group_parameter = the_christian_church_cheaper_religious_wars - } - } - } - multiply = { - value = 0.75 - desc = pam_the_christian_church_cheaper_religious_wars_desc - } - } - if = { - limit = { - scope:attacker = { - any_active_accolade = { - accolade_parameter = acclaimed_knight_piety_from_battle - } - } - } - multiply = accolade_piety_reduction_value - min = 10 - } - if = { - limit = { - scope:attacker = { - any_active_accolade = { - accolade_parameter = acclaimed_knight_piety_from_battle_high - } - } - } - multiply = accolade_piety_reduction_value_high - min = 10 - } + min = 10 #Inciting cleric paid piety cost if = { limit = { @@ -318,11 +215,8 @@ on_victory = { pam_notify_holy_war_instigator_effect_win = yes - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - + on_victory_aggressive_war_effect = yes + #EP2 accolade glory gain from winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -332,9 +226,6 @@ add_claim_on_loss = yes } - # EP3 Laamp possibility warning - scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } - # go through the dejure hierarchy under target titles, transfer titles with same or worse tolerance holders (their religion equaly or less tolerated than the defender's), # take the holder as vassal otherwise and don't go deeper every_in_list = { @@ -353,7 +244,7 @@ change = scope:change } } - + every_in_list = { list = titles_taken change_title_holder = { @@ -412,18 +303,6 @@ desc = fervor_gain_religious_war } } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -432,7 +311,7 @@ on_white_peace = { pam_notify_holy_war_instigator_effect_draw = yes - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Allies on both sides get full prestige value for helping in the war, based on their war participation. modify_allies_of_participants_fame_values = { @@ -443,25 +322,9 @@ LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_white_peace_effect = yes - scope:attacker = { add_piety = religious_cb_piety_white_peace - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -470,13 +333,9 @@ on_defeat = { pam_notify_holy_war_instigator_effect_loss = yes - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -542,15 +401,10 @@ add_truce_attacker_defeat_effect = yes scope:attacker = { - save_temporary_scope_as = loser + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 2 + } } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } on_primary_attacker_death = inherit @@ -571,7 +425,7 @@ use_de_jure_wargoal_only = yes attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 @@ -591,7 +445,7 @@ religious_war = { combine_into_one = yes should_show_war_goal_subview = yes mutually_exclusive_titles = { always = yes } - + attacker_score_from_occupation_scale = 150 attacker_score_from_battles_scale = 150 defender_score_from_battles_scale = 150 @@ -604,19 +458,23 @@ religious_war = { has_doctrine_parameter = holy_wars_forbidden } } - NOR = { + NOR = { government_has_flag = government_is_nomadic government_has_flag = government_is_celestial } } allowed_for_character_display_regardless = { - #Piety level reqs should be ignored if this is an interaction - trigger_if = { - limit = { - NOT = { has_character_flag = holy_war_incited } - } + tgp_japan_offensive_wars_ban_trigger = yes + } + + allowed_against_character_display_regardless = { + scope:attacker = { + #Piety level reqs should be ignored if this is an interaction trigger_if = { + limit = { has_character_flag = holy_war_incited } + } + trigger_else_if = { limit = { highest_held_title_tier >= tier_kingdom } @@ -677,48 +535,26 @@ religious_war = { } } } - tgp_japan_offensive_wars_ban_trigger = yes } - allowed_against_character = { scope:attacker = { - is_valid_religious_war_target_trigger = { TARGET = scope:defender } ALL_FALSE = { top_liege = scope:defender.top_liege liege = scope:defender } + is_valid_religious_war_target_trigger = { TARGET = scope:defender } } } target_titles = neighbor_land_or_water - target_title_tier = all + target_title_tier = duchy target_de_jure_regions_above = yes ignore_effect = change_title_holder valid_to_start = { scope:target = { - tier = tier_duchy is_landless_type_title = no } - scope:target = { - trigger_if = { - limit = { - scope:attacker = { - is_ai = yes - } - } - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - count >= 2 - tier = tier_county - holder ?= { - OR = { - this = scope:defender - is_vassal_or_below_of = scope:defender - } - } - } - } - } + ai_aggressive_cb_constraints = yes # Filter for struggles # trigger_if = { # limit = { @@ -742,23 +578,9 @@ religious_war = { should_invalidate = { OR = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes #Faith change does not immediately invalidate, it's run through event war_event.3100 - scope:war = { exists = var:invalidate_defender_faith_change } - scope:war = { exists = var:invalidate_attacker_faith_change } + religious_war_should_invalidate_faith_change_trigger = yes } } @@ -766,31 +588,13 @@ religious_war = { first_valid = { triggered_desc = { trigger = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } desc = msg_religious_war_invalidation_region_message } triggered_desc = { trigger = { - scope:war = { - OR = { - exists = var:invalidate_defender_faith_change - exists = var:invalidate_attacker_faith_change - } - } + religious_war_should_invalidate_faith_change_trigger = yes } desc = msg_religious_war_invalidated_hostility_level_message } @@ -809,23 +613,10 @@ religious_war = { } multiply = common_cb_piety_cost_multiplier multiply = holy_war_cb_piety_cost_multiplier - if = { - limit = { - scope:attacker = { - top_participant_group:the_christian_church ?= { - has_participant_group_parameter = the_christian_church_cheaper_religious_wars - } - } - } - multiply = { - value = 0.75 - desc = pam_the_christian_church_cheaper_religious_wars_desc - } - } # Half price for mean Iberians if = { limit = { - scope:attacker.house = { + scope:attacker.house ?= { OR = { has_house_modifier = fp2_struggle_hostility_house_faith_modifier has_house_modifier = fp2_struggle_hostility_house_combined_modifier @@ -863,28 +654,8 @@ religious_war = { desc = CB_COST_FP2_STRUGGLE_COMPROMISE_MULTIPLIER } } - if = { - limit = { - scope:attacker = { - any_active_accolade = { - accolade_parameter = acclaimed_knight_piety_from_battle - } - } - } - multiply = accolade_piety_reduction_value - min = 25 - } - if = { - limit = { - scope:attacker = { - any_active_accolade = { - accolade_parameter = acclaimed_knight_piety_from_battle_high - } - } - } - multiply = accolade_piety_reduction_value_high - min = 25 - } + + min = 25 #Inciting cleric paid piety cost if = { limit = { @@ -915,10 +686,7 @@ religious_war = { on_victory = { pam_notify_holy_war_instigator_effect_win = yes - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -929,9 +697,6 @@ religious_war = { add_claim_on_loss = yes } - # EP3 Laamp possibility warning - scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } - # go through the dejure hierarchy under target titles, transfer titles with same or worse tolerance holders (their religion equaly or less tolerated than the defender's), # take the holder as vassal otherwise and don't go deeper every_in_list = { @@ -950,7 +715,7 @@ religious_war = { change = scope:change } } - + every_in_list = { list = titles_taken change_title_holder = { @@ -960,7 +725,6 @@ religious_war = { } } - resolve_title_and_vassal_change = scope:change # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -1010,18 +774,6 @@ religious_war = { desc = fervor_gain_religious_war } } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -1030,7 +782,7 @@ religious_war = { on_white_peace = { pam_notify_holy_war_instigator_effect_draw = yes - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for sort of winning scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -1044,25 +796,9 @@ religious_war = { LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_white_peace_effect = yes - scope:attacker = { add_piety = religious_cb_piety_white_peace - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1071,13 +807,9 @@ religious_war = { on_defeat = { pam_notify_holy_war_instigator_effect_loss = yes - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -1109,22 +841,9 @@ religious_war = { } } - scope:attacker = { - if = { - limit = { - monthly_character_income > 0 - } - pay_short_term_income = { - years = 3 - target = scope:defender - } - } - else = { - pay_short_term_gold = { - target = scope:defender - gold = medium_gold_value - } - } + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 3 } } @@ -1138,20 +857,6 @@ religious_war = { } } } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } on_primary_attacker_death = inherit @@ -1172,7 +877,7 @@ religious_war = { use_de_jure_wargoal_only = yes attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 @@ -1180,18 +885,6 @@ religious_war = { ai_score_mult = { value = 1 - # Increase odds if the character is a vassal with Ghazi Contract - add = { - if = { - limit = { - scope:attacker = { - top_liege != this - vassal_contract_has_flag = vassal_contract_cheaper_religious_war - } - } - add = 1 - } - } # As a feudal gov, do not attack owner of tribal holdings if you have a tribal holding to convert already add = { @@ -1241,7 +934,7 @@ major_religious_war = { scope:attacker.faith ?= { NOT = { has_doctrine_parameter = unreformed } } - NOR = { + NOR = { government_has_flag = government_is_nomadic government_has_flag = government_is_celestial } @@ -1329,23 +1022,35 @@ major_religious_war = { tgp_japan_offensive_wars_ban_trigger = yes } - allowed_against_character = { + allowed_against_character_display_regardless = { + scope:attacker = { + #Piety level reqs should be ignored if this is an interaction + trigger_if = { + limit = { + NOT = { has_character_flag = holy_war_incited } + } + has_required_piety_level_to_declare_war = { LEVEL = 2 } + } + } + } + + allowed_against_character = { + religious_war_faith_hostility_trigger = yes scope:attacker = { - is_valid_religious_war_target_trigger = { TARGET = scope:defender } ALL_FALSE = { top_liege = scope:defender.top_liege liege = scope:defender } + is_valid_religious_war_target_trigger = { TARGET = scope:defender } } } target_titles = neighbor_land_or_water - target_title_tier = all + target_title_tier = kingdom target_de_jure_regions_above = yes ignore_effect = change_title_holder valid_to_start = { scope:target = { - tier = tier_kingdom is_landless_type_title = no } # Filter for struggles @@ -1368,47 +1073,14 @@ major_religious_war = { # } # are_holy_wars_disabled_by_struggle_conciliation_trigger = no # Disabled against other involved faiths in FP2 Conciliation ending - scope:target = { - trigger_if = { - limit = { - scope:attacker = { - is_ai = yes - } - } - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - count >= 5 - tier = tier_county - holder ?= { - OR = { - this = scope:defender - is_vassal_or_below_of = scope:defender - } - } - } - } - } + ai_aggressive_cb_constraints = yes } should_invalidate = { OR = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes #Faith change does not immediately invalidate, it's run through event war_event.3100 - scope:war = { exists = var:invalidate_defender_faith_change } - scope:war = { exists = var:invalidate_attacker_faith_change } + religious_war_should_invalidate_faith_change_trigger = yes } } @@ -1416,37 +1088,19 @@ major_religious_war = { first_valid = { triggered_desc = { trigger = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } desc = msg_religious_war_invalidation_region_message } triggered_desc = { trigger = { - scope:war = { - OR = { - exists = var:invalidate_defender_faith_change - exists = var:invalidate_attacker_faith_change - } - } + religious_war_should_invalidate_faith_change_trigger = yes } desc = msg_religious_war_invalidated_hostility_level_message } } } - + on_invalidated = { pam_notify_holy_war_instigator_effect_draw = yes scope:attacker = { remove_character_flag = declared_major_religious_war_flag } @@ -1460,41 +1114,8 @@ major_religious_war = { } multiply = common_cb_piety_cost_multiplier multiply = holy_war_cb_piety_cost_multiplier - if = { - limit = { - scope:attacker = { - top_participant_group:the_christian_church ?= { - has_participant_group_parameter = the_christian_church_cheaper_religious_wars - } - } - } - multiply = { - value = 0.75 - desc = pam_the_christian_church_cheaper_religious_wars_desc - } - } - if = { - limit = { - scope:attacker = { - any_active_accolade = { - accolade_parameter = acclaimed_knight_piety_from_battle - } - } - } - multiply = accolade_piety_reduction_value - min = 90 - } - if = { - limit = { - scope:attacker = { - any_active_accolade = { - accolade_parameter = acclaimed_knight_piety_from_battle_high - } - } - } - multiply = accolade_piety_reduction_value_high - min = 90 - } + + min = 90 #Inciting cleric paid piety cost if = { limit = { @@ -1554,6 +1175,8 @@ major_religious_war = { on_victory = { pam_notify_holy_war_instigator_effect_win = yes + on_victory_aggressive_war_effect = yes + scope:attacker = { if = { limit = { @@ -1562,10 +1185,6 @@ major_religious_war = { add_trait = faith_warrior } } - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } @@ -1576,9 +1195,6 @@ major_religious_war = { add_claim_on_loss = yes } - # EP3 Laamp possibility warning - scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } - # go through the dejure hierarchy under target titles, transfer titles with same or worse tolerance holders (their religion equaly or less tolerated than the defender's), # take the holder as vassal otherwise and don't go deeper every_in_list = { @@ -1597,7 +1213,7 @@ major_religious_war = { change = scope:change } } - + every_in_list = { list = titles_taken change_title_holder = { @@ -1656,18 +1272,6 @@ major_religious_war = { desc = fervor_gain_religious_war } } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -1676,7 +1280,7 @@ major_religious_war = { on_white_peace = { pam_notify_holy_war_instigator_effect_draw = yes - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -1693,23 +1297,7 @@ major_religious_war = { scope:attacker = { add_piety = religious_cb_piety_white_peace - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1718,13 +1306,9 @@ major_religious_war = { on_defeat = { pam_notify_holy_war_instigator_effect_loss = yes - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -1739,8 +1323,7 @@ major_religious_war = { } # piety change - every_in_list = { - list = target_titles + scope:defender = { add_piety_for_war_effect = { TYPE = piety } } scope:defender = { add_piety = { @@ -1785,20 +1368,6 @@ major_religious_war = { } } } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } on_primary_attacker_death = inherit @@ -1819,7 +1388,7 @@ major_religious_war = { use_de_jure_wargoal_only = yes attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 @@ -1827,18 +1396,6 @@ major_religious_war = { ai_score_mult = { value = 1 - # Increase odds if the character is a vassal with Ghazi Contract - add = { - if = { - limit = { - scope:attacker = { - top_liege != this - vassal_contract_has_flag = vassal_contract_cheaper_religious_war - } - } - add = 1 - } - } # As a feudal gov, do not attack owner of tribal holdings if you have a tribal holding to convert already add = { @@ -1878,7 +1435,7 @@ excommunication_war = { # Already defined in 00_casus_belli_groups.txt # allowed_for_character = {} - + attacker_score_from_battles_scale = 150 defender_score_from_battles_scale = 150 @@ -1895,7 +1452,7 @@ excommunication_war = { #We can't DoW our own liege NOR = { liege = scope:defender - #No pot calling the kettle black + #No pot calling the kettle black has_trait = excommunicated } @@ -1933,10 +1490,7 @@ excommunication_war = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_effect = yes #EP2 Accolade glory gain from winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -1973,15 +1527,6 @@ excommunication_war = { scope:defender = { depose_effect = { DEPOSER = scope:attacker } } - - # Truce - add_truce_attacker_victory_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -1997,30 +1542,14 @@ excommunication_war = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 Accolade glory gain for defender for being ok scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } scope:attacker = { add_piety = excommunication_cb_piety_white_peace - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -2042,13 +1571,9 @@ excommunication_war = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -2089,17 +1614,8 @@ excommunication_war = { opinion = -20 } } - - # Truce - add_truce_attacker_defeat_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + should_invalidate = { scope:defender = { NOT = { @@ -2123,24 +1639,13 @@ excommunication_war = { desc = msg_invalidate_war_title } } - - on_invalidated = { - scope:attacker = { - #Used for the piety_change scripted effect. - save_scope_as = winner - } + on_invalidated = { #Handle all piety gains/losses in scripted effects. excommunication_cb_piety_change = { WINNER = scope:attacker LOSER = scope:defender } - - scope:defender = { - - #Used for the piety_change scripted effect. - save_scope_as = loser - } } on_primary_attacker_death = invalidate @@ -2158,7 +1663,7 @@ excommunication_war = { use_de_jure_wargoal_only = yes attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 max_attacker_score_from_battles = 100 @@ -2168,25 +1673,6 @@ excommunication_war = { ai_score_mult = { value = 1 - # Increase odds if the character is a vassal with Ghazi Contract - add = { - if = { - limit = { - scope:attacker = { - top_liege != this - vassal_contract_has_flag = vassal_contract_cheaper_religious_war - } - } - add = 1 - } - } - # Holy War are limited to connected neighbour to limit big empire expansions over weak realms. - add = { - if = { - limit = { religious_war_vassals_constraints = yes } - add = -1000 - } - } add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing } @@ -2197,7 +1683,7 @@ flowery_war_cb = { group = religious_disorganised ai_only_against_neighbors = yes allow_hostages = no - + allowed_for_character = { faith ?= { has_doctrine_parameter = flower_war_cb_active } NOT = { #Must not have any leftover sacrificial prisoners/easy ability to get any. @@ -2263,7 +1749,7 @@ flowery_war_cb = { } on_invalidated = { - + } on_declaration = { @@ -2275,10 +1761,7 @@ flowery_war_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_effect = yes #EP2 Accolade glory gain from winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -2349,12 +1832,12 @@ flowery_war_cb = { } add_to_list = definite_captives_list save_temporary_scope_as = future_captive - scope:attacker = { - imprison = { - target = scope:future_captive - type = dungeon - } + scope:attacker = { + imprison = { + target = scope:future_captive + type = dungeon } + } } random_in_list = { #Always try to grab a second person. list = potential_captives_list @@ -2414,12 +1897,12 @@ flowery_war_cb = { } add_to_list = definite_captives_list save_temporary_scope_as = future_captive - scope:attacker = { - imprison = { - target = scope:future_captive - type = dungeon - } + scope:attacker = { + imprison = { + target = scope:future_captive + type = dungeon } + } } random_in_list = { #Always try to grab a third person. list = potential_captives_list @@ -2479,12 +1962,12 @@ flowery_war_cb = { } add_to_list = definite_captives_list save_temporary_scope_as = future_captive - scope:attacker = { - imprison = { - target = scope:future_captive - type = dungeon - } + scope:attacker = { + imprison = { + target = scope:future_captive + type = dungeon } + } } if = { #If at least duchy-tier, try to grab a fourth person. limit = { primary_title.tier >= tier_duchy } @@ -2638,16 +2121,6 @@ flowery_war_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes - } on_white_peace_desc = { @@ -2655,13 +2128,8 @@ flowery_war_cb = { } on_white_peace = { - scope:attacker = { - show_pow_release_message_effect = yes - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } - } + on_white_peace_effect = yes + scope:attacker = { #Piety loss for the attacker if appropriate, otherwise prestige loss. if = { limit = { @@ -2676,8 +2144,6 @@ flowery_war_cb = { } } - - # Allies on both sides get full prestige value for helping in the war, based on their war participation. modify_allies_of_participants_fame_values = { WINNER = scope:attacker # not important as the scales are identical @@ -2686,18 +2152,6 @@ flowery_war_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # Truce - add_truce_attacker_victory_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -2705,13 +2159,9 @@ flowery_war_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -2737,7 +2187,7 @@ flowery_war_cb = { } } scope:defender = { - if = { #If the defender has the same faith as the attacker, and that faith still enjoys human sacrifice, then this was sacred. + if = { #If the defender has the same faith as the attacker, and both still enjoy human sacrifice, then this was sacred. limit = { faith ?= { this = scope:attacker.faith @@ -2771,8 +2221,8 @@ flowery_war_cb = { limit = { OR = { AND = { - has_dynasty = yes - dynasty = scope:attacker.dynasty + scope:attacker = { has_dynasty = yes } + dynasty ?= scope:attacker.dynasty } is_consort_of = scope:attacker } @@ -2791,12 +2241,12 @@ flowery_war_cb = { } add_to_list = definite_captives_list save_temporary_scope_as = future_captive - scope:defender = { - imprison = { - target = scope:future_captive - type = dungeon - } + scope:defender = { + imprison = { + target = scope:future_captive + type = dungeon } + } } random_in_list = { #Always try to grab a second person. list = potential_captives_list @@ -2856,12 +2306,12 @@ flowery_war_cb = { } add_to_list = definite_captives_list save_temporary_scope_as = future_captive - scope:defender = { - imprison = { - target = scope:future_captive - type = dungeon - } + scope:defender = { + imprison = { + target = scope:future_captive + type = dungeon } + } } random_in_list = { #Always try to grab a third person. list = potential_captives_list @@ -2921,12 +2371,12 @@ flowery_war_cb = { } add_to_list = definite_captives_list save_temporary_scope_as = future_captive - scope:defender = { - imprison = { - target = scope:future_captive - type = dungeon - } + scope:defender = { + imprison = { + target = scope:future_captive + type = dungeon } + } } if = { #If at least duchy-tier, try to grab a fourth person. limit = { primary_title.tier >= tier_duchy } @@ -3080,18 +2530,6 @@ flowery_war_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { save_temporary_scope_as = loser } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } on_primary_attacker_death = inherit @@ -3115,12 +2553,12 @@ flowery_war_cb = { max_attacker_score_from_battles = 200 max_defender_score_from_battles = 200 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 max_ai_diplo_distance_to_title = 500 - + ai_score = { value = raid_for_captives_ai_score_value } @@ -3175,10 +2613,10 @@ undirected_great_holy_war = { is_great_holy_war = yes landless_attacker_needs_armies = no allow_hostages = no - + defender_score_from_battles_scale = 125 attacker_score_from_battles_scale = 125 - + max_defender_score_from_battles = 150 occupation_participation_mult = 0.5 @@ -3319,11 +2757,14 @@ undirected_great_holy_war = { } should_invalidate = { - scope:attacker.faith = scope:defender.faith # Primary defender has converted + OR = { + scope:attacker.faith = scope:defender.faith # Primary defender has converted + war_should_invalidate_defender_lost_target_lands_trigger = yes + } } on_invalidated_desc = msg_invalidate_war_title - + on_invalidated = { scope:attacker.faith.great_holy_war.ghw_target_title = { save_scope_as = target_kingdom @@ -3345,18 +2786,12 @@ undirected_great_holy_war = { trigger_event = great_holy_war.0054 } hidden_effect = { - if = { #Clear pledged gold flag. + #Clear pledged gold flag. + every_player = { limit = { - any_player = { - has_character_flag = ghw_pledged_gold - } - } - every_player = { - limit = { - has_character_flag = ghw_pledged_gold - } - remove_character_flag = ghw_pledged_gold + has_character_flag = ghw_pledged_gold } + remove_character_flag = ghw_pledged_gold } } @@ -3368,16 +2803,13 @@ undirected_great_holy_war = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + save_scope_as = special_truce + on_victory_aggressive_war_effect = yes + on_victory_ghw_effect = yes #EP2 Accolade glory gain to the holy knights of the faith head scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } - pam_the_christian_church_great_holy_war_won_catalyst_effect = yes - scope:attacker.faith.great_holy_war = { # Make sure steppe crusades do not make silly cultures every_pledged_attacker = { limit = { exists = ghw_beneficiary } @@ -3704,7 +3136,7 @@ undirected_great_holy_war = { } add_realm_law_skip_effects = partition_succession_law } - + spawn_army = { # Spawn a temporary army so that the Crusader King isn't helpless, symbolizing Crusaders staying behind levies = { value = 100 @@ -3757,7 +3189,7 @@ undirected_great_holy_war = { if = { limit = { has_government = clan_government - NOT = { faith.religion = religion:islam_religion } + faith.religion != religion:islam_religion } change_government = feudal_government } @@ -3875,15 +3307,20 @@ undirected_great_holy_war = { add_truce_GHW_attacker_victory_effect = yes debug_log = undirected_ghw_victory_debug_message - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - scope:title_recipient = { custom_tooltip = legend_seed_ghw.tt } - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes + hidden_effect = { + #Clear pledged gold flag. + every_player = { + limit = { + has_character_flag = ghw_pledged_gold + } + remove_character_flag = ghw_pledged_gold + } + } + ghw_on_war_end_effect = yes } on_white_peace_desc = { @@ -3895,13 +3332,9 @@ undirected_great_holy_war = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -3971,10 +3404,6 @@ undirected_great_holy_war = { trigger_event = great_holy_war.0053 #Differentiate depending on faith (compared to scope:attacker) } - # Truce - add_truce_attacker_defeat_effect = yes - - #Set 30 years cooldown. hidden_effect = { if = { limit = { exists = scope:title_recipient } @@ -4011,21 +3440,12 @@ undirected_great_holy_war = { } if = { #Clear pledged gold flag. limit = { - any_player = { - has_character_flag = ghw_pledged_gold - } - } - every_player = { - limit = { - has_character_flag = ghw_pledged_gold - } - remove_character_flag = ghw_pledged_gold + has_character_flag = ghw_pledged_gold } + remove_character_flag = ghw_pledged_gold } } - debug_log = undirected_ghw_defeat_debug_message - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes + ghw_on_war_end_effect = yes } } @@ -4079,11 +3499,14 @@ directed_great_holy_war = { } } } - religion = { exists = var:variable_ghw_unlocked } #Activated by event for every religion. } } allowed_for_character_display_regardless = { + custom_description = { + text = great_holy_war_age_of_crusades + scope:attacker.religion = { exists = var:variable_ghw_unlocked } #Activated by event for every religion. + } custom_description = { text = great_holy_war_cooldown NOT = { scope:attacker.faith ?= { exists = var:variable_ghw_cooldown }} @@ -4101,7 +3524,7 @@ directed_great_holy_war = { scope:attacker.faith ?= { NOR = { # No active GHW already. - exists = great_holy_war + exists = great_holy_war # If GHWs have just been unlocked, AI rulers will wait a little bit before declaring them. trigger_if = { @@ -4243,7 +3666,10 @@ directed_great_holy_war = { } should_invalidate = { - scope:attacker.faith = scope:defender.faith # Primary defender has converted + OR = { + scope:attacker.faith = scope:defender.faith # Primary defender has converted + war_should_invalidate_defender_lost_target_lands_trigger = yes + } } on_invalidated_desc = msg_invalidate_war_title @@ -4253,16 +3679,14 @@ directed_great_holy_war = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + save_scope_as = special_truce + on_victory_aggressive_war_effect = yes + + on_victory_ghw_effect = yes #EP2 Accolade glory gain to the holy warriors of the faith head scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } - pam_the_christian_church_great_holy_war_won_catalyst_effect = yes - scope:attacker.faith.great_holy_war = { # Make sure steppe crusades do not make silly cultures every_pledged_attacker = { limit = { exists = ghw_beneficiary } @@ -4390,7 +3814,6 @@ directed_great_holy_war = { } } } - #Set 30 years cooldown. hidden_effect = { scope:attacker = { faith ?= { @@ -4446,13 +3869,10 @@ directed_great_holy_war = { trigger_event = great_holy_war.0052 #Differentiate depending on faith (compared to scope:attacker) } - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - scope:title_recipient = { custom_tooltip = legend_seed_ghw.tt } - + hidden_effect = { every_in_list = { list = beneficiary_fixing_list @@ -4480,8 +3900,7 @@ directed_great_holy_war = { } } - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes + ghw_on_war_end_effect = yes } on_white_peace_desc = { @@ -4493,13 +3912,9 @@ directed_great_holy_war = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -4547,9 +3962,6 @@ directed_great_holy_war = { trigger_event = great_holy_war.0053 #Differentiate depending on faith (compared to scope:attacker) } - # Truce - add_truce_attacker_defeat_effect = yes - scope:attacker = { faith ?= { change_fervor = { diff --git a/common/casus_belli_types/00_subjugation.txt b/common/casus_belli_types/00_subjugation.txt index cdde01d7e..33c744c1f 100644 --- a/common/casus_belli_types/00_subjugation.txt +++ b/common/casus_belli_types/00_subjugation.txt @@ -164,6 +164,23 @@ } allowed_against_character = { + scope:defender = { + top_liege = this + trigger_if = { + limit = { scope:attacker = { is_ai = no } } # Already pre-filtered by the AI due to ai_only_against_neighbors = yes. any_neighboring_top_liege_realm_owner is expensive + scope:attacker = { + any_neighboring_top_liege_realm_owner = { + this = scope:defender + } + } + } + NOR = { # Can't subjugate Military Orders or Heads of Faith + any_held_title = { + is_holy_order = yes + } + faith.religious_head ?= root + } + } scope:attacker = { OR = { AND = { # Kingdom of Heaven Subjugation @@ -207,24 +224,6 @@ } } } - - scope:defender = { - top_liege = this - trigger_if = { - limit = { scope:attacker = { is_ai = no } } # Already pre-filtered by the AI due to ai_only_against_neighbors = yes. any_neighboring_top_liege_realm_owner is expensive - scope:attacker = { - any_neighboring_top_liege_realm_owner = { - this = scope:defender - } - } - } - NOR = { # Can't subjugate Military Orders or Heads of Faith - any_held_title = { - is_holy_order = yes - } - faith.religious_head ?= root - } - } } cost = { @@ -329,10 +328,7 @@ } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } @@ -432,18 +428,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -457,7 +441,7 @@ } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -469,10 +453,6 @@ value = medium_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -483,17 +463,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -516,13 +485,9 @@ } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -550,21 +515,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:attacker = { - save_temporary_scope_as = loser - } - - # Truce - add_truce_attacker_defeat_effect = yes - - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } on_primary_attacker_death = inherit diff --git a/common/casus_belli_types/05_fp3_wars.txt b/common/casus_belli_types/05_fp3_wars.txt index 7eda3198f..f9e4959fa 100644 --- a/common/casus_belli_types/05_fp3_wars.txt +++ b/common/casus_belli_types/05_fp3_wars.txt @@ -1,2 +1,2 @@ -# Custom CBs for FP3 +# Custom CBs for FP3 # Overwritten \ No newline at end of file diff --git a/common/casus_belli_types/06_ce1_wars.txt b/common/casus_belli_types/06_ce1_wars.txt index 6504eddc9..4eb21522a 100644 --- a/common/casus_belli_types/06_ce1_wars.txt +++ b/common/casus_belli_types/06_ce1_wars.txt @@ -31,12 +31,7 @@ mythical_ancestor_war = { } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } target_titles = all target_title_tier = all @@ -51,7 +46,7 @@ mythical_ancestor_war = { target = scope:target } any_claim = { - root = { + root = { is_target_in_variable_list = { name = legendary_claims target = prev @@ -66,21 +61,11 @@ mythical_ancestor_war = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_invasion_war_invalidated_message - + on_invalidated = { } @@ -106,7 +91,7 @@ mythical_ancestor_war = { } } } - + on_declaration = { on_declared_war = yes } @@ -124,25 +109,19 @@ mythical_ancestor_war = { desc = invasion_war_warning_desc } } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } - - # Truce - add_truce_attacker_victory_effect = yes create_title_and_vassal_change = { type = conquest save_scope_as = change add_claim_on_loss = yes } - + setup_invasion_cb = { titles = target_titles attacker = scope:attacker @@ -150,6 +129,9 @@ mythical_ancestor_war = { change = scope:change take_occupied = yes } + + on_victory_invasion_cb_take_occupied_tooltip = { VASSALIZE = no } + resolve_title_and_vassal_change = scope:change # Attacker gets Prestige Experience, Defender loses Prestige, all other participants gain Prestige based on their war contribution. @@ -163,15 +145,6 @@ mythical_ancestor_war = { WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -183,9 +156,9 @@ mythical_ancestor_war = { desc = invasion_war_white_peace_desc } } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -200,25 +173,9 @@ mythical_ancestor_war = { LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_white_peace_effect = yes - scope:attacker = { add_prestige = mongol_invasion_cb_prestige_white_peace - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -230,15 +187,11 @@ mythical_ancestor_war = { desc = invasion_war_white_peace_desc } } - - on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat = { + on_defeat_aggressive_war_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -253,7 +206,7 @@ mythical_ancestor_war = { multiply = -1.0 } } - + setup_invasion_cb = { titles = target_titles attacker = scope:attacker @@ -273,39 +226,26 @@ mythical_ancestor_war = { WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + transfer_behavior = transfer - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "ANCESTOR_WAR_NAME" war_name_base = "ANCESTOR_WAR_NAME_BASE" cb_name = "ANCESTOR_CB_NAME" - + interface_priority = 100 - + use_de_jure_wargoal_only = yes - + attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 @@ -380,21 +320,11 @@ legendary_adventure = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_county_conquest_war_invalidated_message - + on_invalidated = {} cost = { @@ -451,7 +381,7 @@ legendary_adventure = { type = accolade_maa_pikes stacks = 4 } - + inheritable = no uses_supply = no location = scope:attacker.capital_province @@ -477,9 +407,8 @@ legendary_adventure = { } on_victory = { - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - + on_victory_aggressive_war_effect = yes + #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -652,7 +581,7 @@ legendary_adventure = { # To keep tooltips neat, show the core kingdom as transferring (preventing a messy "unlanded of" from appearing). show_as_tooltip = { random_in_list = { - list = target_titles + list = target_titles limit = { tier = tier_kingdom } save_scope_as = new_kingdom } @@ -730,24 +659,24 @@ legendary_adventure = { limit = { any_in_list = { list = target_titles - tier = tier_county - uses_county_fertility = yes + tier = tier_county + uses_county_fertility = yes } } ordered_in_list = { list = target_titles limit = { tier = tier_county } - order_by = county_fertility + order_by = county_fertility save_temporary_scope_as = new_capital scope:attacker = { set_realm_capital = scope:new_capital } } } - ### Everyone else prefers the highest development. + ### Everyone else prefers the highest prosperity. else = { ordered_in_list = { list = target_titles limit = { tier = tier_county } - order_by = development_level + order_by = prosperity_level save_temporary_scope_as = new_capital scope:attacker = { set_realm_capital = scope:new_capital } } @@ -1473,7 +1402,7 @@ legendary_adventure = { # Finally, general cleanup. ## Move any remaining newly-landless family to scope:attacker's court. scope:attacker = { - #gather all your cool dudes + #gather all your cool dudes every_courtier = { limit = { is_ai = yes @@ -1522,8 +1451,8 @@ legendary_adventure = { ## If scope:attacker wasn't an adventurer before, make them one. if = { limit = { - NOR = { - has_trait = adventurer + NOR = { + has_trait = adventurer government_has_flag = government_is_nomadic } } @@ -1552,7 +1481,7 @@ legendary_adventure = { has_trait = dwarf NOT = { capital_county = { - title_province = { geographical_region = world_europe } + title_province = { geographical_region = world_europe } } } } @@ -1577,36 +1506,7 @@ legendary_adventure = { LOSER_ALLY_FAME_SCALE = 1 } - # Break alliances now out of diplo range - if = { - limit = { - scope:attacker = { - any_ally = { - NOT = { in_diplomatic_range = scope:attacker } - } - } - } - scope:attacker = { - every_ally = { - limit = { - NOT = { in_diplomatic_range = scope:attacker } - } - break_alliance = scope:attacker - } - } - } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes + break_alliance_due_to_diplo_range_effect = yes } on_white_peace_desc = { @@ -1620,6 +1520,7 @@ legendary_adventure = { } on_white_peace = { + on_white_peace_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -1629,10 +1530,6 @@ legendary_adventure = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -1643,17 +1540,6 @@ legendary_adventure = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1676,11 +1562,9 @@ legendary_adventure = { } on_defeat = { - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat_aggressive_war_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -1708,20 +1592,6 @@ legendary_adventure = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } transfer_behavior = transfer @@ -1741,7 +1611,7 @@ legendary_adventure = { use_de_jure_wargoal_only = yes attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 } @@ -1774,7 +1644,7 @@ leg_demand_fealty_cb = { target_titles = none ignore_effect = change_title_holder ai_only_against_neighbors = yes - + valid_to_start = { } @@ -1817,14 +1687,10 @@ leg_demand_fealty_cb = { } desc = leg_demand_fealty_v_neutral } - } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -1834,28 +1700,14 @@ leg_demand_fealty_cb = { save_scope_as = change add_claim_on_loss = yes } - + scope:defender = { change_liege = { liege = scope:attacker change = scope:change } - } resolve_title_and_vassal_change = scope:change - - - # truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -1866,20 +1718,13 @@ leg_demand_fealty_cb = { } desc = de_jure_cb_white_peace_desc } - } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1894,17 +1739,13 @@ leg_demand_fealty_cb = { } desc = de_jure_cb_defeat_desc } - - } - - on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + } + + on_defeat = { + on_defeat_aggressive_war_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -1912,48 +1753,34 @@ leg_demand_fealty_cb = { PRESTIGE_VALUE = medium_prestige_value } } - + scope:attacker = { pay_short_term_gold_reparations_effect = { GOLD_VALUE = 10 } } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_defeat_effects = yes } - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + transfer_behavior = transfer - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "DEMAND_FEALTY_NAME" war_name_base = "DEMAND_FEALTY_NAME_BASE" cb_name = DEMAND_FEALTY_CB_NAME interface_priority = 98 #Below take all and regular dejure. attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 - + max_ai_diplo_distance_to_title = 500 - + on_invalidated_desc = msg_invalidate_war_title ai_score_mult = { diff --git a/common/casus_belli_types/07_ep3_admin_cbs.txt b/common/casus_belli_types/07_ep3_admin_cbs.txt index c42c7b9ef..3f4a91978 100644 --- a/common/casus_belli_types/07_ep3_admin_cbs.txt +++ b/common/casus_belli_types/07_ep3_admin_cbs.txt @@ -1,4 +1,6 @@ -expansion_cb = { +@ai_land_expansion_cb_cooldown_years = 15 + +expansion_cb = { icon = county_expansion group = conquest @@ -22,12 +24,7 @@ } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } target_titles = neighbor_land target_title_tier = county @@ -89,23 +86,11 @@ geographical_region = black_sea_coast_region } } + ai_land_expansion_cb_constraints = yes } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_county_conquest_war_invalidated_message @@ -113,43 +98,29 @@ cost = { influence = { - add = { - value = 25 - desc = CB_BASE_COST - } - add = { - value = 0.5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 75 - } + add = county_cb_influence_base_cost multiply = common_cb_cost_multiplier - if = { - limit = { - scope:attacker = { - NOT = { government_has_flag = government_has_influence } - } - } - multiply = 0 - } } prestige = { - add = { - value = 50 - desc = CB_BASE_COST - } - add = { - value = 2.5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 150 - } + add = county_cb_prestige_base_cost_with_influence multiply = common_cb_prestige_cost_multiplier } } on_declaration = { on_declared_war = yes + scope:attacker = { + if = { + limit = { + is_ai = yes + is_governor = yes + } + set_variable = { + name = ai_land_expansion_cb_cooldown + years = @ai_land_expansion_cb_cooldown_years + } + } + } } on_victory_desc = { @@ -163,13 +134,7 @@ } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes # EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -207,15 +172,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -229,17 +185,13 @@ } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -250,17 +202,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -283,16 +224,9 @@ } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -317,16 +251,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -372,27 +296,12 @@ duchy_expansion_cb = { } allowed_for_character_display_regardless = { - trigger_if = { - limit = { - culture = { - has_cultural_parameter = cb_lower_prestige_level_requirement - } - } - prestige_level >= 2 - } - trigger_else = { - prestige_level >= 3 - } + has_required_prestige_level_to_declare_war = { LEVEL = 3 } tgp_japan_offensive_wars_ban_trigger = yes } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } target_titles = neighbor_land target_title_tier = duchy @@ -440,20 +349,12 @@ duchy_expansion_cb = { scope:target = { is_landless_type_title = no } + ai_aggressive_cb_constraints = yes + ai_land_expansion_cb_constraints = yes } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_religious_war_invalidation_region_message @@ -463,35 +364,29 @@ duchy_expansion_cb = { cost = { influence = { - add = { - value = 50 - desc = CB_BASE_COST - } - add = { - value = 1 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 250 - } + add = duchy_cb_influence_base_cost multiply = common_cb_cost_multiplier } prestige = { - add = { - value = 100 - desc = CB_BASE_COST - } - add = { - value = 5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 500 - } + add = duchy_cb_prestige_base_cost_with_influence multiply = common_cb_prestige_cost_multiplier } } on_declaration = { on_declared_war = yes + scope:attacker = { + if = { + limit = { + is_ai = yes + is_governor = yes + } + set_variable = { + name = ai_land_expansion_cb_cooldown + years = @ai_land_expansion_cb_cooldown_years + } + } + } } on_victory_desc = { @@ -505,13 +400,7 @@ duchy_expansion_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes # EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -522,7 +411,7 @@ duchy_expansion_cb = { add_claim_on_loss = yes } - # Go through the dejure hierarchy under target titles, transfer eligible vassals and sieze counties from ineligible ones + # Go through the dejure hierarchy under target titles, transfer eligible vassals and seize counties from ineligible ones every_in_list = { list = target_titles custom_tooltip = CONQUEST_CB_TITLE @@ -574,97 +463,6 @@ duchy_expansion_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - if = { # Warning that only counties are changing hands - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - } - } - random_in_list = { - list = target_titles - limit = { tier = tier_duchy } - save_scope_as = de_jure_target - } - } - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - holder = scope:defender - } - } - if = { - limit = { - scope:defender = { - any_held_title = { - title_tier = county - NOT = { target_is_de_jure_liege_or_above = scope:de_jure_target } - } - } - } - custom_tooltip = conquest_title_not_transferred_tt - } - } - else = { - if = { - limit = { - any_in_list = { - list = target_titles - tier >= scope:attacker.highest_held_title_tier - is_title_created = yes - holder = { - NOT = { - any_sub_realm_county = { - NOT = { target_is_de_jure_liege_or_above = scope:de_jure_target } - } - } - } - } - } - custom_tooltip = expansion_take_target_title_tt - } - else_if = { - limit = { - any_in_list = { - list = target_titles - tier >= scope:attacker.highest_held_title_tier - is_title_created = yes - } - } - custom_tooltip = conquest_title_usurp_tt - } - else_if = { - limit = { - any_in_list = { - list = target_titles - tier >= scope:attacker.highest_held_title_tier - is_title_created = no - any_de_jure_county = { - percent > 0.5 - holder ?= { - OR = { - this = scope:defender - any_liege_or_above = { this = scope:defender } - } - } - } - } - } - custom_tooltip = expansion_create_target_title_tt - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -678,8 +476,7 @@ duchy_expansion_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } - # Prestige loss for the attacker + on_white_peace_effect = yes # EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -699,12 +496,6 @@ duchy_expansion_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -727,16 +518,9 @@ duchy_expansion_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -764,16 +548,6 @@ duchy_expansion_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -825,12 +599,7 @@ naval_expansion_cb = { } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } target_titles = neighbor_land_or_water target_title_tier = county @@ -879,6 +648,7 @@ naval_expansion_cb = { # Target county has to be coastal and not border you. valid_to_start = { + ai_naval_expansion_cb_constraints = yes scope:target = { is_coastal_county = yes } @@ -901,20 +671,7 @@ naval_expansion_cb = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_county_conquest_war_invalidated_message @@ -922,37 +679,11 @@ naval_expansion_cb = { cost = { influence = { - add = { - value = 25 - desc = CB_BASE_COST - } - add = { - value = 0.5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 75 - } + add = county_cb_influence_base_cost multiply = common_cb_cost_multiplier - if = { - limit = { - scope:attacker = { - NOT = { government_has_flag = government_has_influence } - } - } - multiply = 0 - } } prestige = { - add = { - value = 50 - desc = CB_BASE_COST - } - add = { - value = 2.5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 150 - } + add = county_cb_prestige_base_cost_with_influence multiply = common_cb_prestige_cost_multiplier } } @@ -972,13 +703,7 @@ naval_expansion_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes # EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -1016,15 +741,6 @@ naval_expansion_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -1038,17 +754,13 @@ naval_expansion_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -1059,17 +771,6 @@ naval_expansion_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1092,16 +793,9 @@ naval_expansion_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -1126,16 +820,6 @@ naval_expansion_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -1186,26 +870,11 @@ naval_duchy_expansion_cb = { allowed_for_character_display_regardless = { tgp_japan_offensive_wars_ban_trigger = yes - trigger_if = { - limit = { - culture = { - has_cultural_parameter = cb_lower_prestige_level_requirement - } - } - prestige_level >= 2 - } - trigger_else = { - prestige_level >= 3 - } + has_required_prestige_level_to_declare_war = { LEVEL = 3 } } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } target_titles = neighbor_land_or_water target_title_tier = duchy @@ -1251,6 +920,7 @@ naval_duchy_expansion_cb = { # Target duchy must have counties that are coastal and doesn't border you. valid_to_start = { + ai_naval_expansion_cb_constraints = yes scope:target = { any_in_de_jure_hierarchy = { tier = tier_county @@ -1258,30 +928,18 @@ naval_duchy_expansion_cb = { NOT = { any_neighboring_county = { - OR = { - holder = root - holder = { - any_liege_or_above = { this = root } - } + holder = { + target_is_same_character_or_above = root } } } } } + ai_aggressive_cb_constraints = yes } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_religious_war_invalidation_region_message @@ -1291,29 +949,11 @@ naval_duchy_expansion_cb = { cost = { influence = { - add = { - value = 50 - desc = CB_BASE_COST - } - add = { - value = 1 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 250 - } + add = duchy_cb_influence_base_cost multiply = common_cb_cost_multiplier } prestige = { - add = { - value = 100 - desc = CB_BASE_COST - } - add = { - value = 5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 500 - } + add = duchy_cb_prestige_base_cost_with_influence multiply = common_cb_prestige_cost_multiplier } } @@ -1333,13 +973,7 @@ naval_duchy_expansion_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes # EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -1350,7 +984,7 @@ naval_duchy_expansion_cb = { add_claim_on_loss = yes } - # Go through the dejure hierarchy under target titles, transfer eligible vassals and sieze counties from ineligible ones + # Go through the dejure hierarchy under target titles, transfer eligible vassals and seize counties from ineligible ones every_in_list = { list = target_titles custom_tooltip = CONQUEST_CB_TITLE @@ -1402,97 +1036,6 @@ naval_duchy_expansion_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - if = { # Warning that only counties are changing hands - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - } - } - random_in_list = { - list = target_titles - limit = { tier = tier_duchy } - save_scope_as = de_jure_target - } - } - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - holder = scope:defender - } - } - if = { - limit = { - scope:defender = { - any_held_title = { - title_tier = county - NOT = { target_is_de_jure_liege_or_above = scope:de_jure_target } - } - } - } - custom_tooltip = conquest_title_not_transferred_tt - } - } - else = { - if = { - limit = { - any_in_list = { - list = target_titles - tier >= scope:attacker.highest_held_title_tier - is_title_created = yes - holder = { - NOT = { - any_sub_realm_county = { - NOT = { target_is_de_jure_liege_or_above = scope:de_jure_target } - } - } - } - } - } - custom_tooltip = expansion_take_target_title_tt - } - else_if = { - limit = { - any_in_list = { - list = target_titles - tier >= scope:attacker.highest_held_title_tier - is_title_created = yes - } - } - custom_tooltip = conquest_title_usurp_tt - } - else_if = { - limit = { - any_in_list = { - list = target_titles - tier >= scope:attacker.highest_held_title_tier - is_title_created = no - any_de_jure_county = { - percent > 0.5 - holder ?= { - OR = { - this = scope:defender - any_liege_or_above = { this = scope:defender } - } - } - } - } - } - custom_tooltip = expansion_create_target_title_tt - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -1506,8 +1049,7 @@ naval_duchy_expansion_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } - # Prestige loss for the attacker + on_white_peace_effect = yes # EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -1527,12 +1069,6 @@ naval_duchy_expansion_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1555,16 +1091,9 @@ naval_duchy_expansion_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -1592,16 +1121,6 @@ naval_duchy_expansion_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -1647,12 +1166,7 @@ influence_war_cb = { } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } ignore_effect = change_title_holder @@ -1662,17 +1176,7 @@ influence_war_cb = { should_check_for_interface_availability = no should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_religious_war_invalidation_region_message @@ -1690,10 +1194,7 @@ influence_war_cb = { on_victory_desc = influence_war_top_liege_gains_title_desc on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes # EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -1735,7 +1236,7 @@ influence_war_cb = { add_claim_on_loss = yes } - # Go through the dejure hierarchy under target titles, transfer eligible vassals and sieze counties from ineligible ones + # Go through the dejure hierarchy under target titles, transfer eligible vassals and seize counties from ineligible ones every_in_list = { list = target_titles custom_tooltip = INFLUENCE_WAR_CB_TITLE @@ -1763,7 +1264,6 @@ influence_war_cb = { # If applicable, take the target title (i.e. duchy) as well every_in_list = { list = target_title_taken - #custom_tooltip = expansion_take_target_title_tt change_title_holder = { holder = scope:attacker.top_liege change = scope:change @@ -1788,83 +1288,6 @@ influence_war_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - if = { # Warning that only counties are changing hands - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - } - } - random_in_list = { - list = target_titles - limit = { tier = tier_duchy } - save_scope_as = de_jure_target - } - } - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - holder = scope:defender - } - } - if = { - limit = { - scope:defender = { - any_held_title = { - title_tier = county - NOT = { target_is_de_jure_liege_or_above = scope:de_jure_target } - } - } - } - custom_tooltip = conquest_title_not_transferred_tt - } - else = { - custom_tooltip = influence_war_take_target_title_tt - } - } - else = { - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - is_title_created = yes - holder = { - NOT = { - any_sub_realm_county = { - #tier = tier_county - NOT = { target_is_de_jure_liege_or_above = scope:de_jure_target } - } - } - } - } - } - custom_tooltip = expansion_take_target_title_tt - } - else_if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - is_title_created = yes - } - } - custom_tooltip = conquest_title_usurp_tt - } - #else = { custom_tooltip = expansion_create_target_title_tt } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -1878,8 +1301,7 @@ influence_war_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } - # Prestige loss for the attacker + on_white_peace_effect = yes # EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -1899,12 +1321,6 @@ influence_war_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1927,13 +1343,9 @@ influence_war_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -1961,16 +1373,6 @@ influence_war_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer diff --git a/common/casus_belli_types/07_ep3_wars.txt b/common/casus_belli_types/07_ep3_wars.txt index 2cd7345d0..de3fa9c94 100644 --- a/common/casus_belli_types/07_ep3_wars.txt +++ b/common/casus_belli_types/07_ep3_wars.txt @@ -13,17 +13,7 @@ } allowed_for_character_display_regardless = { - trigger_if = { - limit = { - culture = { - has_cultural_parameter = cb_lower_prestige_level_requirement - } - } - prestige_level >= 1 - } - trigger_else = { - prestige_level >= 2 - } + has_required_prestige_level_to_declare_war = { LEVEL = 2 } ep3_adventurer_invasion_allowed_for_character_display_regardless_trigger = yes } @@ -76,81 +66,7 @@ on_declaration = { on_declared_war = yes - scope:attacker.var:adventurer_invasion_supporter ?= { save_scope_as = supporter } - if = { - limit = { ep3_adventurer_sponsorship_valid_trigger = yes } - scope:attacker = { - # Save scopes and cleanup variables - set_variable = { - name = adventurer_invasion_supporter - value = scope:attacker.var:adventurer_invasion_supporter - } - scope:war ?= { - set_variable = { - name = adventurer_invasion_supporter - value = scope:attacker.var:adventurer_invasion_supporter - } - } - scope:attacker.var:adventurer_invasion_supporter ?= { - set_variable = { - name = adventurer_invasion_supportee - value = scope:attacker - } - } - # Opinion loss - reverse_add_opinion = { - target = scope:defender - modifier = sponsored_laamp_invasion_against_me_opinion - } - # Support - send_interface_toast = { - type = msg_troops_gained - title = ep3_laamp_sponsor_troops_tt - left_icon = scope:supporter - right_icon = scope:defender - if = { - limit = { exists = scope:supporter.var:adventurer_invasion_request_soldiers } - capital_barony = { save_scope_as = capital_barony } - spawn_army = { - men_at_arms = { - type = armored_footmen - stacks = 3 - } - men_at_arms = { - type = accolade_maa_archers - stacks = 4 - } - men_at_arms = { - type = armored_horsemen - stacks = 2 - } - levies = 100 - inheritable = yes - location = scope:attacker.capital_province - war = scope:war - war_keep_on_attacker_victory = yes - save_scope_as = new_army - name = ep3_laamp_invasion_event_army - } - scope:supporter = { remove_variable = adventurer_invasion_request_soldiers } - } - if = { - limit = { exists = scope:supporter.var:adventurer_invasion_join_war } - scope:war ?= { add_attacker = scope:supporter } - scope:supporter = { remove_variable = adventurer_invasion_join_war } - } - } - } - } - else_if = { - limit = { - OR = { - scope:supporter ?= scope:defender - scope:supporter.top_liege ?= scope:defender.top_liege - } - } - scope:attacker = { ep3_laamp_supporter_invalidated_effect = yes } - } + ep3_adventurer_sponsorship_invasion_effect = yes } on_victory_desc = { @@ -271,6 +187,8 @@ } on_victory = { + on_victory_aggressive_war_effect = yes + scope:attacker = { add_character_flag = { flag = domicile_culture_and_faith_check @@ -337,17 +255,17 @@ ordered_in_list = { list = target_titles limit = { tier = tier_county } - order_by = county_fertility + order_by = county_fertility save_temporary_scope_as = new_capital scope:attacker = { set_realm_capital = scope:new_capital } } } - ### Generally everyone prefers the highest development. + ### Generally everyone prefers the highest prosperity. else = { ordered_in_list = { list = target_titles limit = { tier = tier_county } - order_by = development_level + order_by = prosperity_level save_temporary_scope_as = new_capital scope:attacker = { set_realm_capital = scope:new_capital } } @@ -370,26 +288,8 @@ LOSER_ALLY_FAME_SCALE = 1 } - # Break alliances now out of diplo range - scope:attacker = { - every_ally = { - limit = { - NOT = { in_diplomatic_range = scope:attacker } - } - break_alliance = scope:attacker - } - } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - + break_alliance_due_to_diplo_range_effect = yes debug_log_scopes = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -403,6 +303,7 @@ } on_white_peace = { + on_white_peace_effect = yes scope:attacker = { ep3_laamp_support_variable_cleanup_effect = yes } #EP2 accolade glory gain for winning against higher ranked enemy @@ -414,10 +315,6 @@ value = miniscule_prestige_value #Less for counties multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -428,17 +325,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -461,10 +347,10 @@ } on_defeat = { + on_defeat_aggressive_war_effect = yes scope:attacker = { ep3_laamp_support_variable_cleanup_effect = yes } scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -492,17 +378,6 @@ WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -544,17 +419,7 @@ ep3_laamp_adventurer_duchy_invasion = { } allowed_for_character_display_regardless = { - trigger_if = { - limit = { - culture = { - has_cultural_parameter = cb_lower_prestige_level_requirement - } - } - prestige_level >= 2 - } - trigger_else = { - prestige_level >= 3 - } + has_required_prestige_level_to_declare_war = { LEVEL = 3 } ep3_adventurer_invasion_allowed_for_character_display_regardless_trigger = yes } @@ -573,11 +438,9 @@ ep3_laamp_adventurer_duchy_invasion = { } valid_to_start = { + ai_aggressive_cb_constraints = yes scope:target = { - any_in_de_jure_hierarchy = { - count >= 1 - tier = tier_county - } + is_landless_type_title = no # Also make sure you can't war for, like, the Papal States trigger_if = { limit = { holder.faith ?= root.faith } @@ -585,22 +448,6 @@ ep3_laamp_adventurer_duchy_invasion = { holder ?= { is_theocratic_lessee = yes } } } - trigger_if = { - limit = { - scope:attacker = { is_ai = yes } - } - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - count >= 2 - tier = tier_county - holder ?= { - OR = { - this = scope:defender - is_vassal_or_below_of = scope:defender - } - } - } - } } } @@ -625,81 +472,7 @@ ep3_laamp_adventurer_duchy_invasion = { on_declaration = { on_declared_war = yes - scope:attacker.var:adventurer_invasion_supporter ?= { save_scope_as = supporter } - if = { - limit = { ep3_adventurer_sponsorship_valid_trigger = yes } - scope:attacker = { - # Save scopes and cleanup variables - set_variable = { - name = adventurer_invasion_supporter - value = scope:attacker.var:adventurer_invasion_supporter - } - scope:war ?= { - set_variable = { - name = adventurer_invasion_supporter - value = scope:attacker.var:adventurer_invasion_supporter - } - } - scope:attacker.var:adventurer_invasion_supporter ?= { - set_variable = { - name = adventurer_invasion_supportee - value = scope:attacker - } - } - # Opinion loss - reverse_add_opinion = { - target = scope:defender - modifier = sponsored_laamp_invasion_against_me_opinion - } - # Support - send_interface_toast = { - type = msg_troops_gained - title = ep3_laamp_sponsor_troops_tt - left_icon = scope:supporter - right_icon = scope:defender - if = { - limit = { exists = scope:supporter.var:adventurer_invasion_request_soldiers } - capital_barony = { save_scope_as = capital_barony } - spawn_army = { - men_at_arms = { - type = armored_footmen - stacks = 3 - } - men_at_arms = { - type = accolade_maa_archers - stacks = 4 - } - men_at_arms = { - type = armored_horsemen - stacks = 2 - } - levies = 100 - inheritable = yes - location = scope:attacker.capital_province - war = scope:war - war_keep_on_attacker_victory = yes - save_scope_as = new_army - name = ep3_laamp_invasion_event_army - } - scope:supporter = { remove_variable = adventurer_invasion_request_soldiers } - } - if = { - limit = { exists = scope:supporter.var:adventurer_invasion_join_war } - scope:war ?= { add_attacker = scope:supporter } - scope:supporter = { remove_variable = adventurer_invasion_join_war } - } - } - } - } - else_if = { - limit = { - OR = { - scope:supporter ?= scope:defender - scope:supporter.top_liege ?= scope:defender.top_liege - } - } - scope:attacker = { ep3_laamp_supporter_invalidated_effect = yes } - } + ep3_adventurer_sponsorship_invasion_effect = yes } on_victory_desc = { @@ -813,6 +586,8 @@ ep3_laamp_adventurer_duchy_invasion = { } on_victory = { + on_victory_aggressive_war_effect = yes + scope:attacker = { add_character_flag = { flag = domicile_culture_and_faith_check @@ -913,17 +688,17 @@ ep3_laamp_adventurer_duchy_invasion = { ordered_in_list = { list = target_titles limit = { tier = tier_county } - order_by = county_fertility + order_by = county_fertility save_temporary_scope_as = new_capital scope:attacker = { set_realm_capital = scope:new_capital } } } - ### Generally everyone prefers the highest development. + ### Generally everyone prefers the highest prosperity. else = { ordered_in_list = { list = target_titles limit = { tier = tier_county } - order_by = development_level + order_by = prosperity_level save_temporary_scope_as = new_capital scope:attacker = { set_realm_capital = scope:new_capital } } @@ -946,24 +721,7 @@ ep3_laamp_adventurer_duchy_invasion = { LOSER_ALLY_FAME_SCALE = 1 } - # Break alliances now out of diplo range - scope:attacker = { - every_ally = { - limit = { - NOT = { in_diplomatic_range = scope:attacker } - } - break_alliance = scope:attacker - } - } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes + break_alliance_due_to_diplo_range_effect = yes } on_white_peace_desc = { @@ -977,6 +735,7 @@ ep3_laamp_adventurer_duchy_invasion = { } on_white_peace = { + on_white_peace_effect = yes scope:attacker = { ep3_laamp_support_variable_cleanup_effect = yes } #EP2 accolade glory gain for winning against higher ranked enemy @@ -988,10 +747,6 @@ ep3_laamp_adventurer_duchy_invasion = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -1002,17 +757,6 @@ ep3_laamp_adventurer_duchy_invasion = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1035,10 +779,10 @@ ep3_laamp_adventurer_duchy_invasion = { } on_defeat = { + on_defeat_aggressive_war_effect = yes scope:attacker = { ep3_laamp_support_variable_cleanup_effect = yes } scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -1066,17 +810,6 @@ ep3_laamp_adventurer_duchy_invasion = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -1119,17 +852,7 @@ ep3_laamp_adventurer_kingdom_invasion = { } allowed_for_character_display_regardless = { - trigger_if = { - limit = { - culture = { - has_cultural_parameter = cb_lower_prestige_level_requirement - } - } - prestige_level >= 3 - } - trigger_else = { - prestige_level >= 4 - } + has_required_prestige_level_to_declare_war = { LEVEL = 4 } ep3_adventurer_invasion_allowed_for_character_display_regardless_trigger = yes } @@ -1160,11 +883,9 @@ ep3_laamp_adventurer_kingdom_invasion = { } valid_to_start = { + ai_aggressive_cb_constraints = yes scope:target = { - any_in_de_jure_hierarchy = { - count >= 1 - tier = tier_county - } + is_landless_type_title = no # Also make sure you can't war for, like, the Papal States trigger_if = { limit = { holder.faith ?= root.faith } @@ -1172,22 +893,6 @@ ep3_laamp_adventurer_kingdom_invasion = { holder ?= { is_theocratic_lessee = yes } } } - trigger_if = { - limit = { - scope:attacker = { is_ai = yes } - } - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - count >= 8 - tier = tier_county - holder ?= { - OR = { - this = scope:defender - is_vassal_or_below_of = scope:defender - } - } - } - } } } @@ -1212,81 +917,7 @@ ep3_laamp_adventurer_kingdom_invasion = { on_declaration = { on_declared_war = yes - scope:attacker.var:adventurer_invasion_supporter ?= { save_scope_as = supporter } - if = { - limit = { ep3_adventurer_sponsorship_valid_trigger = yes } - scope:attacker = { - # Save scopes and cleanup variables - set_variable = { - name = adventurer_invasion_supporter - value = scope:attacker.var:adventurer_invasion_supporter - } - scope:war ?= { - set_variable = { - name = adventurer_invasion_supporter - value = scope:attacker.var:adventurer_invasion_supporter - } - } - scope:attacker.var:adventurer_invasion_supporter ?= { - set_variable = { - name = adventurer_invasion_supportee - value = scope:attacker - } - } - # Opinion loss - reverse_add_opinion = { - target = scope:defender - modifier = sponsored_laamp_invasion_against_me_opinion - } - # Support - send_interface_toast = { - type = msg_troops_gained - title = ep3_laamp_sponsor_troops_tt - left_icon = scope:supporter - right_icon = scope:defender - if = { - limit = { exists = scope:supporter.var:adventurer_invasion_request_soldiers } - capital_barony = { save_scope_as = capital_barony } - spawn_army = { - men_at_arms = { - type = armored_footmen - stacks = 3 - } - men_at_arms = { - type = accolade_maa_archers - stacks = 4 - } - men_at_arms = { - type = armored_horsemen - stacks = 2 - } - levies = 100 - inheritable = yes - location = scope:attacker.capital_province - war = scope:war - war_keep_on_attacker_victory = yes - save_scope_as = new_army - name = ep3_laamp_invasion_event_army - } - scope:supporter = { remove_variable = adventurer_invasion_request_soldiers } - } - if = { - limit = { exists = scope:supporter.var:adventurer_invasion_join_war } - scope:war ?= { add_attacker = scope:supporter } - scope:supporter = { remove_variable = adventurer_invasion_join_war } - } - } - } - } - else_if = { - limit = { - OR = { - scope:supporter ?= scope:defender - scope:supporter.top_liege ?= scope:defender.top_liege - } - } - scope:attacker = { ep3_laamp_supporter_invalidated_effect = yes } - } + ep3_adventurer_sponsorship_invasion_effect = yes } on_victory_desc = { @@ -1407,6 +1038,8 @@ ep3_laamp_adventurer_kingdom_invasion = { } on_victory = { + on_victory_aggressive_war_effect = yes + scope:attacker = { add_character_flag = { flag = domicile_culture_and_faith_check @@ -1501,17 +1134,17 @@ ep3_laamp_adventurer_kingdom_invasion = { ordered_in_list = { list = target_titles limit = { tier = tier_county } - order_by = county_fertility + order_by = county_fertility save_temporary_scope_as = new_capital scope:attacker = { set_realm_capital = scope:new_capital } } } - ### Generally everyone prefers the highest development. + ### Generally everyone prefers the highest prosperity. else = { ordered_in_list = { list = target_titles limit = { tier = tier_county } - order_by = development_level + order_by = prosperity_level save_temporary_scope_as = new_capital scope:attacker = { set_realm_capital = scope:new_capital } } @@ -1534,24 +1167,7 @@ ep3_laamp_adventurer_kingdom_invasion = { LOSER_ALLY_FAME_SCALE = 1 } - # Break alliances now out of diplo range - scope:attacker = { - every_ally = { - limit = { - NOT = { in_diplomatic_range = scope:attacker } - } - break_alliance = scope:attacker - } - } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes + break_alliance_due_to_diplo_range_effect = yes } on_white_peace_desc = { @@ -1565,6 +1181,7 @@ ep3_laamp_adventurer_kingdom_invasion = { } on_white_peace = { + on_white_peace_effect = yes scope:attacker = { ep3_laamp_support_variable_cleanup_effect = yes } #EP2 accolade glory gain for winning against higher ranked enemy @@ -1576,10 +1193,6 @@ ep3_laamp_adventurer_kingdom_invasion = { value = medium_prestige_value #More for kingdoms multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -1590,17 +1203,6 @@ ep3_laamp_adventurer_kingdom_invasion = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1623,10 +1225,10 @@ ep3_laamp_adventurer_kingdom_invasion = { } on_defeat = { + on_defeat_aggressive_war_effect = yes scope:attacker = { ep3_laamp_support_variable_cleanup_effect = yes } scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -1654,17 +1256,6 @@ ep3_laamp_adventurer_kingdom_invasion = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -1707,17 +1298,7 @@ ep3_laamp_adventurer_empire_invasion = { } allowed_for_character_display_regardless = { - trigger_if = { - limit = { - culture = { - has_cultural_parameter = cb_lower_prestige_level_requirement - } - } - prestige_level >= 4 - } - trigger_else = { - prestige_level >= 5 - } + has_required_prestige_level_to_declare_war = { LEVEL = 5 } ep3_adventurer_invasion_allowed_for_character_display_regardless_trigger = yes } @@ -1745,11 +1326,9 @@ ep3_laamp_adventurer_empire_invasion = { } valid_to_start = { + ai_aggressive_cb_constraints = yes scope:target = { - any_in_de_jure_hierarchy = { - count >= 1 - tier = tier_county - } + is_landless_type_title = no # Also make sure you can't war for, like, the Papal States trigger_if = { limit = { holder.faith ?= root.faith } @@ -1757,22 +1336,6 @@ ep3_laamp_adventurer_empire_invasion = { holder ?= { is_theocratic_lessee = yes } } } - trigger_if = { - limit = { - scope:attacker = { is_ai = yes } - } - any_in_de_jure_hierarchy = { - continue = { tier > tier_county } - count >= 16 - tier = tier_county - holder ?= { - OR = { - this = scope:defender - is_vassal_or_below_of = scope:defender - } - } - } - } } } @@ -1797,81 +1360,7 @@ ep3_laamp_adventurer_empire_invasion = { on_declaration = { on_declared_war = yes - scope:attacker.var:adventurer_invasion_supporter ?= { save_scope_as = supporter } - if = { - limit = { ep3_adventurer_sponsorship_valid_trigger = yes } - scope:attacker = { - # Save scopes and cleanup variables - set_variable = { - name = adventurer_invasion_supporter - value = scope:attacker.var:adventurer_invasion_supporter - } - scope:war ?= { - set_variable = { - name = adventurer_invasion_supporter - value = scope:attacker.var:adventurer_invasion_supporter - } - } - scope:attacker.var:adventurer_invasion_supporter ?= { - set_variable = { - name = adventurer_invasion_supportee - value = scope:attacker - } - } - # Opinion loss - reverse_add_opinion = { - target = scope:defender - modifier = sponsored_laamp_invasion_against_me_opinion - } - # Support - send_interface_toast = { - type = msg_troops_gained - title = ep3_laamp_sponsor_troops_tt - left_icon = scope:supporter - right_icon = scope:defender - if = { - limit = { exists = scope:supporter.var:adventurer_invasion_request_soldiers } - capital_barony = { save_scope_as = capital_barony } - spawn_army = { - men_at_arms = { - type = armored_footmen - stacks = 3 - } - men_at_arms = { - type = accolade_maa_archers - stacks = 4 - } - men_at_arms = { - type = armored_horsemen - stacks = 2 - } - levies = 100 - inheritable = yes - location = scope:attacker.capital_province - war = scope:war - war_keep_on_attacker_victory = yes - save_scope_as = new_army - name = ep3_laamp_invasion_event_army - } - scope:supporter = { remove_variable = adventurer_invasion_request_soldiers } - } - if = { - limit = { exists = scope:supporter.var:adventurer_invasion_join_war } - scope:war ?= { add_attacker = scope:supporter } - scope:supporter = { remove_variable = adventurer_invasion_join_war } - } - } - } - } - else_if = { - limit = { - OR = { - scope:supporter ?= scope:defender - scope:supporter.top_liege ?= scope:defender.top_liege - } - } - scope:attacker = { ep3_laamp_supporter_invalidated_effect = yes } - } + ep3_adventurer_sponsorship_invasion_effect = yes } on_victory_desc = { @@ -1992,6 +1481,8 @@ ep3_laamp_adventurer_empire_invasion = { } on_victory = { + on_victory_aggressive_war_effect = yes + scope:attacker = { add_character_flag = { flag = domicile_culture_and_faith_check @@ -2086,17 +1577,17 @@ ep3_laamp_adventurer_empire_invasion = { ordered_in_list = { list = target_titles limit = { tier = tier_county } - order_by = county_fertility + order_by = county_fertility save_temporary_scope_as = new_capital scope:attacker = { set_realm_capital = scope:new_capital } } } - ### Generally everyone prefers the highest development. + ### Generally everyone prefers the highest prosperity. else = { ordered_in_list = { list = target_titles limit = { tier = tier_county } - order_by = development_level + order_by = prosperity_level save_temporary_scope_as = new_capital scope:attacker = { set_realm_capital = scope:new_capital } } @@ -2126,24 +1617,7 @@ ep3_laamp_adventurer_empire_invasion = { LOSER_ALLY_FAME_SCALE = 1 } - # Break alliances now out of diplo range - scope:attacker = { - every_ally = { - limit = { - NOT = { in_diplomatic_range = scope:attacker } - } - break_alliance = scope:attacker - } - } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes + break_alliance_due_to_diplo_range_effect = yes } on_white_peace_desc = { @@ -2157,6 +1631,7 @@ ep3_laamp_adventurer_empire_invasion = { } on_white_peace = { + on_white_peace_effect = yes scope:attacker = { ep3_laamp_support_variable_cleanup_effect = yes } #EP2 accolade glory gain for winning against higher ranked enemy @@ -2168,10 +1643,6 @@ ep3_laamp_adventurer_empire_invasion = { value = major_prestige_value #More for empires multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -2182,17 +1653,6 @@ ep3_laamp_adventurer_empire_invasion = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -2215,10 +1675,10 @@ ep3_laamp_adventurer_empire_invasion = { } on_defeat = { + on_defeat_aggressive_war_effect = yes scope:attacker = { ep3_laamp_support_variable_cleanup_effect = yes } scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -2246,17 +1706,6 @@ ep3_laamp_adventurer_empire_invasion = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -2352,8 +1801,9 @@ ep3_laamp_raid_contract_cb = { } on_victory = { + on_victory_effect = yes + scope:attacker = { - show_pow_release_message_effect = yes accolade_attacker_war_end_glory_gain_low_effect = yes random_character_active_contract = { task_contract_type = laamp_raid_contract @@ -2374,8 +1824,8 @@ ep3_laamp_raid_contract_cb = { limit = { OR = { AND = { - has_dynasty = yes - dynasty = scope:defender.dynasty + scope:defender = { has_dynasty = yes } + dynasty ?= scope:defender.dynasty } is_consort_of = scope:defender } @@ -2459,12 +1909,12 @@ ep3_laamp_raid_contract_cb = { } add_to_list = definite_captives_list save_temporary_scope_as = future_captive - scope:task_contract_employer = { - imprison = { - target = scope:future_captive - type = dungeon - } + scope:task_contract_employer = { + imprison = { + target = scope:future_captive + type = dungeon } + } } random_in_list = { #Always try to grab a third person. list = potential_captives_list @@ -2524,12 +1974,12 @@ ep3_laamp_raid_contract_cb = { } add_to_list = definite_captives_list save_temporary_scope_as = future_captive - scope:task_contract_employer = { - imprison = { - target = scope:future_captive - type = dungeon - } + scope:task_contract_employer = { + imprison = { + target = scope:future_captive + type = dungeon } + } } if = { #If at least duchy-tier, try to grab a fourth person. limit = { primary_title.tier >= tier_duchy } @@ -2680,11 +2130,6 @@ ep3_laamp_raid_contract_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_attacker_victory_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -2693,13 +2138,7 @@ ep3_laamp_raid_contract_cb = { } on_white_peace = { - scope:attacker = { - show_pow_release_message_effect = yes - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } - } + on_white_peace_effect = yes scope:attacker = { add_prestige = { value = medium_prestige_loss @@ -2713,13 +2152,6 @@ ep3_laamp_raid_contract_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - # Truce - add_truce_attacker_victory_effect = yes scope:attacker = { random_character_active_contract = { task_contract_type = laamp_raid_contract @@ -2736,9 +2168,6 @@ ep3_laamp_raid_contract_cb = { complete_task_contract = failure_standard } } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -2746,10 +2175,9 @@ ep3_laamp_raid_contract_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -2788,15 +2216,6 @@ ep3_laamp_raid_contract_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { save_temporary_scope_as = loser } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_primary_attacker_death = inherit @@ -2832,25 +2251,6 @@ ep3_laamp_raid_contract_cb = { ai_score_mult = { value = 1 - # Increase odds if the character is a vassal with Ghazi Contract - add = { - if = { - limit = { - scope:attacker = { - top_liege != this - vassal_contract_has_flag = vassal_contract_cheaper_religious_war - } - } - add = 1 - } - } - # Holy War are limited to connected neighbour to limit big empire expansions over weak realms. - add = { - if = { - limit = { religious_war_vassals_constraints = yes } - add = -1000 - } - } } } @@ -3714,12 +3114,7 @@ imperial_expedition_cb = { } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } target_titles = all target_title_tier = duchy @@ -3727,24 +3122,14 @@ imperial_expedition_cb = { ignore_effect = change_title_holder ai_can_target_all_titles = { always = yes } - ai_score = { - value = byzantium_conquests_ai_score_value - # As a feudal gov, do not attack tribal - add = { - every_in_list = { - list = target_titles - if = { - limit = { feudal_clan_tribal_conquest_constraints = yes } - add = -1000 - } - } - } - # HOUSE RELATIONS - add = house_relation_ai_score_value - # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. - multiply = byzantium_conquests_ai_score_value - } + + # Always, always, _always_ do this. + ## Rationale: you request this via interaction, so we don't want you to get a request then just nothing happens for 20 years. + ## We don't do it manually because Code gets antsy if we sort complex war targeting from script. + ### We've got a little hack in anyway but it's just a teensy lil guy. + ai_score = 9999 + ai_score_mult = { value = 1 @@ -3758,20 +3143,11 @@ imperial_expedition_cb = { any_title_to_title_neighboring_duchy = { holder.top_liege ?= scope:attacker.liege } } } + ai_aggressive_cb_constraints = yes } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_religious_war_invalidation_region_message @@ -3789,21 +3165,7 @@ imperial_expedition_cb = { cost = { piety = { add = common_cb_impious_piety_cost - if = { - limit = { - scope:defender.faith = scope:attacker.faith - } - add = { - value = 100 - desc = CB_SAME_FAITH_COST - } - add = { - value = 10 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 800 - } - } + add = duchy_cb_piety_base_cost multiply = common_cb_piety_cost_multiplier # We want the AI to do this AQAP, so make it free for them. if = { @@ -3814,62 +3176,9 @@ imperial_expedition_cb = { } } prestige = { - value = 0 - if = { - limit = { - scope:defender.faith != scope:attacker.faith - } - add = { - value = 150 - desc = CB_COST_DIFFERENT_FAITH - } - add = { - value = 10 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 800 - } - } + add = duchy_cb_prestige_base_cost multiply = common_cb_prestige_cost_multiplier - if = { - limit = { - scope:attacker.house = { - OR = { - has_house_modifier = fp2_struggle_hostility_house_culture_modifier - has_house_modifier = fp2_struggle_hostility_house_combined_modifier - } - } - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - this = scope:attacker.culture - } - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - this = scope:defender.culture - } - } - divide = { - value = 2 - desc = CB_COST_FP2_STRUGGLE_HOSTILITY_CULTURE_DISCOUNT - } - } - if = { - limit = { - has_global_variable = fp2_struggle_compromise_ending - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - this = scope:attacker.culture - } - any_in_global_list = { - variable = fp2_struggle_ending_culture_list - this = scope:defender.culture - } - } - multiply = { - value = 2 - desc = CB_COST_FP2_STRUGGLE_COMPROMISE_MULTIPLIER - } - } + multiply = conquest_cb_prestige_cost_multiplier # We want the AI to do this AQAP, so make it free for them. if = { limit = { @@ -3937,10 +3246,7 @@ imperial_expedition_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes # Track which titles scope:attacker already has, so that we can leave them with holdings that should stay under their pre-existing titles if they opt to hand their gains over. scope:attacker = { @@ -3956,7 +3262,7 @@ imperial_expedition_cb = { add_claim_on_loss = yes } - # go through the dejure hierarchy under target titles, transfer eligible vassals and sieze counties from ineligible ones + # go through the dejure hierarchy under target titles, transfer eligible vassals and seize counties from ineligible ones every_in_list = { list = target_titles custom_tooltip = CONQUEST_CB_TITLE @@ -4004,19 +3310,11 @@ imperial_expedition_cb = { LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_attacker_victory_effect = yes - #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } # Aaaaand fire off the consequences event. scope:attacker = { trigger_event = diarchy.8011 } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -4030,8 +3328,7 @@ imperial_expedition_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } - # Prestige loss for the attacker + on_white_peace_effect = yes #EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -4051,12 +3348,6 @@ imperial_expedition_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -4079,13 +3370,9 @@ imperial_expedition_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -4111,14 +3398,6 @@ imperial_expedition_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { save_temporary_scope_as = loser } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -4141,12 +3420,6 @@ imperial_expedition_cb = { max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 - - # Always, always, _always_ do this. - ## Rationale: you request this via interaction, so we don't want you to get a request then just nothing happens for 20 years. - ## We don't do it manually because Code gets antsy if we sort complex war targeting from script. - ### We've got a little hack in anyway but it's just a teensy lil guy. - ai_score = 9999 } ep3_pillaging_foray = { @@ -4212,12 +3485,7 @@ ep3_pillaging_foray = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - holder = { target_is_same_character_or_above = scope:defender } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_county_conquest_war_invalidated_message @@ -4250,8 +3518,7 @@ ep3_pillaging_foray = { } on_victory = { - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_effect = yes scope:attacker = { if = { @@ -4309,60 +3576,7 @@ ep3_pillaging_foray = { #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } - - every_in_list = { - list = target_titles - save_scope_as = raid_county - # Set raided province modifier - title_province = { - add_province_modifier = { - modifier = recently_looted_modifier - years = 5 - } - } - show_as_tooltip = { - every_in_list = { - list = target_titles - fp2_border_raid_damage_effect = yes - } - } - # Find province for building destruction - ordered_county_province = { - order_by = num_buildings - random = { - chance = 25 - modifier = { factor = destroy_building_soldier_multiplier_value } # chance increases with more soldiers - modifier = { add = destroy_building_development_multiplier_value } # chance increases with development - custom_tooltip = destroy_random_building_tt - destroy_random_building_variable_effect = yes - } - } - } - - hidden_effect = { - scope:attacker = { - send_interface_message = { - type = event_raid_good - title = border_raid_message_title - show_as_tooltip = { - every_in_list = { - list = target_titles - fp2_border_raid_damage_effect = yes - } - } - } - } - scope:defender = { - send_interface_message = { - type = event_raid_bad - title = border_raid_message_title - every_in_list = { - list = target_titles - fp2_border_raid_damage_effect = yes - } - } - } - } + fp2_border_raid_effect = yes # Prestige Progress for the Attacker every_in_list = { @@ -4372,46 +3586,13 @@ ep3_pillaging_foray = { } } - # Prestige for the attacker's war allies - add_from_contribution_attackers = { - prestige = minor_prestige_value - opinion = { - modifier = contributed_in_war - } + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 } - - # Prestige for the defender's war allies - add_from_contribution_defenders = { - prestige = minor_prestige_value - opinion = { - modifier = contributed_in_war - } - } - - # Break alliances now out of diplo range - if = { - limit = { - scope:attacker = { - any_ally = { - NOT = { in_diplomatic_range = scope:attacker } - } - } - } - scope:attacker = { - every_ally = { - limit = { - NOT = { in_diplomatic_range = scope:attacker } - } - break_alliance = scope:attacker - } - } - } - - # Truce - add_truce_attacker_victory_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -4430,44 +3611,22 @@ ep3_pillaging_foray = { } on_white_peace = { + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { value = miniscule_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - # Prestige for the attacker's war allies - add_from_contribution_attackers = { - prestige = minor_prestige_value - opinion = { - modifier = contributed_in_war - } + modify_allies_of_participants_fame_values = { + WINNER = scope:attacker # not important as the scales are identical + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 } - - # Prestige for the defender's war allies - add_from_contribution_defenders = { - prestige = minor_prestige_value - opinion = { - modifier = contributed_in_war - } - } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -4486,14 +3645,12 @@ ep3_pillaging_foray = { } on_defeat = { - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_effect = yes scope:attacker = { change_influence = medium_influence_value } scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -4513,32 +3670,13 @@ ep3_pillaging_foray = { } } - # Prestige for the attacker's war allies - add_from_contribution_attackers = { - prestige = minor_prestige_value - opinion = { - modifier = contributed_in_war - } + modify_allies_of_participants_fame_values = { + WINNER = scope:defender + FAME_BASE = minor_prestige_value + IS_RELIGIOUS_WAR = no + WINNER_ALLY_FAME_SCALE = 1 + LOSER_ALLY_FAME_SCALE = 1 } - - # Prestige for the defender's war allies - add_from_contribution_defenders = { - prestige = minor_prestige_value - opinion = { - modifier = contributed_in_war - } - } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -4986,9 +4124,10 @@ ep3_laamp_apprehend_adventurer_cb = { on_victory_desc = { desc = ep3_laamp_apprehend_adventurer_cb_victory_desc } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } + on_victory_aggressive_war_effect = yes + #EP2 Accolade glory gain from winning against higher ranked enemy - scope:defender = { + scope:attacker = { accolade_defender_war_end_glory_gain_low_effect = yes add_prestige = { value = major_prestige_gain } } @@ -5010,8 +4149,8 @@ ep3_laamp_apprehend_adventurer_cb = { holder = scope:attacker change = scope:change } - resolve_title_and_vassal_change = scope:change } + resolve_title_and_vassal_change = scope:change } # Allies on both sides get full prestige value for helping in the war, based on their war participation. modify_allies_of_participants_fame_values = { @@ -5021,24 +4160,13 @@ ep3_laamp_apprehend_adventurer_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - scope:defender = { save_temporary_scope_as = loser } - on_lost_aggression_war_discontent_loss = yes - # Truce - add_truce_attacker_victory_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { desc = ep3_laamp_apprehend_adventurer_cb_white_peace_desc } on_white_peace = { + on_white_peace_effect = yes scope:attacker = { - show_pow_release_message_effect = yes - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } add_prestige = { value = medium_prestige_loss } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -5049,23 +4177,13 @@ ep3_laamp_apprehend_adventurer_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { desc = ep3_laamp_apprehend_adventurer_cb_defeat_desc } on_defeat = { + on_defeat_aggressive_war_effect = yes scope:attacker = { - show_pow_release_message_effect = yes accolade_attacker_war_end_glory_gain_low_effect = yes } rightfully_imprison_character_less_verbose_effect = { @@ -5094,9 +4212,6 @@ ep3_laamp_apprehend_adventurer_cb = { } } } - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes - } # Allies on both sides get full prestige value for helping in the war, based on their war participation. modify_allies_of_participants_fame_values = { WINNER = scope:defender @@ -5105,11 +4220,6 @@ ep3_laamp_apprehend_adventurer_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_attacker_defeat_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } full_occupation_by_defender_gives_victory = no @@ -5922,7 +5032,7 @@ ep3_laamp_peasant_war = { } ordered_in_list = { variable = war_supported_counties_list - order_by = development_level + order_by = prosperity_level save_scope_as = new_capital } create_character = { @@ -6004,16 +5114,17 @@ ep3_laamp_peasant_war = { } on_victory = { + on_victory_faction_war_effect = yes + scope:attacker = { ordered_in_list = { variable = war_supported_counties_list - order_by = development_level + order_by = prosperity_level save_scope_as = new_capital } primary_title = { save_scope_as = old_title } - show_pow_release_message_effect = yes #set this to not display the event to keep playing as landless set_variable = became_landed_through_separatist_uprising_var #swap the peasant trait for the better one @@ -6165,8 +5276,6 @@ ep3_laamp_peasant_war = { } } scope:defender = { - # Legitimacy effect - faction_war_end_defeat_legitimacy_effect = yes # Struggle Catalysts # hidden_effect = { # if = { @@ -6219,8 +5328,6 @@ ep3_laamp_peasant_war = { clear_variable_list = war_met_peasant_leaders_list remove_variable = ep3_laamp_peasant_war_remain_laamp } - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -6234,8 +5341,9 @@ ep3_laamp_peasant_war = { } on_white_peace = { + on_white_peace_faction_war_effect = yes + scope:attacker = { - show_pow_release_message_effect = yes #boost the county control up and remove the county corruption modifiers every_in_list = { variable = war_supported_counties_list @@ -6246,20 +5354,7 @@ ep3_laamp_peasant_war = { clear_variable_list = war_supported_counties_list clear_variable_list = war_met_peasant_leaders_list remove_variable = ep3_laamp_peasant_war_remain_laamp - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -6273,8 +5368,9 @@ ep3_laamp_peasant_war = { } on_defeat = { + on_defeat_faction_war_effect = yes + scope:attacker = { - show_pow_release_message_effect = yes #boost the county control up and remove the county corruption modifiers every_in_list = { variable = war_supported_counties_list @@ -6312,11 +5408,7 @@ ep3_laamp_peasant_war = { type = dungeon } } - mandala_peacemaker_perk_serenity_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_invalidated_desc = msg_invalidate_war_title @@ -6426,20 +5518,11 @@ admin_barbarian_conquest_cb = { kingdom != scope:defender.top_liege.primary_title } } + ai_aggressive_cb_constraints = yes } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_religious_war_invalidation_region_message @@ -6488,10 +5571,7 @@ admin_barbarian_conquest_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -6502,10 +5582,7 @@ admin_barbarian_conquest_cb = { add_claim_on_loss = yes } - # EP3 Laamp possibility warning - scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } - - # go through the dejure hierarchy under target titles, transfer eligible vassals and sieze counties from ineligible ones + # go through the dejure hierarchy under target titles, transfer eligible vassals and seize counties from ineligible ones every_in_list = { list = target_titles custom_tooltip = CONQUEST_CB_TITLE @@ -6550,63 +5627,6 @@ admin_barbarian_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - if = { # Warning that only counties are changing hands - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - } - } - random_in_list = { - list = target_titles - limit = { tier = tier_duchy } - save_scope_as = de_jure_target - } - } - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - holder = scope:defender - } - } - if = { - limit = { - scope:defender = { - any_held_title = { - tier = tier_county - NOT = { target_is_de_jure_liege_or_above = scope:de_jure_target } - } - } - } - custom_tooltip = conquest_title_not_transferred_tt - } - else = { custom_tooltip = conquest_title_destroyed_tt } - } - else = { - if = { - limit = { - any_in_list = { - list = target_titles - tier = tier_duchy - is_title_created = yes - } - } - custom_tooltip = conquest_title_usurp_tt - } - else = { custom_tooltip = conquest_title_create_tt } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -6620,8 +5640,7 @@ admin_barbarian_conquest_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } - # Prestige loss for the attacker + on_white_peace_effect = yes #EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -6641,11 +5660,6 @@ admin_barbarian_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -6668,13 +5682,9 @@ admin_barbarian_conquest_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -6702,16 +5712,6 @@ admin_barbarian_conquest_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer diff --git a/common/casus_belli_types/09_mpo_wars.txt b/common/casus_belli_types/09_mpo_wars.txt index 35ed04efd..a22005e37 100644 --- a/common/casus_belli_types/09_mpo_wars.txt +++ b/common/casus_belli_types/09_mpo_wars.txt @@ -36,8 +36,8 @@ migration_cb = { on_declared_war = yes scope:attacker = { every_in_list = { - variable = obedient_vassals - limit = { is_ai = yes } + variable = obedient_vassals + limit = { is_ai = yes } scope:war = { add_attacker = prev } } } @@ -54,9 +54,10 @@ migration_cb = { } on_victory = { - scope:attacker = { + on_victory_aggressive_war_effect = yes + + scope:attacker = { save_scope_as = duchy_war - show_pow_release_message_effect = yes if = { limit = { is_ai = yes @@ -68,9 +69,6 @@ migration_cb = { } } - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -83,7 +81,7 @@ migration_cb = { add_claim_on_loss = yes } - # go through the dejure hierarchy under target titles, transfer eligible vassals and sieze counties from ineligible ones + # go through the dejure hierarchy under target titles, transfer eligible vassals and seize counties from ineligible ones every_in_list = { list = target_titles custom_tooltip = MIGRATION_CB_TITLE @@ -101,7 +99,7 @@ migration_cb = { change = scope:change } } - + every_in_list = { list = titles_taken change_title_holder = { @@ -131,12 +129,6 @@ migration_cb = { LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - # Move into new lands scope:attacker = { domicile ?= { @@ -158,7 +150,7 @@ migration_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -178,8 +170,6 @@ migration_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_white_peace_effect = yes } on_defeat_desc = { @@ -193,16 +183,12 @@ migration_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - + on_defeat_aggressive_war_effect = yes + scope:attacker = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_negative" } scope:defender = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_positive" } - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -230,13 +216,6 @@ migration_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes } transfer_behavior = transfer @@ -257,7 +236,7 @@ migration_cb = { defender_score_from_battles_scale = 300 attacker_score_from_battles_scale = 300 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 } @@ -586,16 +565,9 @@ mpo_nomad_invasion_cb = { ai_score_mult = { value = 1 - # HOUSE RELATIONS - add = house_relation_ai_score_value - - # AI in struggles act insularly for wars that don't have a familial or legal basis. - multiply = struggle_wars_prioritise_struggle_targets_value - # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. - multiply = byzantium_conquests_ai_score_value - multiply = muslim_invasions_prefer_nonmuslims_ai_score_value - - multiply = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + add = common_cb_ai_score_mult_additive + multiply = aggressive_cb_ai_score_mult + multiply = common_cb_ai_score_mult } valid_to_start = { @@ -614,13 +586,10 @@ mpo_nomad_invasion_cb = { NOR = { has_holding_type = nomad_holding has_holding_type = herder_holding - } + } } holder ?= { - OR = { - this = scope:defender - is_vassal_or_below_of = scope:defender - } + target_is_same_character_or_above = scope:defender } } scope:defender = { @@ -644,27 +613,16 @@ mpo_nomad_invasion_cb = { OR = { has_holding_type = nomad_holding has_holding_type = herder_holding - } + } } } } } - } } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = { @@ -715,7 +673,6 @@ mpo_nomad_invasion_cb = { first_valid = { triggered_desc = { trigger = { - mpo_overrunner_becomes_tribal_desc_trigger = yes } desc = overrunning_war_victory_desc_tribal @@ -738,6 +695,8 @@ mpo_nomad_invasion_cb = { } on_victory = { + on_victory_aggressive_war_effect = yes + #GoK stops really being GoK scope:attacker = { gok_government_change_story_end_effect = yes @@ -770,10 +729,8 @@ mpo_nomad_invasion_cb = { } } } - - scope:attacker = { show_pow_release_message_effect = yes } - # Legitimacy and gold + # gold scope:attacker = { if = { limit = { @@ -786,7 +743,6 @@ mpo_nomad_invasion_cb = { else = { add_short_term_gold = major_gold_value } - add_legitimacy = medium_legitimacy_gain } #EP2 accolade glory gain for winning against higher ranked enemy @@ -933,7 +889,6 @@ mpo_nomad_invasion_cb = { } } } - } create_title_and_vassal_change = { type = independency @@ -989,10 +944,9 @@ mpo_nomad_invasion_cb = { } } } - + resolve_title_and_vassal_change = scope:change } - #Should gain target title, if possible scope:attacker = { @@ -1190,7 +1144,7 @@ mpo_nomad_invasion_cb = { } ordered_in_list = { list = duchy_capitals - order_by = development_level + order_by = prosperity_level culture = { save_scope_as = expelled_culture } scope:attacker = { set_realm_capital = prev @@ -1200,7 +1154,7 @@ mpo_nomad_invasion_cb = { #Most developed county else = { ordered_realm_county = { - order_by = development_level + order_by = prosperity_level limit = { kingdom = scope:target NOT = { @@ -1331,7 +1285,7 @@ mpo_nomad_invasion_cb = { #Convert additional tribal county if possible ordered_neighboring_county = { order_by = { - value = development_level + value = prosperity_level multiply = -1 } limit = { @@ -1362,9 +1316,9 @@ mpo_nomad_invasion_cb = { } } } - #Counties lose development levels + #Counties lose prosperity levels scope:target = { - custom_tooltip = attackers_counties_lose_development + custom_tooltip = attackers_counties_lose_prosperity } hidden_effect = { scope:attacker = { @@ -1383,22 +1337,22 @@ mpo_nomad_invasion_cb = { } } } - change_development_level = -1 + change_prosperity_level = -1 } else_if = { limit = { current_year < 1065 } - change_development_level = -2 + change_prosperity_level = -2 } else_if = { limit = { current_year < 1250 } - change_development_level = -3 + change_prosperity_level = -3 } else = { - change_development_level = -5 + change_prosperity_level = -4 } } } @@ -1416,15 +1370,6 @@ mpo_nomad_invasion_cb = { LOSER_ALLY_FAME_SCALE = 10 } - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - #Event for attacker scope:attacker = { trigger_event = { @@ -1452,7 +1397,7 @@ mpo_nomad_invasion_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -1467,27 +1412,11 @@ mpo_nomad_invasion_cb = { LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_white_peace_effect = yes - scope:attacker = { add_dread = minor_dread_loss add_legitimacy = minor_legitimacy_loss add_prestige = mongol_invasion_cb_prestige_white_peace - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1508,16 +1437,9 @@ mpo_nomad_invasion_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_aggressive_war_effect = yes - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -1534,10 +1456,10 @@ mpo_nomad_invasion_cb = { multiply = -1.0 } switch = { - trigger = has_realm_law - nomadic_authority_5 = { add_realm_law = nomadic_authority_4 } - nomadic_authority_4 = { add_realm_law = nomadic_authority_3 } - nomadic_authority_3 = { add_realm_law = nomadic_authority_2 } + trigger = has_realm_law + nomadic_authority_5 = { add_realm_law = nomadic_authority_4 } + nomadic_authority_4 = { add_realm_law = nomadic_authority_3 } + nomadic_authority_3 = { add_realm_law = nomadic_authority_2 } } } @@ -1560,16 +1482,6 @@ mpo_nomad_invasion_cb = { WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -1847,16 +1759,9 @@ mpo_nomad_duchy_invasion_cb = { ai_score_mult = { value = 1 - # HOUSE RELATIONS - add = house_relation_ai_score_value - - # AI in struggles act insularly for wars that don't have a familial or legal basis. - multiply = struggle_wars_prioritise_struggle_targets_value - # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. - multiply = byzantium_conquests_ai_score_value - multiply = muslim_invasions_prefer_nonmuslims_ai_score_value - - multiply = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + add = common_cb_ai_score_mult_additive + multiply = aggressive_cb_ai_score_mult + multiply = common_cb_ai_score_mult } valid_to_start = { @@ -1871,27 +1776,16 @@ mpo_nomad_duchy_invasion_cb = { OR = { has_holding_type = nomad_holding has_holding_type = herder_holding - } + } } } } } - } } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - target_is_same_character_or_above = scope:defender - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_invasion_war_invalidated_message @@ -1941,7 +1835,6 @@ mpo_nomad_duchy_invasion_cb = { first_valid = { triggered_desc = { trigger = { - mpo_overrunner_becomes_tribal_desc_trigger = yes } desc = overrunning_war_victory_desc_tribal @@ -1964,6 +1857,8 @@ mpo_nomad_duchy_invasion_cb = { } on_victory = { + on_victory_aggressive_war_effect = yes + #GoK stops really being GoK scope:attacker = { gok_government_change_story_end_effect = yes @@ -1985,8 +1880,6 @@ mpo_nomad_duchy_invasion_cb = { } } } - - scope:attacker = { show_pow_release_message_effect = yes } # Legitimacy and gold scope:attacker = { @@ -2127,7 +2020,7 @@ mpo_nomad_duchy_invasion_cb = { } } } - + scope:target = { custom_tooltip = overrunning_title_transfer_tt } @@ -2304,7 +2197,7 @@ mpo_nomad_duchy_invasion_cb = { #Most developed county else = { ordered_realm_county = { - order_by = development_level + order_by = prosperity_level limit = { kingdom = scope:target NOT = { @@ -2363,7 +2256,7 @@ mpo_nomad_duchy_invasion_cb = { #Vassals tooltip custom_tooltip = overrunning_vassals_gain_titles_duchy_tt } - #Counties lose development levels if not tribal + #Counties lose prosperity unless they are tribal, nomad, or herder if = { limit = { scope:attacker = { @@ -2383,10 +2276,10 @@ mpo_nomad_duchy_invasion_cb = { } } scope:target = { - custom_tooltip = attackers_counties_lose_development + custom_tooltip = attackers_counties_lose_prosperity } } - + hidden_effect = { scope:attacker = { every_held_title = { @@ -2407,16 +2300,16 @@ mpo_nomad_duchy_invasion_cb = { limit = { current_year < 1065 } - change_development_level = -1 + change_prosperity_level = -1 } else_if = { limit = { current_year < 1250 } - change_development_level = -2 + change_prosperity_level = -2 } else = { - change_development_level = -4 + change_prosperity_level = -4 } } } @@ -2452,15 +2345,6 @@ mpo_nomad_duchy_invasion_cb = { LOSER_ALLY_FAME_SCALE = 10 } - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - #Event for attacker scope:attacker = { trigger_event = { @@ -2488,8 +2372,7 @@ mpo_nomad_duchy_invasion_cb = { } on_white_peace = { - - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -2504,27 +2387,11 @@ mpo_nomad_duchy_invasion_cb = { LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_white_peace_effect = yes - scope:attacker = { add_dread = minor_dread_loss add_legitimacy = minor_legitimacy_loss add_prestige = mongol_invasion_cb_prestige_white_peace - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -2545,17 +2412,9 @@ mpo_nomad_duchy_invasion_cb = { } on_defeat = { + on_defeat_aggressive_war_effect = yes - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -2572,10 +2431,10 @@ mpo_nomad_duchy_invasion_cb = { multiply = -1.0 } switch = { - trigger = has_realm_law - nomadic_authority_5 = { add_realm_law = nomadic_authority_4 } - nomadic_authority_4 = { add_realm_law = nomadic_authority_3 } - nomadic_authority_3 = { add_realm_law = nomadic_authority_2 } + trigger = has_realm_law + nomadic_authority_5 = { add_realm_law = nomadic_authority_4 } + nomadic_authority_4 = { add_realm_law = nomadic_authority_3 } + nomadic_authority_3 = { add_realm_law = nomadic_authority_2 } } } @@ -2598,16 +2457,6 @@ mpo_nomad_duchy_invasion_cb = { WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -2639,7 +2488,7 @@ mpo_nomad_duchy_invasion_cb = { humiliation_cb = { icon = humiliation_cb group = humiliation - + ai_only_against_neighbors = yes allow_hostages = no @@ -2709,8 +2558,8 @@ humiliation_cb = { on_declared_war = yes scope:attacker = { every_in_list = { - variable = obedient_vassals - limit = { is_ai = yes } + variable = obedient_vassals + limit = { is_ai = yes } scope:war = { add_attacker = prev } } } @@ -2727,6 +2576,8 @@ humiliation_cb = { } on_victory = { + on_victory_effect = yes + # Lowers the Dominance leavel of the Defender scope:defender = { lower_dominance_level_effect = yes @@ -2737,7 +2588,7 @@ humiliation_cb = { mpo_release_herder_land_effect = yes } } - + scope:defender = { pay_herd = { target = scope:attacker @@ -2752,7 +2603,7 @@ humiliation_cb = { } } } - + # You "take" some of their Prestige scope:defender = { add_prestige = major_prestige_loss @@ -2760,7 +2611,7 @@ humiliation_cb = { scope:attacker = { add_prestige = major_prestige_gain } - + scope:defender = { # Some of their obedient vassals become not obedient custom_tooltip = humiliation_cb_not_obedient_tt @@ -2784,11 +2635,6 @@ humiliation_cb = { years = 5 } } - - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -2814,12 +2660,6 @@ humiliation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } } on_white_peace_desc = { @@ -2833,7 +2673,7 @@ humiliation_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -2853,8 +2693,6 @@ humiliation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_white_peace_effect = yes } on_defeat_desc = { @@ -2868,16 +2706,12 @@ humiliation_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - + on_defeat_aggressive_war_effect = yes + scope:attacker = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_negative" } scope:defender = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_positive" } - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -2905,13 +2739,6 @@ humiliation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes } transfer_behavior = transfer @@ -2963,7 +2790,7 @@ retaliation_cb = { } is_landed = yes } - + allowed_for_character_display_regardless = { # They're already your Tributary scope:defender = { NOT = { is_tributary_of = scope:attacker } @@ -2976,7 +2803,7 @@ retaliation_cb = { government_has_flag = government_is_nomadic } } - + ai_score = { value = { value = 100 @@ -3001,7 +2828,7 @@ retaliation_cb = { } } } - + ai_score_mult = { value = 3 } @@ -3050,8 +2877,8 @@ retaliation_cb = { on_declared_war = yes scope:attacker = { every_in_list = { - variable = obedient_vassals - limit = { is_ai = yes } + variable = obedient_vassals + limit = { is_ai = yes } scope:war = { add_attacker = prev } } } @@ -3068,6 +2895,8 @@ retaliation_cb = { } on_victory = { + on_victory_effect = yes + # Make them a Tributary if = { # This if/else exists for localization purposes, since it could be parsed before the war starts limit = { exists = root.war } @@ -3083,7 +2912,7 @@ retaliation_cb = { SUZERAIN = scope:attacker } } - + #If you tributarize a confederate, they leave their confederation if = { limit = { @@ -3095,7 +2924,7 @@ retaliation_cb = { remove_confederation_member = scope:defender } } - + # They pay you Herd or Gold if = { limit = { @@ -3117,8 +2946,8 @@ retaliation_cb = { } } } - - + + # You "take" some of their Prestige scope:defender = { if = { @@ -3154,11 +2983,6 @@ retaliation_cb = { add_prestige = scope:defender.minor_prestige_gain } } - - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -3183,12 +3007,6 @@ retaliation_cb = { LOSER_ALLY_FAME_SCALE = 1 } - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - # We clean up the CB hidden_effect = { scope:attacker = { @@ -3211,7 +3029,7 @@ retaliation_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -3231,8 +3049,6 @@ retaliation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_white_peace_effect = yes } on_defeat_desc = { @@ -3246,16 +3062,12 @@ retaliation_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - + on_defeat_effect = yes + scope:attacker = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_negative" } scope:defender = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_positive" } - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -3283,13 +3095,6 @@ retaliation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes } transfer_behavior = transfer @@ -3307,7 +3112,7 @@ retaliation_cb = { interface_priority = 79 attacker_wargoal_percentage = 0.8 - + max_defender_score_from_battles = 150 max_attacker_score_from_battles = 150 @@ -3333,7 +3138,7 @@ domination_cb = { use_de_jure_wargoal_only = yes target_de_jure_regions_above = yes white_peace_possible = no - + attacker_score_from_occupation_scale = 150 attacker_score_from_battles_scale = 150 defender_score_from_battles_scale = 150 @@ -3367,10 +3172,7 @@ domination_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes create_title_and_vassal_change = { type = conquest @@ -3391,9 +3193,6 @@ domination_cb = { scope:war = { every_war_defender = { custom = every_defender - limit = { - government_has_flag = government_is_in_steppe - } if = { limit = { exists = this.confederation @@ -3432,15 +3231,6 @@ domination_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -3449,7 +3239,7 @@ domination_cb = { trigger = { scope:defender = { is_local_player = yes } } desc = county_conquest_cb_white_peace_desc_defender } - + } } @@ -3473,10 +3263,7 @@ domination_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes + on_defeat_aggressive_war_effect = yes # Prestige loss for the attacker scope:attacker = { @@ -3487,8 +3274,7 @@ domination_cb = { add_dread = -50 } - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { # Prestige for Defender add_prestige_war_defender_effect = { PRESTIGE_VALUE = medium_prestige_value @@ -3503,16 +3289,6 @@ domination_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -3530,10 +3306,10 @@ domination_cb = { interface_priority = 75 attacker_wargoal_percentage = 1.5 - + max_defender_score_from_battles = 150 max_attacker_score_from_battles = 150 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 @@ -3548,18 +3324,18 @@ de_jure_cb_nomadic = { icon = individual_duchy_de_jure_cb group = de_jure should_check_for_interface_availability = no - + combine_into_one = yes should_show_war_goal_subview = yes mutually_exclusive_titles = { always = yes } - + allowed_for_character = { scope:attacker = { trigger_if = { limit = { is_ai = yes } - highest_held_title_tier >= tier_kingdom + highest_held_title_tier >= tier_kingdom } government_has_flag = government_is_nomadic highest_held_title_tier >= tier_duchy @@ -3577,7 +3353,7 @@ de_jure_cb_nomadic = { target_de_jure_regions_above = yes ignore_effect = change_title_holder ai_only_against_neighbors = yes - + valid_to_start = { scope:target = { trigger_if = { @@ -3604,19 +3380,16 @@ de_jure_cb_nomadic = { # Internal any_this_title_or_de_jure_above = { holder ?= { - OR = { - this = scope:attacker - target_is_liege_or_above = scope:attacker - } + target_is_same_character_or_above = scope:attacker } } - # External + # External AND = { scope:attacker = { highest_held_title_tier >= tier_kingdom } scope:target = { - NOT = { de_jure_liege = scope:attacker.primary_title } + de_jure_liege != scope:attacker.primary_title switch = { trigger = scope:target.tier tier_empire = { @@ -3685,20 +3458,7 @@ de_jure_cb_nomadic = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = { @@ -3725,7 +3485,7 @@ de_jure_cb_nomadic = { on_declaration = { on_declared_war = yes - } + } on_victory_desc = { first_valid = { @@ -3736,12 +3496,9 @@ de_jure_cb_nomadic = { desc = de_jure_cb_victory_desc } } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -3759,15 +3516,6 @@ de_jure_cb_nomadic = { WINNER_ALLY_FAME_SCALE = 20 LOSER_ALLY_FAME_SCALE = 20 } - - # truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -3779,9 +3527,9 @@ de_jure_cb_nomadic = { desc = de_jure_cb_white_peace_desc } } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -3812,13 +3560,6 @@ de_jure_cb_nomadic = { WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - # Defender neither gains nor loses any prestige. - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -3834,15 +3575,11 @@ de_jure_cb_nomadic = { desc = de_jure_cb_defeat_desc } } - - on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat = { + on_defeat_aggressive_war_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -3876,43 +3613,32 @@ de_jure_cb_nomadic = { WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + transfer_behavior = transfer - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "NOMAD_DEJURE_CB_WAR_NAME" war_name_base = "NOMAD_DEJURE_CB_WAR_NAME_BASE" cb_name = NOMAD_DEJURE_CB_NAME cb_name_no_target = NOMAD_DEJURE_CB_NAME_GENERIC interface_priority = 99 # Below the "take all" one - + attacker_wargoal_percentage = 0.8 - + max_defender_score_from_battles = 100 max_attacker_score_from_battles = 100 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 defender_ticking_warscore = 0.05 - + max_ai_diplo_distance_to_title = 500 ai_score_mult = { @@ -3933,17 +3659,10 @@ de_jure_cb_nomadic = { } multiply = 0.33 } - if = { - limit = { - scope:defender = { - any_owned_story = { - story_type = frankokratia_story - NOT = { has_variable = franko_war_complete } - } - } - } - multiply = 0 - } + + add = common_cb_ai_score_mult_additive + multiply = aggressive_cb_ai_score_mult + multiply = common_cb_ai_score_mult } } @@ -3954,7 +3673,7 @@ sovereignty_cb = { icon = retaliation_cb group = subjugation should_check_for_interface_availability = no - + allowed_for_character = { scope:attacker = { is_landed = yes @@ -3962,7 +3681,7 @@ sovereignty_cb = { limit = { is_ai = yes } - highest_held_title_tier >= tier_kingdom + highest_held_title_tier >= tier_kingdom } government_has_flag = government_is_nomadic } @@ -3980,7 +3699,7 @@ sovereignty_cb = { } target_titles = none ignore_effect = change_title_holder - + valid_to_start = { scope:defender = { any_tributary = { @@ -4024,7 +3743,7 @@ sovereignty_cb = { on_declaration = { on_declared_war = yes - } + } on_victory_desc = { first_valid = { @@ -4035,12 +3754,9 @@ sovereignty_cb = { desc = sovereignty_cb_victory_desc } } - + on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -4090,15 +3806,6 @@ sovereignty_cb = { WINNER_ALLY_FAME_SCALE = 20 LOSER_ALLY_FAME_SCALE = 20 } - - # truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -4110,9 +3817,9 @@ sovereignty_cb = { desc = sovereignty_cb_white_peace_desc } } - + on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -4138,13 +3845,6 @@ sovereignty_cb = { WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - # Defender neither gains nor loses any prestige. - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -4160,15 +3860,11 @@ sovereignty_cb = { desc = sovereignty_cb_defeat_desc } } - - on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat = { + on_defeat_aggressive_war_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -4196,40 +3892,29 @@ sovereignty_cb = { WINNER_ALLY_FAME_SCALE = 100 LOSER_ALLY_FAME_SCALE = 100 } - - # Truce - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + transfer_behavior = transfer - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "SOVEREIGNTY_WAR_CB_NAME" war_name_base = "SOVEREIGNTY_WAR_WAR_NAME_BASE" #cb_name = NOMAD_DEJURE_CB_NAME #cb_name_no_target = NOMAD_DEJURE_CB_NAME_GENERIC interface_priority = 99 # Below the "take all" one - + attacker_wargoal_percentage = 0.8 - + max_defender_score_from_occupation = 150 max_attacker_score_from_occupation = 150 defender_ticking_warscore = 0.05 - + max_ai_diplo_distance_to_title = 500 ai_score = { @@ -4263,7 +3948,8 @@ sovereignty_cb = { ai_score_mult = { value = 1 - multiply = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing + add = common_cb_ai_score_mult_additive + multiply = common_cb_ai_score_mult } } @@ -4316,23 +4002,14 @@ mpo_great_war_of_defiance_cb = { should_invalidate = { scope:defender = { - OR = { - #Is vassal for some reason - is_independent_ruler = no - #Is landless nobody for some reason - NOR = { - is_landed = yes - is_landless_ruler = yes - } - } - + is_independent_ruler = no } } on_invalidated_desc = { desc = msg_great_war_of_defiance_war_invalidated_message } - + on_invalidated = { scope:attacker = { random_character_war = { @@ -4356,7 +4033,6 @@ mpo_great_war_of_defiance_cb = { } mpo_gok_war_of_defiance_cleanup_effect = yes remove_global_variable = mpo_gok_war_ongoing - } on_victory_desc = { @@ -4374,6 +4050,8 @@ mpo_great_war_of_defiance_cb = { } on_victory = { + on_victory_effect = yes + scope:attacker = { random_character_war = { limit = { @@ -4390,10 +4068,6 @@ mpo_great_war_of_defiance_cb = { } mpo_gok_war_of_defiance_cleanup_effect = yes - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - scope:defender = { #Vassals all become independent... every_vassal = { @@ -4419,7 +4093,7 @@ mpo_great_war_of_defiance_cb = { add_legitimacy = monumental_legitimacy_loss if = { limit = { - government_has_flag = government_is_nomadic + government_has_flag = government_is_nomadic exists = domicile } domicile = { @@ -4479,7 +4153,7 @@ mpo_great_war_of_defiance_cb = { target = scope:defender } } - rightfully_imprison_character_less_verbose_effect = { + rightfully_imprison_character_less_verbose_effect = { TARGET = scope:defender IMPRISONER = scope:attacker } @@ -4497,8 +4171,6 @@ mpo_great_war_of_defiance_cb = { add_prestige_level = -1 } - scope:attacker = { show_pow_release_message_effect = yes } - #Memories #Memory for Gurkhan scope:defender = { @@ -4513,9 +4185,7 @@ mpo_great_war_of_defiance_cb = { every_in_list = { list = anti_gok_defenders limit = { - NOT = { - this = scope:defender - } + this != scope:defender } create_character_memory = { type = gok_defeated_defiance_war_defenders @@ -4534,7 +4204,6 @@ mpo_great_war_of_defiance_cb = { } } } - # Allies on both sides get full prestige value for helping in the war, based on their war participation. modify_allies_of_participants_fame_values = { @@ -4546,12 +4215,6 @@ mpo_great_war_of_defiance_cb = { } remove_global_variable = mpo_gok_war_ongoing - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - # Truce - add_truce_attacker_victory_effect = yes - #Notification event that Gurkhan is defeated every_player = { limit = { @@ -4582,10 +4245,12 @@ mpo_great_war_of_defiance_cb = { } desc = mpo_war_of_defiance_gok_wins_other } - + } on_defeat = { + save_scope_as = special_truce + on_defeat_effect = yes scope:defender = { random_character_war = { limit = { @@ -4599,7 +4264,7 @@ mpo_great_war_of_defiance_cb = { } } } - + scope:defender = { custom_tooltip = will_become_greatest_of_khans_tt primary_title = { @@ -4634,7 +4299,7 @@ mpo_great_war_of_defiance_cb = { } resolve_title_and_vassal_change = scope:change } - #They're the same rank... which is annoying + #They're the same rank... which is annoying else_if = { limit = { highest_held_title_tier = scope:defender.highest_held_title_tier @@ -4684,10 +4349,10 @@ mpo_great_war_of_defiance_cb = { resolve_title_and_vassal_change = scope:change } } - + add_legitimacy = monumental_legitimacy_gain add_prestige = monumental_prestige_gain - + custom_tooltip = great_war_of_defiance_attackers_gold_tt hidden_effect = { every_in_list = { @@ -4707,8 +4372,6 @@ mpo_great_war_of_defiance_cb = { # days = 1 # } } - # Truce - add_truce_attacker_defeat_effect = yes #Now uh... remove truces scope:defender = { @@ -4768,9 +4431,7 @@ mpo_great_war_of_defiance_cb = { every_in_list = { list = anti_gok_defenders limit = { - NOT = { - this = scope:defender - } + this != scope:defender } create_character_memory = { type = gok_won_defiance_war_defenders @@ -4799,9 +4460,6 @@ mpo_great_war_of_defiance_cb = { LOSER_ALLY_FAME_SCALE = 1 } - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - remove_global_variable = mpo_gok_war_ongoing } @@ -4824,7 +4482,7 @@ mpo_great_war_of_defiance_cb = { should_show_war_goal_subview = yes attacker_wargoal_percentage = 0.5 - + max_defender_score_from_occupation = 75 max_attacker_score_from_occupation = 150 @@ -4859,12 +4517,7 @@ mpo_gok_onslaught_cb = { } allowed_against_character = { - scope:attacker = { - ALL_FALSE = { - top_liege = scope:defender.top_liege - liege = scope:defender - } - } + scope:attacker.top_liege != scope:defender.top_liege } should_invalidate = { @@ -4877,7 +4530,7 @@ mpo_gok_onslaught_cb = { } on_invalidated_desc = msg_subjugation_war_invalidated_message - + on_invalidated = { } @@ -4915,7 +4568,10 @@ mpo_gok_onslaught_cb = { # Genghis Khan gets it for free if = { limit = { scope:attacker = { has_character_flag = is_temujin } } - multiply = 0 + multiply = { + value = 0 + desc = CB_GENGHIS_KHAN_COST + } } if = { limit = { @@ -4925,13 +4581,13 @@ mpo_gok_onslaught_cb = { } } } - + on_declaration = { on_declared_war = yes - } + } on_victory_desc = { - desc = { + desc = { first_valid = { triggered_desc = { trigger = { @@ -4994,14 +4650,15 @@ mpo_gok_onslaught_cb = { } } } - + on_victory = { + on_victory_aggressive_war_effect = yes + #Catalyst if used against China if = { limit = { exists = situation:dynastic_cycle scope:defender = { - any_character_situation = { this = situation:dynastic_cycle } @@ -5214,7 +4871,7 @@ mpo_gok_onslaught_cb = { } } } - + scope:attacker = { if = { limit = { @@ -5226,7 +4883,7 @@ mpo_gok_onslaught_cb = { target = scope:defender } } - rightfully_imprison_character_less_verbose_effect = { + rightfully_imprison_character_less_verbose_effect = { TARGET = scope:defender IMPRISONER = scope:attacker } @@ -5248,7 +4905,6 @@ mpo_gok_onslaught_cb = { target = scope:attacker gold = major_gold_value } - } gok_realm_devastation_effect = yes } @@ -5293,11 +4949,7 @@ mpo_gok_onslaught_cb = { gok_spawn_subjugated_quality_army_effect = { CHARACTER = scope:defender } } } - show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy if = { @@ -5319,7 +4971,7 @@ mpo_gok_onslaught_cb = { else = { scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } } - + #Transfer vassals hidden_effect = { scope:defender = { @@ -5503,7 +5155,7 @@ mpo_gok_onslaught_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 3 } - + # Prestige level progress for the attacker scope:attacker = { add_prestige_experience = { @@ -5518,16 +5170,10 @@ mpo_gok_onslaught_cb = { multiply = -1.0 } } - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { - desc = { + desc = { first_valid = { triggered_desc = { trigger = { scope:defender = { is_local_player = yes } } @@ -5537,8 +5183,9 @@ mpo_gok_onslaught_cb = { } } } - + on_white_peace = { + on_white_peace_effect = yes #Attacker gains all occupied counties scope:defender = { @@ -5563,8 +5210,6 @@ mpo_gok_onslaught_cb = { resolve_title_and_vassal_change = scope:change } - scope:attacker = { show_pow_release_message_effect = yes } - #EP2 accolade glory gain for doing ok against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_med_effect = yes } @@ -5577,25 +5222,16 @@ mpo_gok_onslaught_cb = { LOSER_ALLY_FAME_SCALE = 5 } - add_truce_white_peace_effect = yes - scope:attacker = { add_prestige = major_prestige_loss add_legitimacy = minor_legitimacy_loss - stress_and_fulfillment_impact = { - ambitious = minor_stress_impact_gain - arrogant = minor_stress_impact_gain - } } - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - gok_retribution_cleanup_effect = yes } on_defeat_desc = { - desc = { + desc = { first_valid = { triggered_desc = { trigger = { scope:attacker = { is_local_player = yes } } @@ -5609,12 +5245,20 @@ mpo_gok_onslaught_cb = { } } } - - on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + on_defeat = { + if = { + limit = { + NOR = { + scope:attacker = { is_ai = no } + scope:defender = { is_ai = no } + } + } + save_scope_as = no_penalty_for_defeat + } + on_defeat_aggressive_war_effect = yes + + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes } @@ -5627,10 +5271,7 @@ mpo_gok_onslaught_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 10 } - - # Truce - add_truce_attacker_defeat_effect = yes - + scope:defender = { if = { limit = { @@ -5639,9 +5280,6 @@ mpo_gok_onslaught_cb = { scope:attacker = { is_ai = no } # On the other hand, players shouldn't get away with it } } - - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes scope:attacker = { add_prestige = massive_prestige_loss @@ -5651,7 +5289,7 @@ mpo_gok_onslaught_cb = { arrogant = medium_stress_impact_gain } } - + add_prestige = mongol_invasion_cb_prestige_gain #They defeated Genghis Khan... maybe they're a worthy foe? if = { @@ -5690,7 +5328,7 @@ mpo_gok_onslaught_cb = { GOLD_VALUE = 5 } } - + scope:attacker = { every_vassal = { custom = custom.every_vassal @@ -5701,35 +5339,27 @@ mpo_gok_onslaught_cb = { } } } - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes } } - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - gok_retribution_cleanup_effect = yes } - + transfer_behavior = transfer - + on_primary_attacker_death = inherit on_primary_defender_death = inherit - + attacker_allies_inherit = yes defender_allies_inherit = yes - + war_name = "MPO_GOK_ONSLAUGHT_NAME" my_war_name = "MPO_GOK_ONSLAUGHT_NAME_MY" war_name_base = "MPO_GOK_ONSLAUGHT_NAME_BASE" cb_name = "MPO_GOK_ONSLAUGHT_NAME" - + interface_priority = 200 - + ticking_war_score_targets_entire_realm = yes attacker_wargoal_percentage = 0.8 attacker_ticking_warscore = 0 @@ -5737,22 +5367,13 @@ mpo_gok_onslaught_cb = { max_attacker_score_from_occupation = 150 attacker_score_from_occupation_scale = 50 defender_score_from_occupation_scale = 50 - + max_ai_diplo_distance_to_title = 500 ai_score_mult = { value = 10 - #Declaring war on the frankokratia leader can really ruin the whole thing - if = { - limit = { - scope:defender = { - any_owned_story = { - story_type = frankokratia_story - NOT = { has_variable = franko_war_complete } - } - } - } - multiply = 0 - } + add = common_cb_ai_score_mult_additive + multiply = aggressive_cb_ai_score_mult + multiply = frankokratia_leader_protection_value } } diff --git a/common/casus_belli_types/10_tgp_china_wars.txt b/common/casus_belli_types/10_tgp_china_wars.txt index b312e4867..51cfcb36d 100644 --- a/common/casus_belli_types/10_tgp_china_wars.txt +++ b/common/casus_belli_types/10_tgp_china_wars.txt @@ -62,19 +62,10 @@ china_seize_county_cb = { ai_only_against_neighbors = yes ai_score_mult = { - # As a feudal gov, do not attack owner of tribal holdings if you have a tribal holding to convert already - add = { - every_in_list = { - list = target_titles - if = { - limit = { feudal_clan_tribal_conquest_constraints = yes } - add = -1000 - } - } - } - - # AI in struggles act insularly for wars that don't have a familial or legal basis. - multiply = struggle_wars_prioritise_struggle_targets_value + value = 1 + add = common_cb_ai_score_mult_additive + multiply = aggressive_cb_ai_score_mult + multiply = common_cb_ai_score_mult } valid_to_start = { @@ -84,20 +75,7 @@ china_seize_county_cb = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_county_conquest_war_invalidated_message @@ -105,16 +83,7 @@ china_seize_county_cb = { cost = { prestige = { - add = { - value = 50 - desc = CB_BASE_COST - } - add = { - value = 2.5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 150 - } + add = county_cb_prestige_base_cost_with_influence multiply = common_cb_prestige_cost_multiplier } } @@ -140,13 +109,7 @@ china_seize_county_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes # EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -182,15 +145,6 @@ china_seize_county_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -204,17 +158,13 @@ china_seize_county_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -225,17 +175,6 @@ china_seize_county_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -258,16 +197,9 @@ china_seize_county_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_aggressive_war_effect = yes - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -292,16 +224,6 @@ china_seize_county_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -368,39 +290,21 @@ china_hegemon_seize_county_cb = { ai_only_against_neighbors = yes ai_score_mult = { - # As a feudal gov, do not attack owner of tribal holdings if you have a tribal holding to convert already - add = { - every_in_list = { - list = target_titles - if = { - limit = { feudal_clan_tribal_conquest_constraints = yes } - add = -1000 - } - } - } + value = 1 + add = common_cb_ai_score_mult_additive + multiply = aggressive_cb_ai_score_mult + multiply = common_cb_ai_score_mult } valid_to_start = { scope:target ?= { is_neighbor_to_realm = scope:attacker.top_liege } + ai_aggressive_cb_constraints = yes } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_county_conquest_war_invalidated_message @@ -408,29 +312,13 @@ china_hegemon_seize_county_cb = { cost = { prestige = { - add = { - value = 50 - desc = CB_BASE_COST - } - add = { - value = 2.5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 150 - } + add = county_cb_prestige_base_cost_with_influence multiply = common_cb_prestige_cost_multiplier } } on_declaration = { on_declared_war = yes - - # When this war is started, the chinese emperor loses legitimacy - scope:attacker = { - top_liege = { - add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } - } - } } on_victory_desc = { @@ -444,13 +332,7 @@ china_hegemon_seize_county_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes # EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -503,15 +385,6 @@ china_hegemon_seize_county_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -525,17 +398,13 @@ china_hegemon_seize_county_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -546,17 +415,6 @@ china_hegemon_seize_county_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -579,16 +437,9 @@ china_hegemon_seize_county_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_aggressive_war_effect = yes - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -613,16 +464,6 @@ china_hegemon_seize_county_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -710,19 +551,10 @@ china_seize_duchy_cb = { ai_only_against_neighbors = yes ai_score_mult = { - # As a feudal gov, do not attack owner of tribal holdings if you have a tribal holding to convert already - add = { - every_in_list = { - list = target_titles - if = { - limit = { feudal_clan_tribal_conquest_constraints = yes } - add = -1000 - } - } - } - - # AI in struggles act insularly for wars that don't have a familial or legal basis. - multiply = struggle_wars_prioritise_struggle_targets_value + value = 1 + add = common_cb_ai_score_mult_additive + multiply = aggressive_cb_ai_score_mult + multiply = common_cb_ai_score_mult } valid_to_start = { @@ -732,20 +564,7 @@ china_seize_duchy_cb = { } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_duchy_conquest_war_invalidated_message @@ -753,16 +572,7 @@ china_seize_duchy_cb = { cost = { prestige = { - add = { - value = 50 - desc = CB_BASE_COST - } - add = { - value = 2.5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 150 - } + add = county_cb_prestige_base_cost_with_influence multiply = common_cb_prestige_cost_multiplier } } @@ -789,13 +599,7 @@ china_seize_duchy_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes # EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -848,15 +652,6 @@ china_seize_duchy_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -870,17 +665,13 @@ china_seize_duchy_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -891,17 +682,6 @@ china_seize_duchy_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -924,16 +704,9 @@ china_seize_duchy_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_aggressive_war_effect = yes - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -958,16 +731,6 @@ china_seize_duchy_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -1034,39 +797,21 @@ china_hegemon_seize_duchy_cb = { ai_only_against_neighbors = yes ai_score_mult = { - # As a feudal gov, do not attack owner of tribal holdings if you have a tribal holding to convert already - add = { - every_in_list = { - list = target_titles - if = { - limit = { feudal_clan_tribal_conquest_constraints = yes } - add = -1000 - } - } - } + value = 1 + add = common_cb_ai_score_mult_additive + multiply = aggressive_cb_ai_score_mult + multiply = common_cb_ai_score_mult } valid_to_start = { scope:target ?= { is_neighbor_to_realm = scope:attacker.top_liege } + ai_aggressive_cb_constraints = yes } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_duchy_conquest_war_invalidated_message @@ -1074,29 +819,13 @@ china_hegemon_seize_duchy_cb = { cost = { prestige = { - add = { - value = 50 - desc = CB_BASE_COST - } - add = { - value = 2.5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 150 - } + add = county_cb_prestige_base_cost_with_influence multiply = common_cb_prestige_cost_multiplier } } on_declaration = { on_declared_war = yes - - # When this war is started, the chinese emperor loses legitimacy - scope:attacker = { - top_liege = { - add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } - } - } } on_victory_desc = { @@ -1110,13 +839,7 @@ china_hegemon_seize_duchy_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes # EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -1197,15 +920,6 @@ china_hegemon_seize_duchy_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -1219,17 +933,13 @@ china_hegemon_seize_duchy_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -1240,17 +950,6 @@ china_hegemon_seize_duchy_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1273,16 +972,9 @@ china_hegemon_seize_duchy_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_aggressive_war_effect = yes - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -1307,16 +999,6 @@ china_hegemon_seize_duchy_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -1356,7 +1038,7 @@ claim_the_mandate_cb = { is_ai = yes any_owned_story = { story_type = story_mongol_invasion - } + } } } allowed_for_character_display_regardless = { @@ -1416,52 +1098,7 @@ claim_the_mandate_cb = { } # LEGITIMACY AFFECTS COST - multiply = { - value = { - value = 0 - scope:attacker = { - if = { - limit = { has_legitimacy_flag = reduced_claim_cb_cost } - add = 0.5 - } - else_if = { - limit = { has_legitimacy_flag = very_reduced_claim_cb_cost } - add = 0.25 - } - else_if = { - limit = { has_legitimacy_flag = extra_reduced_claim_cb_cost } - add = 0.15 - } - else = { - add = 1 - } - } - } - desc = legitimacy_high_modifier_tt - } - multiply = { - value = { - value = 0 - scope:attacker = { - if = { - limit = { has_legitimacy_flag = massively_increased_claim_cb_cost } - add = 2.5 - } - else_if = { - limit = { has_legitimacy_flag = very_increased_claim_cb_cost } - add = 2 - } - else_if = { - limit = { has_legitimacy_flag = increased_claim_cb_cost } - add = 1.5 - } - else = { - add = 1 - } - } - } - desc = legitimacy_low_modifier_tt - } + multiply = claim_cb_cost_multiplier_legitimacy } } @@ -1499,14 +1136,7 @@ claim_the_mandate_cb = { } on_victory = { - # Dynastic cycle will shift through the on_title_gain on action - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 Accolade glory gain from winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -1569,15 +1199,6 @@ claim_the_mandate_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -1591,7 +1212,7 @@ claim_the_mandate_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -1603,10 +1224,6 @@ claim_the_mandate_cb = { value = medium_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -1617,17 +1234,6 @@ claim_the_mandate_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -1650,13 +1256,9 @@ claim_the_mandate_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_aggressive_war_effect = yes - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -1684,18 +1286,6 @@ claim_the_mandate_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:attacker = { - save_temporary_scope_as = loser - } - - # Truce - add_truce_attacker_defeat_effect = yes - - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_primary_attacker_death = inherit @@ -1720,6 +1310,9 @@ claim_the_mandate_cb = { max_ai_diplo_distance_to_title = 500 ai_score_mult = { + value = 1 + add = common_cb_ai_score_mult_additive + multiply = common_cb_ai_score_mult } } @@ -1799,6 +1392,7 @@ chinese_consolidation_cb = { ai_score_mult = { value = chinese_consolidation_ai_score_value #basic values + add = common_cb_ai_score_mult_additive add = 1 if = { limit = { @@ -1806,31 +1400,12 @@ chinese_consolidation_cb = { } multiply = 2 } - if = { - limit = { - scope:defender = { - primary_title = title:h_china - } - } - multiply = 3 - } + multiply = aggressive_cb_ai_score_mult + multiply = common_cb_ai_score_mult } should_invalidate = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } on_invalidated_desc = msg_religious_war_invalidation_region_message @@ -1838,40 +1413,11 @@ chinese_consolidation_cb = { cost = { piety = { add = common_cb_impious_piety_cost - if = { - limit = { - scope:defender.faith = scope:attacker.faith - } - add = { - value = 100 - desc = CB_SAME_FAITH_COST - } - add = { - value = 10 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 800 - } - } + add = duchy_cb_piety_base_cost multiply = common_cb_piety_cost_multiplier } prestige = { - value = 0 - if = { - limit = { - NOT = { scope:defender.faith = scope:attacker.faith } - } - add = { - value = 150 - desc = CB_COST_DIFFERENT_FAITH - } - add = { - value = 10 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 800 - } - } + add = duchy_cb_prestige_base_cost multiply = common_cb_prestige_cost_multiplier } } @@ -1891,10 +1437,7 @@ chinese_consolidation_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -1934,11 +1477,11 @@ chinese_consolidation_cb = { every_vassal_or_below = { limit = { primary_title.hegemony = title:h_china - liege = { - NOT = { - is_in_list = vassals_taken - } + liege = { + NOT = { + is_in_list = vassals_taken } + } } if = { limit = { @@ -1998,15 +1541,6 @@ chinese_consolidation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -2020,8 +1554,7 @@ chinese_consolidation_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } - # Prestige loss for the attacker + on_white_peace_effect = yes #EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -2041,12 +1574,6 @@ chinese_consolidation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -2060,13 +1587,9 @@ chinese_consolidation_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_aggressive_war_effect = yes - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -2094,16 +1617,6 @@ chinese_consolidation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -2130,7 +1643,7 @@ chinese_consolidation_cb = { attacker_score_from_occupation_scale = 150 attacker_score_from_battles_scale = 150 defender_score_from_battles_scale = 150 - + max_defender_score_from_battles = 100 max_attacker_score_from_battles = 100 @@ -2167,20 +1680,15 @@ chinese_reunification_cb = { ai_score_mult = { value = chinese_consolidation_ai_score_value #basic values add = 1 + add = common_cb_ai_score_mult_additive if = { limit = { scope:attacker.primary_title.tier >= tier_kingdom } multiply = 2 } - if = { - limit = { - scope:defender = { - primary_title = title:h_china - } - } - multiply = 3 - } + multiply = aggressive_cb_ai_score_mult + multiply = common_cb_ai_score_mult } valid_to_start = { @@ -2203,20 +1711,7 @@ chinese_reunification_cb = { } } } - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes } } @@ -2241,40 +1736,11 @@ chinese_reunification_cb = { cost = { piety = { add = common_cb_impious_piety_cost - if = { - limit = { - scope:defender.faith = scope:attacker.faith - } - add = { - value = 100 - desc = CB_SAME_FAITH_COST - } - add = { - value = 10 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 800 - } - } + add = duchy_cb_piety_base_cost multiply = common_cb_piety_cost_multiplier } prestige = { - value = 0 - if = { - limit = { - NOT = { scope:defender.faith = scope:attacker.faith } - } - add = { - value = 150 - desc = CB_COST_DIFFERENT_FAITH - } - add = { - value = 10 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 800 - } - } + add = duchy_cb_prestige_base_cost multiply = common_cb_prestige_cost_multiplier } } @@ -2292,15 +1758,9 @@ chinese_reunification_cb = { desc = invasion_war_victory_desc } } - - on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - # Influence - add_influence_attacker_victory_effect = yes + on_victory = { + on_victory_aggressive_war_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } @@ -2311,32 +1771,8 @@ chinese_reunification_cb = { add_claim_on_loss = yes } - show_as_tooltip = { - every_in_list = { - list = target_titles - custom_tooltip = invasion_title_transfer_tt - custom_tooltip = invasion_title_transfer_2_tt - every_in_de_jure_hierarchy = { - limit = { holder.top_liege = scope:defender } - change_title_holder = { - holder = scope:attacker - change = scope:change - } - } - } - scope:defender = { - every_sub_realm_county = { - limit = { - county_controller = scope:attacker - } - change_title_holder = { - holder = scope:attacker - change = scope:change - } - } - } - } - + on_victory_invasion_cb_take_occupied_tooltip = { VASSALIZE = no } + hidden_effect = { setup_invasion_cb = { titles = target_titles @@ -2359,18 +1795,6 @@ chinese_reunification_cb = { WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - #Mandalas gain or lose piety/devotion depending on Decree - mandala_war_victory_effects = yes } on_white_peace_desc = { @@ -2384,8 +1808,7 @@ chinese_reunification_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } - # Prestige loss for the attacker + on_white_peace_effect = yes #EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -2405,12 +1828,6 @@ chinese_reunification_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -2424,13 +1841,9 @@ chinese_reunification_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_aggressive_war_effect = yes - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -2458,16 +1871,6 @@ chinese_reunification_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } transfer_behavior = transfer @@ -2494,7 +1897,7 @@ chinese_reunification_cb = { attacker_score_from_occupation_scale = 150 attacker_score_from_battles_scale = 150 defender_score_from_battles_scale = 150 - + max_defender_score_from_battles = 100 max_attacker_score_from_battles = 100 @@ -2591,7 +1994,7 @@ silk_road_vassalization_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } + on_victory_aggressive_war_effect = yes create_title_and_vassal_change = { type = swear_fealty @@ -2630,12 +2033,6 @@ silk_road_vassalization_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_white_peace_desc = { @@ -2649,7 +2046,7 @@ silk_road_vassalization_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing ok against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -2660,10 +2057,6 @@ silk_road_vassalization_cb = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } # Allies on both sides get full prestige value for helping in the war, based on their war participation. @@ -2674,18 +2067,6 @@ silk_road_vassalization_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } - - # Truce - add_truce_white_peace_effect = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -2708,10 +2089,9 @@ silk_road_vassalization_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_aggressive_war_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -2739,18 +2119,6 @@ silk_road_vassalization_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:attacker = { - save_temporary_scope_as = loser - } - - # Truce - add_truce_attacker_defeat_effect = yes - - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_primary_attacker_death = inherit @@ -2774,24 +2142,6 @@ silk_road_vassalization_cb = { ai_score_mult = { value = 1 - # As a feudal gov never attack tribal for vassalization - add = { - if = { - limit = { - scope:attacker = { - NOT = { government_has_flag = government_is_tribal } - } - scope:defender = { - government_has_flag = government_is_tribal - } - } - add = -1000 - } - } - # HOUSE RELATIONS - add = house_relation_ai_score_value - # Tell the Romans to stop going adventuring into the steppe for no gods-damned reason. - multiply = byzantium_conquests_ai_score_value add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing @@ -2846,19 +2196,19 @@ grand_campaign_kingdom_invasion_cb = { any_great_project = { great_project_type = grand_campaign_project great_project_owner = title:h_china.holder - any_in_list = { - variable = grand_campaign_titles - holder ?= { + any_in_list = { + variable = grand_campaign_titles + holder ?= { OR = { this = scope:defender any_liege_or_above = { this = scope:defender } } - this != title:h_china.holder - top_overlord != title:h_china.holder - } - } + this != title:h_china.holder + top_overlord != title:h_china.holder + } + } } } valid_to_start = { @@ -2880,53 +2230,21 @@ grand_campaign_kingdom_invasion_cb = { ai_only_against_neighbors = yes ai_score_mult = { - # As a feudal gov, do not attack owner of tribal holdings if you have a tribal holding to convert already - add = { - every_in_list = { - list = target_titles - if = { - limit = { feudal_clan_tribal_conquest_constraints = yes } - add = -1000 - } - } - } # Use this war if you are the Grand Marshal if = { limit = { - has_title = title:e_minister_grand_marshal + scope:attacker = { has_title = title:e_minister_grand_marshal } } add = 1000 } - add = { - every_in_list = { - list = target_titles - if = { - limit = { feudal_clan_tribal_conquest_constraints = yes } - add = -1000 - } - } - } - - # AI in struggles act insularly for wars that don't have a familial or legal basis. - multiply = struggle_wars_prioritise_struggle_targets_value + add = common_cb_ai_score_mult_additive + multiply = aggressive_cb_ai_score_mult + multiply = common_cb_ai_score_mult } should_invalidate = { OR = { - NOT = { - any_in_list = { - list = target_titles - any_in_de_jure_hierarchy = { - tier = tier_county - holder = { - OR = { - this = scope:defender - target_is_liege_or_above = scope:defender - } - } - } - } - } + war_should_invalidate_defender_lost_target_lands_trigger = yes #invalidate when China gets into Chaos NOT = { exists = title:h_china.holder } } @@ -2947,16 +2265,7 @@ grand_campaign_kingdom_invasion_cb = { cost = { prestige = { - add = { - value = 50 - desc = CB_BASE_COST - } - add = { - value = 2.5 - multiply = scope:attacker.realm_size - desc = CB_REALM_SIZE_COST - max = 150 - } + add = county_cb_prestige_base_cost_with_influence multiply = common_cb_prestige_cost_multiplier } } @@ -3036,13 +2345,9 @@ grand_campaign_kingdom_invasion_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes - - # Influence - add_influence_attacker_victory_effect = yes + # There is no truce on purpose, you should be able to attack multiple times to succeed the project + save_scope_as = special_truce + on_victory_aggressive_war_effect = yes # EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -3075,7 +2380,7 @@ grand_campaign_kingdom_invasion_cb = { save_scope_as = great_project great_project_owner = { save_scope_as = hegemon - } + } } } # Take the titles and hand them to the Hegemon @@ -3093,12 +2398,12 @@ grand_campaign_kingdom_invasion_cb = { } limit = { holder.top_overlord != scope:hegemon - tier >= tier_county + tier >= tier_county } - change_title_holder = { - holder = scope:hegemon - change = scope:change - take_baronies = no + change_title_holder = { + holder = scope:hegemon + change = scope:change + take_baronies = no } } } @@ -3130,17 +2435,10 @@ grand_campaign_kingdom_invasion_cb = { WINNER_ALLY_FAME_SCALE = 10 LOSER_ALLY_FAME_SCALE = 10 } - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - # Inform Hegemon about the outcome scope:hegemon = { trigger_event = tgp_china_ministry.0002 } - # There is no truce on purpose, you should be able to attack multiple times to succeed the project } on_white_peace_desc = { @@ -3154,17 +2452,15 @@ grand_campaign_kingdom_invasion_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + #there is no truce on purpose, you should be able to attack multiple times to succeed the project + save_scope_as = special_truce + on_white_peace_effect = yes # Prestige loss for the attacker scope:attacker = { add_prestige = { value = minor_prestige_value multiply = -1.0 } - stress_and_fulfillment_impact = { - ambitious = medium_stress_impact_gain - arrogant = medium_stress_impact_gain - } } war.var:grand_campaign_project ?= { every_in_list = { @@ -3186,20 +2482,10 @@ grand_campaign_kingdom_invasion_cb = { LOSER_ALLY_FAME_SCALE = 1 } - scope:defender = { - stress_and_fulfillment_impact = { - arrogant = medium_stress_impact_gain - } - } # Inform Hegemon about the outcome scope:hegemon = { trigger_event = tgp_china_ministry.0003 } - - #there is no truce on purpose, you should be able to attack multiple times to succeed the project - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes } on_defeat_desc = { @@ -3222,16 +2508,11 @@ grand_campaign_kingdom_invasion_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + # There is no truce on purpose, you should be able to attack multiple times to succeed the project + save_scope_as = special_truce + on_defeat_aggressive_war_effect = yes - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - - # Influence - add_influence_attacker_defeat_effect = yes - - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes + scope:defender = { #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -3271,16 +2552,6 @@ grand_campaign_kingdom_invasion_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes - - # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold - laamp_as_mercenary_payout_tooltip_effect = yes - - # There is no truce on purpose, you should be able to attack multiple times to succeed the project } transfer_behavior = transfer diff --git a/common/casus_belli_types/10_tgp_japan_wars.txt b/common/casus_belli_types/10_tgp_japan_wars.txt index 13202e440..fac7c5a1e 100644 --- a/common/casus_belli_types/10_tgp_japan_wars.txt +++ b/common/casus_belli_types/10_tgp_japan_wars.txt @@ -1,4 +1,4 @@ - +# # War to install Bloc member -- Bloc Expansion #japan_install_bloc_member_cb = { # icon = bloc @@ -52,6 +52,7 @@ # # should_invalidate = { # OR = { +# war_should_invalidate_defender_lost_target_lands_trigger = yes # scope:attacker = { tgp_soryo_or_bushido_trigger = no } # scope:defender.house.house_confederation ?= scope:attacker.house.house_confederation # Same bloc already # NOT = { exists = scope:attacker.house.house_confederation } # Bloc destroyed @@ -101,15 +102,16 @@ # } # # on_victory = { -# -# scope:attacker = { show_pow_release_message_effect = yes } +# on_victory_effect = yes +# # they lost title but not taken by you +# scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } # # scope:attacker.house.house_confederation = { # leading_house.house_head = { # if = { # limit = { # is_ai = yes -# NOT = { this = scope:attacker} +# this != scope:attacker # } # add_opinion = { # target = scope:attacker @@ -120,9 +122,6 @@ # } # } # -# # Legitimacy -# add_legitimacy_attacker_victory_effect = yes -# # #EP2 Accolade glory gain from winning against higher ranked enemy # scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } # @@ -146,9 +145,6 @@ # } # } # -# # EP3 Laamp possibility warning -# scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } -# # # Prestige Progress for the Attacker # every_in_list = { # list = target_titles @@ -163,12 +159,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_white_peace_desc = { @@ -182,12 +172,8 @@ # } # # on_white_peace = { +# on_white_peace_effect = yes # scope:attacker = { -# show_pow_release_message_effect = yes -# stress_and_fulfillment_impact = { -# ambitious = medium_stress_impact_gain -# arrogant = medium_stress_impact_gain -# } # add_prestige = medium_prestige_loss # } # @@ -199,18 +185,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# scope:defender = { -# stress_and_fulfillment_impact = { -# arrogant = medium_stress_impact_gain -# } -# } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_defeat_desc = { @@ -224,13 +198,9 @@ # } # # on_defeat = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_defeat_effect = yes +# on_defeat_effect = yes # # scope:defender = { -# mandala_peacemaker_perk_serenity_effect = yes # #EP2 accolade glory gain for winning against higher ranked enemy # accolade_defender_war_end_glory_gain_high_effect = yes # } @@ -256,15 +226,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_defeat_effect = yes -# -# scope:attacker = { save_temporary_scope_as = loser } -# on_lost_aggression_war_discontent_loss = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_primary_attacker_death = inherit @@ -416,10 +377,7 @@ # } # # on_victory = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_victory_effect = yes +# on_victory_aggressive_war_effect = yes # # #EP2 Accolade glory gain from winning against higher ranked enemy # scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -443,9 +401,6 @@ # add_claim_on_loss = yes # } # -# # EP3 Laamp possibility warning -# scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } -# # #As this is just a county conquest, simply grab the designated county. # every_in_list = { # list = target_titles @@ -463,7 +418,6 @@ # scope:attacker = { add_prestige_experience = minor_prestige_value } # } # -# # # Allies on both sides get full prestige value for helping in the war, based on their war participation. # modify_allies_of_participants_fame_values = { # WINNER = scope:attacker @@ -472,12 +426,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_white_peace_desc = { @@ -497,12 +445,8 @@ # } # # on_white_peace = { +# on_white_peace_effect = yes # scope:attacker = { -# show_pow_release_message_effect = yes -# stress_and_fulfillment_impact = { -# ambitious = medium_stress_impact_gain -# arrogant = medium_stress_impact_gain -# } # add_prestige = medium_prestige_loss # } # @@ -514,18 +458,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# scope:defender = { -# stress_and_fulfillment_impact = { -# arrogant = medium_stress_impact_gain -# } -# } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_defeat_desc = { @@ -545,13 +477,9 @@ # } # # on_defeat = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_defeat_effect = yes +# on_defeat_aggressive_war_effect = yes # # scope:defender = { -# mandala_peacemaker_perk_serenity_effect = yes # #EP2 accolade glory gain for winning against higher ranked enemy # accolade_defender_war_end_glory_gain_high_effect = yes # } @@ -577,15 +505,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_defeat_effect = yes -# -# scope:attacker = { save_temporary_scope_as = loser } -# on_lost_aggression_war_discontent_loss = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # transfer_behavior = transfer @@ -620,6 +539,8 @@ # } # multiply = 0 # } +# multiply = aggressive_cb_ai_score_mult +# multiply = common_cb_ai_score_mult # } #} # @@ -668,12 +589,11 @@ # # should_invalidate = { # OR = { +# war_should_invalidate_defender_lost_target_lands_trigger = yes # NOT = { # scope:attacker = { tgp_soryo_or_bushido_trigger = yes } # } -# scope:defender = { -# top_liege != scope:attacker.top_liege -# } +# scope:defender.top_liege != scope:attacker.top_liege # } # } # @@ -726,10 +646,7 @@ # } # # on_victory = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_victory_effect = yes +# on_victory_aggressive_war_effect = yes # # #EP2 Accolade glory gain from winning against higher ranked enemy # scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -753,9 +670,6 @@ # add_claim_on_loss = yes # } # -# # EP3 Laamp possibility warning -# scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } -# # #As this is just a county conquest, simply grab the designated county. # every_in_list = { # list = target_titles @@ -773,7 +687,6 @@ # scope:attacker = { add_prestige_experience = minor_prestige_value } # } # -# # # Allies on both sides get full prestige value for helping in the war, based on their war participation. # modify_allies_of_participants_fame_values = { # WINNER = scope:attacker @@ -782,12 +695,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_white_peace_desc = { @@ -807,12 +714,8 @@ # } # # on_white_peace = { +# on_white_peace_effect = yes # scope:attacker = { -# show_pow_release_message_effect = yes -# stress_and_fulfillment_impact = { -# ambitious = medium_stress_impact_gain -# arrogant = medium_stress_impact_gain -# } # add_prestige = medium_prestige_loss # } # @@ -824,18 +727,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# scope:defender = { -# stress_and_fulfillment_impact = { -# arrogant = medium_stress_impact_gain -# } -# } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_defeat_desc = { @@ -855,13 +746,9 @@ # } # # on_defeat = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_defeat_effect = yes +# on_defeat_aggressive_war_effect = yes # # scope:defender = { -# mandala_peacemaker_perk_serenity_effect = yes # #EP2 accolade glory gain for winning against higher ranked enemy # accolade_defender_war_end_glory_gain_high_effect = yes # } @@ -887,15 +774,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_defeat_effect = yes -# -# scope:attacker = { save_temporary_scope_as = loser } -# on_lost_aggression_war_discontent_loss = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_primary_attacker_death = inherit @@ -1021,10 +899,9 @@ # } # # on_victory = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_victory_effect = yes +# on_victory_effect = yes +# # they lost title but not taken by you +# scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } # # #EP2 Accolade glory gain from winning against higher ranked enemy # scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -1046,9 +923,6 @@ # add_claim_on_loss = yes # } # -# # EP3 Laamp possibility warning -# scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } -# # scope:defender = { # every_held_title = { # limit = { @@ -1092,12 +966,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_white_peace_desc = { @@ -1105,12 +973,8 @@ # } # # on_white_peace = { +# on_white_peace_effect = yes # scope:attacker = { -# show_pow_release_message_effect = yes -# stress_and_fulfillment_impact = { -# ambitious = medium_stress_impact_gain -# arrogant = medium_stress_impact_gain -# } # add_prestige = medium_prestige_loss # } # @@ -1122,18 +986,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# scope:defender = { -# stress_and_fulfillment_impact = { -# arrogant = medium_stress_impact_gain -# } -# } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_defeat_desc = { @@ -1147,13 +999,9 @@ # } # # on_defeat = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_defeat_effect = yes +# on_defeat_effect = yes # # scope:defender = { -# mandala_peacemaker_perk_serenity_effect = yes # #EP2 accolade glory gain for winning against higher ranked enemy # accolade_defender_war_end_glory_gain_high_effect = yes # } @@ -1181,15 +1029,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_defeat_effect = yes -# -# scope:attacker = { save_temporary_scope_as = loser } -# on_lost_aggression_war_discontent_loss = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_primary_attacker_death = inherit @@ -1306,6 +1145,7 @@ # # should_invalidate = { # OR = { +# war_should_invalidate_defender_lost_target_lands_trigger = yes # scope:attacker = { japan_imperial_expansion_cb_allowed_for_character_trigger = no } # scope:defender = { japan_imperial_expansion_cb_allowed_against_character_trigger = no } # } @@ -1351,10 +1191,7 @@ # } # # on_victory = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_victory_effect = yes +# on_victory_aggressive_war_effect = yes # # #EP2 Accolade glory gain from winning against higher ranked enemy # scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -1365,9 +1202,6 @@ # add_claim_on_loss = yes # } # -# # EP3 Laamp possibility warning -# scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } -# # #As this is just a county conquest, simply grab the designated county. # every_in_list = { # list = target_titles @@ -1418,12 +1252,6 @@ # LOSER_ALLY_FAME_SCALE = 1 # } # -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # FP1: note the victory for future memorialisation via stele (if applicable). -# scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } -# # if = { # Warning that only counties are changing hands # limit = { # any_in_list = { @@ -1437,9 +1265,6 @@ # save_scope_as = de_jure_target # } # } -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_white_peace_desc = { @@ -1455,8 +1280,7 @@ # } # # on_white_peace = { -# scope:attacker = { show_pow_release_message_effect = yes } -# # Prestige loss for the attacker +# on_white_peace_effect = yes # # #EP2 accolade glory gain for doing pretty good against higher ranked enemy # scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -1476,11 +1300,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# add_truce_white_peace_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_defeat_desc = { @@ -1496,13 +1315,9 @@ # } # # on_defeat = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_defeat_effect = yes +# on_defeat_aggressive_war_effect = yes # # scope:defender = { -# mandala_peacemaker_perk_serenity_effect = yes # #EP2 accolade glory gain for winning against higher ranked enemy # accolade_defender_war_end_glory_gain_high_effect = yes # # Prestige for Defender @@ -1530,15 +1345,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_defeat_effect = yes -# -# scope:attacker = { save_temporary_scope_as = loser } -# on_lost_aggression_war_discontent_loss = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_primary_attacker_death = inherit @@ -1590,7 +1396,7 @@ # # combine_into_one = yes # should_show_war_goal_subview = yes -# mutually_exclusive_titles = { always = yes } +# mutually_exclusive_titles = { always = yes } # # cost = { # prestige = { @@ -1610,7 +1416,7 @@ # allow_hostages = no # # target_titles = all -# target_title_tier = all +# target_title_tier = duchy # target_de_jure_regions_above = yes # ignore_effect = change_title_holder # ai_only_against_neighbors = yes @@ -1632,7 +1438,6 @@ # # valid_to_start = { # scope:target = { -# tier = tier_duchy # empire = title:e_japan # } # } @@ -1647,6 +1452,7 @@ # # should_invalidate = { # OR = { +# war_should_invalidate_defender_lost_target_lands_trigger = yes # scope:attacker = { japan_imperial_reconquest_cb_allowed_for_character_trigger = no } # scope:defender = { japan_imperial_reconquest_cb_allowed_against_character_trigger = no } # } @@ -1687,10 +1493,7 @@ # } # # on_victory = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_victory_effect = yes +# on_victory_aggressive_war_effect = yes # # #EP2 Accolade glory gain from winning against higher ranked enemy # scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } @@ -1707,9 +1510,6 @@ # } # } # -# # EP3 Laamp possibility warning -# scope:defender = { ep3_war_loss_adventurer_tt_effect = yes } -# # create_title_and_vassal_change = { # type = conquest # save_scope_as = change @@ -1743,12 +1543,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_white_peace_desc = { @@ -1764,7 +1558,7 @@ # } # # on_white_peace = { -# scope:attacker = { show_pow_release_message_effect = yes } +# on_white_peace_effect = yes # # #EP2 accolade glory gain for doing ok against higher ranked enemy # scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -1775,12 +1569,6 @@ # victory = no # title = scope:target # } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_defeat_desc = { @@ -1796,13 +1584,9 @@ # } # # on_defeat = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_defeat_effect = yes +# on_defeat_aggressive_war_effect = yes # # scope:defender = { -# mandala_peacemaker_perk_serenity_effect = yes # #EP2 accolade glory gain for winning against higher ranked enemy # accolade_defender_war_end_glory_gain_high_effect = yes # } @@ -1819,15 +1603,6 @@ # victory = no # title = scope:target # } -# -# # Truce -# add_truce_attacker_defeat_effect = yes -# -# scope:attacker = { save_temporary_scope_as = loser } -# on_lost_aggression_war_discontent_loss = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_primary_attacker_death = inherit @@ -1910,21 +1685,13 @@ # triggered_desc = { # trigger = { # scope:defender = { is_local_player = yes } -# OR = { -# NOT = { exists = scope:attacker.var:initial_target } -# scope:defender = scope:attacker.var:initial_target -# scope:defender.primary_title.tier <= scope:attacker.var:target_tier -# } +# depose_war_victory_trigger = yes # } # desc = japan_refused_ritsuryo_cb_victory_desc_defender # } # triggered_desc = { # trigger = { -# OR = { -# NOT = { exists = scope:attacker.var:initial_target } -# scope:defender = scope:attacker.var:initial_target -# scope:defender.primary_title.tier <= scope:attacker.var:target_tier -# } +# depose_war_victory_trigger = yes # } # desc = japan_refused_ritsuryo_cb_victory_desc # } @@ -1932,13 +1699,12 @@ # } # # on_victory = { -# scope:attacker = { show_pow_release_message_effect = yes } +# on_victory_faction_war_effect = yes # # #EP2 Accolade glory gain from winning against higher ranked enemy # scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } # # scope:defender = { -# # # If we win the rebellion, our liege loses any legal right to imprison us/banish us/revoke our titles. # consume_all_criminal_reasons_effect = { # LIEGE = scope:defender @@ -1973,9 +1739,6 @@ # resolve_title_and_vassal_change = scope:title_change # } # -# # LEGITIMACY FROM LOSING FACTION WAR -# faction_war_end_defeat_legitimacy_effect = yes -# # hidden_effect = { # scope:attacker = { # add_truce_both_ways = { @@ -1986,9 +1749,6 @@ # } # } # } -# -# #Mandalas gain or lose piety/devotion depending on Decree -# mandala_war_victory_effects = yes # } # # on_white_peace_desc = { @@ -1999,34 +1759,10 @@ # } # desc = japan_refused_ritsuryo_cb_white_peace_desc # } -# # } # # on_white_peace = { -# scope:attacker = { -# show_pow_release_message_effect = yes -# stress_and_fulfillment_impact = { -# ambitious = medium_stress_impact_gain -# arrogant = medium_stress_impact_gain -# } -# } -# -# scope:defender = { -# stress_and_fulfillment_impact = { -# arrogant = medium_stress_impact_gain -# } -# } -# hidden_effect = { -# scope:attacker = { -# add_truce_both_ways = { -# character = scope:defender -# days = 1825 -# war = root.war -# result = white_peace -# } -# } -# } -# on_white_peace_request_revolt_war = yes +# on_white_peace_faction_war_effect = yes # } # # on_defeat_desc = { @@ -2037,20 +1773,17 @@ # } # desc = japan_refused_ritsuryo_cb_defeat_desc # } -# # } # # on_defeat = { -# scope:attacker = { show_pow_release_message_effect = yes } +# on_defeat_faction_war_effect = yes +# # scope:defender = { # add_character_flag = { # flag = recent_liberty_faction_war # years = 10 # } # add_dread = medium_dread_gain -# -# # LEGITIMACY FROM WINNING FACTION WAR -# faction_war_end_victory_legitimacy_effect = yes # } # # # For revoking titles of character's imprisoned abroad who have lost a revocation war @@ -2070,11 +1803,6 @@ # } # } # } -# -# on_lost_request_revolt_war = yes -# -# #Mandalas gain or lose piety/devotion depending on Decree -# mandala_war_defeat_effects = yes # } # # on_invalidated_desc = msg_invalidate_war_title @@ -2104,6 +1832,13 @@ # max_attacker_score_from_occupation = 150 # # max_ai_diplo_distance_to_title = 500 +# +# ai_score_mult = { +# value = 1 +# add = common_cb_ai_score_mult_additive +# multiply = aggressive_cb_ai_score_mult +# multiply = common_cb_ai_score_mult +# } #} # ## Eradicate Rival House @@ -2197,6 +1932,8 @@ # } # # on_victory = { +# on_victory_aggressive_war_effect = yes +# # scope:attacker = { # if = { # limit = { @@ -2209,11 +1946,6 @@ # } # } # -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_victory_effect = yes -# # #EP2 Accolade glory gain from winning against higher ranked enemy # scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } # @@ -2274,12 +2006,6 @@ # LOSER_ALLY_FAME_SCALE = 1 # } # -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes -# # #Eradicate House follow up event # scope:defender = { # trigger_event = tgp_japan_general.9550 @@ -2290,12 +2016,8 @@ # desc = eradicate_house_cb_white_peace_desc # } # on_white_peace = { +# on_white_peace_effect = yes # scope:attacker = { -# show_pow_release_message_effect = yes -# stress_and_fulfillment_impact = { -# ambitious = medium_stress_impact_gain -# arrogant = medium_stress_impact_gain -# } # add_prestige = medium_prestige_loss # } # @@ -2307,18 +2029,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# scope:defender = { -# stress_and_fulfillment_impact = { -# arrogant = medium_stress_impact_gain -# } -# } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_defeat_desc = { @@ -2326,13 +2036,9 @@ # } # # on_defeat = { -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_defeat_effect = yes +# on_defeat_aggressive_war_effect = yes # # scope:defender = { -# mandala_peacemaker_perk_serenity_effect = yes # #EP2 accolade glory gain for winning against higher ranked enemy # accolade_defender_war_end_glory_gain_high_effect = yes # } @@ -2361,7 +2067,6 @@ # } # #Show killing # show_as_tooltip = { -# # scope:attacker = { # death = { # death_reason = death_eradicated @@ -2373,9 +2078,7 @@ # custom = every_close_family_house_member_in_court_cb_lose_desc # limit = { # house = scope:attacker.house -# NOT = { -# this = scope:attacker.primary_heir -# } +# this != scope:attacker.primary_heir # } # death = { # death_reason = death_eradicated @@ -2393,14 +2096,6 @@ # LOSER_ALLY_FAME_SCALE = 1 # } # -# # Truce -# add_truce_attacker_defeat_effect = yes -# -# scope:attacker = { save_temporary_scope_as = loser } -# on_lost_aggression_war_discontent_loss = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # #Eradicate House follow up event # scope:attacker = { # trigger_event = tgp_japan_general.9550 @@ -2467,17 +2162,15 @@ # } # # on_victory = { +# on_victory_effect = yes +# # scope:attacker = { -# show_pow_release_message_effect = yes # save_scope_as = leader # } # scope:defender = { # save_scope_as = daijo_daijin # } # -# # Legitimacy -# add_legitimacy_attacker_victory_effect = yes -# # #EP2 Accolade glory gain from winning against higher ranked enemy # scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } # @@ -2516,9 +2209,6 @@ # LOSER_ALLY_FAME_SCALE = 1 # } # -# # Truce -# add_truce_attacker_victory_effect = yes -# # scope:defender = { # every_character_war = { # limit = { is_attacker = scope:attacker } @@ -2537,9 +2227,6 @@ # } # } # } -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_white_peace_desc = { @@ -2547,12 +2234,8 @@ # } # # on_white_peace = { +# on_white_peace_effect = yes # scope:attacker = { -# show_pow_release_message_effect = yes -# stress_and_fulfillment_impact = { -# ambitious = medium_stress_impact_gain -# arrogant = medium_stress_impact_gain -# } # add_prestige = medium_prestige_loss # } # @@ -2564,18 +2247,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# scope:defender = { -# stress_and_fulfillment_impact = { -# arrogant = medium_stress_impact_gain -# } -# } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_defeat_desc = { @@ -2583,8 +2254,8 @@ # } # # on_defeat = { +# on_defeat_effect = yes # scope:attacker = { -# show_pow_release_message_effect = yes # save_scope_as = leader # } # scope:defender = { @@ -2593,11 +2264,7 @@ # trigger_event = tgp_japan_decision.9606 # } # -# # Legitimacy -# add_legitimacy_attacker_defeat_effect = yes -# # scope:defender = { -# mandala_peacemaker_perk_serenity_effect = yes # #EP2 accolade glory gain for winning against higher ranked enemy # accolade_defender_war_end_glory_gain_high_effect = yes # } @@ -2624,9 +2291,6 @@ # LOSER_ALLY_FAME_SCALE = 1 # } # -# # Truce -# add_truce_attacker_defeat_effect = yes -# # scope:attacker = { # every_character_war = { # limit = { is_defender = scope:defender } @@ -2645,9 +2309,6 @@ # } # } # } -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_primary_attacker_death = inherit @@ -2762,6 +2423,8 @@ # } # # on_victory = { +# on_victory_effect = yes +# # scope:attacker = { # save_scope_as = winner # house.house_confederation = { @@ -2789,11 +2452,6 @@ # LOSER = scope:loser # } # -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_victory_effect = yes -# # #EP2 Accolade glory gain from winning against higher ranked enemy # scope:attacker = { accolade_attacker_war_end_glory_gain_low_effect = yes } # @@ -2824,12 +2482,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_white_peace_desc = { @@ -2837,12 +2489,8 @@ # } # # on_white_peace = { +# on_white_peace_effect = yes # scope:attacker = { -# show_pow_release_message_effect = yes -# stress_and_fulfillment_impact = { -# ambitious = medium_stress_impact_gain -# arrogant = medium_stress_impact_gain -# } # add_prestige = medium_prestige_loss # } # @@ -2854,18 +2502,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# scope:defender = { -# stress_and_fulfillment_impact = { -# arrogant = medium_stress_impact_gain -# } -# } -# -# # Truce -# add_truce_attacker_victory_effect = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_defeat_desc = { @@ -2873,6 +2509,7 @@ # } # # on_defeat = { +# on_defeat_effect = yes # scope:defender = { # save_scope_as = winner # house.house_confederation = { @@ -2900,13 +2537,7 @@ # LOSER = scope:loser # } # -# scope:attacker = { show_pow_release_message_effect = yes } -# -# # Legitimacy -# add_legitimacy_attacker_defeat_effect = yes -# # scope:defender = { -# mandala_peacemaker_perk_serenity_effect = yes # #EP2 accolade glory gain for winning against higher ranked enemy # accolade_defender_war_end_glory_gain_high_effect = yes # } @@ -2932,15 +2563,6 @@ # WINNER_ALLY_FAME_SCALE = 1 # LOSER_ALLY_FAME_SCALE = 1 # } -# -# # Truce -# add_truce_attacker_defeat_effect = yes -# -# scope:attacker = { save_temporary_scope_as = loser } -# on_lost_aggression_war_discontent_loss = yes -# -# # EP3: note gold gained from military assistance/join war contracts and their war contribution threshold -# laamp_as_mercenary_payout_tooltip_effect = yes # } # # on_primary_attacker_death = inherit @@ -2979,3 +2601,4 @@ # add = frankokratia_leader_protection_value #Set back to 0. Declaring war on the frankokratia leader can really ruin the whole thing # } #} +# \ No newline at end of file diff --git a/common/casus_belli_types/pam_wars.txt b/common/casus_belli_types/pam_wars.txt index e6e1bb820..caee9cd5f 100644 --- a/common/casus_belli_types/pam_wars.txt +++ b/common/casus_belli_types/pam_wars.txt @@ -192,6 +192,8 @@ pam_humiliation_cb = { } on_victory = { + on_victory_effect = yes + scope:defender = { if = { limit = { @@ -213,11 +215,6 @@ pam_humiliation_cb = { TT = pam_humiliation_cb_papabile_score_loss_tt } } - - scope:attacker = { show_pow_release_message_effect = yes } - - # Legitimacy - add_legitimacy_attacker_victory_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy scope:attacker = { accolade_attacker_war_end_glory_gain_med_effect = yes } @@ -241,12 +238,6 @@ pam_humiliation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - # Truce - add_truce_attacker_victory_effect = yes - - # FP1: note the victory for future memorialisation via stele (if applicable). - scope:attacker = { fp1_remember_recent_conquest_victory_effect = yes } } on_white_peace_desc = { @@ -260,7 +251,7 @@ pam_humiliation_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } + on_white_peace_effect = yes #EP2 accolade glory gain for doing pretty good against higher ranked enemy scope:defender = { accolade_defender_war_end_glory_gain_low_effect = yes } @@ -277,8 +268,6 @@ pam_humiliation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_white_peace_effect = yes } on_defeat_desc = { @@ -292,16 +281,12 @@ pam_humiliation_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_effect = yes scope:attacker = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_negative" } scope:defender = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_migration_positive" } - # Legitimacy - add_legitimacy_attacker_defeat_effect = yes - scope:defender = { - mandala_peacemaker_perk_serenity_effect = yes #EP2 accolade glory gain for winning against higher ranked enemy accolade_defender_war_end_glory_gain_high_effect = yes # Prestige for Defender @@ -327,13 +312,6 @@ pam_humiliation_cb = { WINNER_ALLY_FAME_SCALE = 1 LOSER_ALLY_FAME_SCALE = 1 } - - add_truce_attacker_defeat_effect = yes - - scope:attacker = { - save_temporary_scope_as = loser - } - on_lost_aggression_war_discontent_loss = yes } transfer_behavior = transfer @@ -376,6 +354,12 @@ pam_humiliation_cb = { add = 50 } } + ai_score_mult = { + value = 1 + + add = common_cb_ai_score_mult_additive + multiply = common_cb_ai_score_mult + } } ########## @@ -544,10 +528,13 @@ pam_challenge_hof_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } + on_victory_effect = yes + scope:attacker = { + #EP2 Accolade glory gain from winning against higher ranked enemy + accolade_attacker_war_end_glory_gain_high_effect = yes + } pam_antipope_challenge_hof_victory_effect = yes - add_legitimacy_attacker_victory_effect = yes - add_truce_attacker_victory_effect = yes + modify_allies_of_participants_fame_both_same_values = { WINNER = scope:attacker VALUE = major } } on_white_peace_desc = { @@ -555,8 +542,8 @@ pam_challenge_hof_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } - add_truce_white_peace_effect = yes + on_white_peace_effect = yes + modify_allies_of_participants_fame_both_same_values = { WINNER = scope:attacker VALUE = major } # not important as the scales are identical } on_defeat_desc = { @@ -570,9 +557,27 @@ pam_challenge_hof_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } + on_defeat_effect = yes pam_antipope_challenge_hof_defeat_effect = yes - add_truce_attacker_defeat_effect = yes + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 3 + } + add_piety = major_piety_loss + } + scope:defender = { + #EP2 Accolade glory gain from winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + + add_prestige = { + value = tier_scaled_prestige_value + } + add_piety = { + value = tier_scaled_piety_value + } + } + + modify_allies_of_participants_fame_both_same_values = { WINNER = scope:defender VALUE = major } } transfer_behavior = transfer @@ -590,6 +595,10 @@ pam_challenge_hof_cb = { value = { value = scope:attacker.ai_zeal multiply = -0.5 + add = { + value = scope:attacker.ai_greed + multiply = 0.5 + } } if = { limit = { @@ -600,6 +609,12 @@ pam_challenge_hof_cb = { add = 50 } } + ai_score_mult = { + value = 1 + + add = common_cb_ai_score_mult_additive + multiply = common_cb_ai_score_mult + } } ########## @@ -665,10 +680,10 @@ pam_antiking_cb = { } on_victory = { - scope:attacker = { show_pow_release_message_effect = yes } + on_victory_effect = yes + scope:attacker = { accolade_attacker_war_end_glory_gain_high_effect = yes } pam_antiking_victory_effect = yes - add_legitimacy_attacker_victory_effect = yes - add_truce_attacker_victory_effect = yes + modify_allies_of_participants_fame_both_same_values = { WINNER = scope:attacker VALUE = major } } on_white_peace_desc = { @@ -676,8 +691,8 @@ pam_antiking_cb = { } on_white_peace = { - scope:attacker = { show_pow_release_message_effect = yes } - add_truce_white_peace_effect = yes + on_white_peace_effect = yes + modify_allies_of_participants_fame_both_same_values = { WINNER = scope:attacker VALUE = major } # not important as the scales are identical } on_defeat_desc = { @@ -691,9 +706,19 @@ pam_antiking_cb = { } on_defeat = { - scope:attacker = { show_pow_release_message_effect = yes } - scope:attacker = { add_piety = medium_piety_loss } - add_truce_attacker_defeat_effect = yes + on_defeat_effect = yes + scope:attacker = { + pay_short_term_gold_reparations_effect = { + GOLD_VALUE = 3 + } + add_piety = medium_piety_loss + } + scope:defender = { + #EP2 Accolade glory gain from winning against higher ranked enemy + accolade_defender_war_end_glory_gain_high_effect = yes + } + + modify_allies_of_participants_fame_both_same_values = { WINNER = scope:defender VALUE = major } } transfer_behavior = transfer @@ -718,6 +743,12 @@ pam_antiking_cb = { multiply = 0 } } + ai_score_mult = { + value = 1 + + add = common_cb_ai_score_mult_additive + multiply = common_cb_ai_score_mult + } } ########## diff --git a/common/character_interactions/00_fp3_interactions.txt b/common/character_interactions/00_fp3_interactions.txt index 88281bb7f..997cecd60 100644 --- a/common/character_interactions/00_fp3_interactions.txt +++ b/common/character_interactions/00_fp3_interactions.txt @@ -8,7 +8,7 @@ # can_send_despite_rejection = yes # ai_maybe = yes # desc = fp3_demand_submission_interaction_desc - +# # greeting = positive # notification_text = DEMAND_SUBMISSION_NOTIFICATION # @@ -18,7 +18,7 @@ # is_physically_able = yes # } # } - +# # is_shown = { # scope:actor != scope:recipient # struggle:persian_struggle ?= { has_struggle_phase_parameter = demand_submission_interaction_unlocked } @@ -29,9 +29,9 @@ # any_character_struggle = { this = struggle:persian_struggle } # } # } - +# # cooldown_against_recipient = { years = 10 } - +# # ai_min_reply_days = 2 # ai_max_reply_days = 7 # @@ -178,7 +178,7 @@ # desc = COWED_REASON # } # } - +# # on_accept = { # scope:actor = { # if = { @@ -201,7 +201,7 @@ # add_piety = massive_piety_gain # } # } - +# # # If we're a clan this interaction affects unity # add_house_unity_interaction_effect = { # CHARACTER = scope:actor @@ -211,7 +211,7 @@ # REVERSE_NON_HOUSE_TARGET = no # } # } - +# # on_decline = { # scope:recipient = { # custom_tooltip = DEMAND_SUBMISSION_INSTALL_LOYALIST_WARNING @@ -228,7 +228,7 @@ # scope:actor = { # trigger_event = fp3_misc_decisions.0011 # Letter event informing player of failure # } - +# # # If we're a clan this interaction affects unity # add_house_unity_interaction_effect = { # CHARACTER = scope:actor @@ -238,18 +238,18 @@ # REVERSE_NON_HOUSE_TARGET = no # } # } - +# # # Use piety to increase acceptance # send_option = { # flag = piety_cost_reduction # localization = TRADE_PIETY_FOR_BETTER_AI_ACCEPTANCE # } # send_options_exclusive = no - +# # ai_targets = { # ai_recipients = neighboring_rulers # } - +# # ai_frequency_by_tier = { # barony = 0 # county = 0 @@ -341,7 +341,7 @@ # } # } #} - +# #################################### ## Request Turkic invasion (can_request_incursion_interaction) ## By Hugo Cortell @@ -351,10 +351,10 @@ # common_interaction = yes # category = interaction_category_hostile # cooldown_against_recipient = { years = 2 } - +# # icon = request_mercenary # desc = fp3_request_turkic_invasion_interaction_desc - +# # is_available = { # OR = { # AND = { @@ -382,7 +382,7 @@ # is_at_war = no # } # } - +# # is_shown = { # scope:recipient = { # is_playable_character = yes @@ -403,16 +403,16 @@ # title:d_sunni.holder ?= this # } # top_liege ?= this - +# # } # is_ai = yes # } # scope:actor != scope:recipient # } - +# # is_valid_showing_failures_only = { # } - +# # populate_recipient_list = { # scope:actor.top_liege = { # every_independent_ruler = { @@ -481,7 +481,7 @@ # } # # send_options_exclusive = no - +# # send_option = { # flag = war_support # localization = fp3_request_turkic_invasion_interaction_option_join_war @@ -498,7 +498,7 @@ # } # } # } - +# # send_option = { # flag = financial_support # localization = fp3_request_turkic_invasion_interaction_option_more_gold @@ -511,7 +511,7 @@ # } # } # } - +# # cost = { # gold = { # value = { @@ -534,11 +534,11 @@ # } # } # } - +# # on_accept = { # if = { # limit = { exists = scope:secondary_recipient } - +# # scope:recipient = { # if = { # limit = { @@ -653,7 +653,7 @@ # } # # scope:invasion_target_title.duchy = { save_scope_as = text_title } - +# # hidden_effect = { # Not worth cluttering the UI with # add_opinion = { # modifier = fp3_incited_conflict @@ -665,7 +665,7 @@ # } # } # } - +# # scope:secondary_recipient = { # add_gold = { # value = { @@ -806,12 +806,12 @@ # } # } # } - +# # use_diplomatic_range = yes - +# # ai_accept = { # base = 0 - +# # # Relationships: actor -> recipient / We avoid more relationship checks for balance reasons (and because important decisions tend to care little for relationships) # modifier = { # Rivalry modifier. # desc = offer_vassalization_interaction_aibehavior_rival_tt_2 @@ -841,14 +841,14 @@ # } # add = 10 # } - +# # # Compare Opinion modifier # opinion_modifier = { # who = scope:secondary_recipient # opinion_target = scope:actor # multiplier = 0.25 # } - +# # # Pledged to help in invasion # modifier = { # add = { @@ -859,7 +859,7 @@ # desc = HAS_YOUR_SUPPORT_REASON # scope:war_support = yes # } - +# # # Relative power (taken from PT interaction) # modifier = { # A lot less levies than scope:secondary_recipient # add = -100 @@ -889,7 +889,7 @@ # scope:secondary_recipient.max_military_strength > scope:recipient.purchase_truce_interaction_recipient_far_stronger_value # desc = fp3_RTI_AI_RECIPIENT_IS_MUCH_STRONGER # } - +# # # AI who are in debt will take whatever windfalls they can. # modifier = { # add = { @@ -900,7 +900,7 @@ # debt_level >= 0 # desc = PT_AI_IS_IN_DEBT # } - +# # # Pacifist AI don't like raiding # modifier = { # add = -25 @@ -930,14 +930,14 @@ # scope:actor.var:movement_power >= very_high_movement_power_value # desc = ACTOR_HIGH_MOVEMENT_POWER # } - +# # # Offered proportional gold # modifier = { # add = 85 # scope:financial_support = yes # desc = GOLD_REASON # } - +# # # AI value mod # ai_value_modifier = { # ai_greed = 0.5 @@ -970,7 +970,7 @@ # } # ai_will_do = { # base = 0 - +# # modifier = { # add = 50 # scope:recipient = { @@ -978,31 +978,31 @@ # scope:recipient.max_military_strength >= scope:actor.max_military_strength # } # } - +# # modifier = { # add = 50 # title:d_sunni.holder ?= scope:recipient # } - +# # modifier = { # add = 100 # scope:recipient = { # has_relation_rival = scope:actor # } # } - +# # modifier = { # factor = 0.1 # scope:actor.liege ?= scope:recipient # } - +# # modifier = { # factor = 0 # scope:recipient = { # has_character_flag = incursion_ai_pacing # } # } - +# # modifier = { # factor = 0 # scope:recipient = { @@ -1010,7 +1010,7 @@ # is_ai = no # } # } - +# # modifier = { # factor = 0 # scope:recipient = { @@ -1018,7 +1018,7 @@ # is_liege_or_above_of = scope:actor # } # } - +# # modifier = { # factor = 0 # scope:recipient = { @@ -1034,7 +1034,7 @@ # } # } #} - +# #################################### ## Challenge House Head ## By Hugo Cortell @@ -1051,9 +1051,9 @@ # use_diplomatic_range = no # can_send_despite_rejection = yes # interface_priority = 107 - +# # desc = fp3_challenge_house_head_interaction_desc - +# # notification_text = { # first_valid = { # triggered_desc = { @@ -1065,11 +1065,11 @@ # } # # greeting = positive - +# # ai_maybe = yes # # cooldown_against_recipient = { years = 10 } - +# # is_available = { # OR = { # government_has_flag = government_is_clan @@ -1081,7 +1081,7 @@ # is_physically_able = yes # } # } - +# # is_shown = { # scope:actor = { # this != scope:recipient @@ -1104,7 +1104,7 @@ # } # } # } - +# # is_valid_showing_failures_only = { # scope:actor = { # is_at_war = no @@ -1185,7 +1185,7 @@ # } # } # } - +# # on_send = { # scope:recipient = { # add_character_flag = { # stop multiple challenges at same time @@ -1198,7 +1198,7 @@ # } # } # } - +# # on_accept = { # scope:recipient = { save_scope_as = house_head } # if = { @@ -1293,7 +1293,7 @@ # } # } # } - +# # on_decline = { # Get letter of rejection, to further escalate the situation if the player wills it # scope:actor = { trigger_event = fp3_misc_decisions.0025 } # scope:recipient = { @@ -1301,7 +1301,7 @@ # remove_character_flag = ongoing_house_head_challenge_flag # } # } - +# # send_option = { # flag = diplomacy # localization = CHALLENGE_HOUSE_HEAD_DIPLOMACY_DUEL @@ -1343,7 +1343,7 @@ # should_use_extra_icon = { scope:actor = { has_usable_hook = scope:recipient } } # extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" # send_options_exclusive = no - +# # # AI # ai_accept = { # base = 25 @@ -1461,14 +1461,14 @@ # ai_recipients = family # max = 10 # } - +# # ai_targets = { # ai_recipients = liege # ai_recipients = head_of_faith # ai_recipients = hooked_characters # ai_recipients = scripted_relations # } - +# # ai_targets = { # ai_recipients = peer_vassals # ai_recipients = vassals @@ -1612,8 +1612,8 @@ # } # } #} - - +# +# #################################### ## Change struggle allegiance #################################### @@ -1641,17 +1641,17 @@ # } # } # icon = change_allegiance - +# # greeting = positive # notification_text = fp3_change_allegiance_notification - +# # should_use_extra_icon = { scope:actor = { has_usable_hook = scope:recipient } } # extra_icon = "gfx/interface/icons/character_interactions/hook_icon.dds" - +# # send_options_exclusive = no - +# # ai_maybe = yes - +# # is_available = { # any_character_struggle = { is_struggle_type = persian_struggle } # trigger_if = { @@ -1663,7 +1663,7 @@ # primary_title.tier >= tier_duchy # } # } - +# # is_shown = { # has_fp3_dlc_trigger = yes # # There has to be a caliph around to sway on. @@ -1703,7 +1703,7 @@ # NOT = { this = title:d_sunni.holder } # } # } - +# # is_valid_showing_failures_only = { # scope:recipient = { # # We want to disable some stuff for supporters who can't be persuaded away from the caliph. @@ -1763,7 +1763,7 @@ # } # scope:actor = { is_available_adult = yes } # } - +# # auto_accept = { # custom_description = { # text = "spending_hook" @@ -1772,10 +1772,10 @@ # scope:hook = yes # } # } - +# # ai_accept = { # base = 0 - +# # # Those who already have a stance are more set in their ways. # ## Detractors # modifier = { @@ -1791,7 +1791,7 @@ # scope:recipient = { has_trait = fp3_struggle_supporter } # desc = INTERACTION_SUPPORTER # } - +# # # Opinions # ## Opinion of you # opinion_modifier = { @@ -1879,11 +1879,11 @@ # desc = INTERACTION_DIPLOMACY_RECIPIENT # } # } - +# # cost = { # prestige = medium_prestige_value # } - +# # # Use hook # send_option = { # flag = hook @@ -1894,7 +1894,7 @@ # } # localization = GENERIC_SPEND_A_HOOK # } - +# # on_accept = { # # Use our hook if we have to. # if = { @@ -1917,7 +1917,7 @@ # type = event_toast_effect_good # title = recipient_joined_your_side_title # left_icon = scope:recipient - +# # scope:recipient = { # if = { # limit = { scope:actor = { has_trait = fp3_struggle_detractor } } @@ -1926,7 +1926,7 @@ # remove_trait = fp3_struggle_supporter # } # add_trait_force_tooltip = fp3_struggle_detractor - +# # # Catalyst # hidden_effect = { # if = { @@ -1955,7 +1955,7 @@ # remove_trait = fp3_struggle_detractor # } # add_trait_force_tooltip = fp3_struggle_supporter - +# # # Catalyst # hidden_effect = { # if = { @@ -1989,7 +1989,7 @@ # } # } # } - +# # on_decline = { # add_house_unity_interaction_effect = { # CHARACTER = scope:actor @@ -2042,7 +2042,7 @@ # empire = 120 # hegemony = 120 # } - +# # ai_targets = { # ai_recipients = liege # ai_recipients = neighboring_rulers @@ -2051,14 +2051,14 @@ # ai_recipients = top_realm_domicile_owners # max = 10 # } - +# # ai_will_do = { # base = -50 # Let's limit it to specific character to avoid pure chaos - +# # ############### # ## BASE # ############### - +# # # AI Values # ## Detractors run off of lacking zeal # modifier = { @@ -2078,7 +2078,7 @@ # has_trait = fp3_struggle_supporter # ai_zeal >= 1 # } - +# # # The caliph wants to use this all the time. # modifier = { # has_title = title:d_sunni @@ -2088,35 +2088,35 @@ # ############### # ## TRAITS # ############### - +# # # schemer # modifier = { # add = 15 # has_trait = schemer # } - +# # # theologian # modifier = { # add = 25 # has_trait = theologian # } - +# # # intrigue education # modifier = { # add = 15 # has_trait = education_intrigue # } - +# # # learning education # modifier = { # add = 25 # has_trait = education_learning # } - +# # ################ # ## RELATIONSHIP # ################ - +# # # more likely to do it against friend and lover # modifier = { # add = 50 @@ -2127,7 +2127,7 @@ # } # } # } - +# # # boost against liege for Ambitious # modifier = { # add = 50 @@ -2136,7 +2136,7 @@ # is_vassal_of = scope:recipient # } # } - +# # # never target your rivals # modifier = { # add = -1000 @@ -2144,11 +2144,11 @@ # has_relation_rival = scope:actor # } # } - +# # ################ # ## STRUGGLE # ################ - +# # modifier = { # add = 100 # OR = { @@ -2176,8 +2176,8 @@ # } # } #} - - +# +# #################################### ## Request honorary titles #################################### @@ -2187,13 +2187,13 @@ # common_interaction = yes # desc = fp3_request_honorary_titles_interaction_desc # icon = honorary_titles - +# # greeting = positive - +# # auto_accept = yes - +# # cooldown = { years = 10 } - +# # cost = { # piety = { # value = major_piety_value @@ -2211,7 +2211,7 @@ # } # } # } - +# # is_available = { # trigger_if = { # limit = { is_ai = yes } @@ -2222,11 +2222,11 @@ # } # } # } - +# # is_shown = { # fp3_reward_from_vassalization_ending = yes # } - +# # is_valid = { # # honorary titles should be unique # custom_tooltip = { @@ -2240,7 +2240,7 @@ # any_house_member = { # has_character_modifier = fp3_honorary_title_scholarship_modifier # } - +# # any_house_member = { # has_character_modifier = fp3_honorary_title_stewardship_modifier # } @@ -2261,7 +2261,7 @@ # } # } # } - +# # send_option = { # flag = intrigue_option # localization = fp3_honorary_title_intrigue_modifier @@ -2277,7 +2277,7 @@ # } # } # } - +# # send_option = { # flag = scholarship_option # localization = fp3_honorary_title_scholarship_modifier @@ -2293,7 +2293,7 @@ # } # } # } - +# # send_option = { # flag = stewardship_option # localization = fp3_honorary_title_stewardship_modifier @@ -2309,7 +2309,7 @@ # } # } # } - +# # send_option = { # flag = diplomacy_option # localization = fp3_honorary_title_diplomacy_modifier @@ -2325,7 +2325,7 @@ # } # } # } - +# # send_option = { # flag = piety_option # localization = fp3_honorary_title_piety_modifier @@ -2341,7 +2341,7 @@ # } # } # } - +# # send_option = { # flag = prestige_option # localization = fp3_honorary_title_prestige_modifier @@ -2357,7 +2357,7 @@ # } # } # } - +# # send_option = { # flag = martial_option # localization = fp3_honorary_title_martial_modifier @@ -2373,14 +2373,14 @@ # } # } # } - +# # on_accept = { # scope:actor = { # send_interface_toast = { # type = event_toast_effect_good # title = new_honorary_title_acquired_title # left_icon = scope:recipient - +# # switch = { # trigger = yes # scope:intrigue_option = { @@ -2422,7 +2422,7 @@ # } # } # } - +# # ai_frequency_by_tier = { # barony = 0 # county = 0 @@ -2431,17 +2431,17 @@ # empire = 60 # hegemony = 60 # } - +# # ai_targets = { # ai_recipients = vassals # } - +# # ai_will_do = { # base = 100 # } #} - - +# +# #################################### ## Request house unity interference #################################### @@ -2451,18 +2451,18 @@ # common_interaction = yes # desc = fp3_request_house_unity_change_interaction_desc # icon = unity_harmonious - +# # greeting = positive - - +# +# # auto_accept = yes - +# # cooldown = { years = 10 } - +# # cost = { # piety = medium_piety_value # } - +# # is_available = { # government_has_flag = government_is_clan # trigger_if = { @@ -2474,11 +2474,11 @@ # } # } # } - +# # is_shown = { # fp3_reward_from_vassalization_ending = yes # } - +# # is_valid = { # # only valid for the actual liege # custom_tooltip = { @@ -2493,18 +2493,18 @@ # } # } # } - +# # send_option = { # flag = unity_gain # localization = INCREASE_HOUSE_UNITY # starts_enabled = { always = yes } # } - +# # send_option = { # flag = unity_loss # localization = DECREASE_HOUSE_UNITY # } - +# # on_accept = { # scope:recipient = { save_scope_as = unity_target } # scope:actor = { @@ -2527,7 +2527,7 @@ # } # } # } - +# # ai_frequency_by_tier = { # barony = 0 # county = 0 @@ -2536,13 +2536,14 @@ # empire = 60 # hegemony = 60 # } - +# # ai_targets = { # # For the AI, we limit it to neighboring_rulers # ai_recipients = vassals # } - +# # ai_will_do = { # base = 100 # } #} +# \ No newline at end of file diff --git a/common/character_interactions/00_prison_interactions.txt b/common/character_interactions/00_prison_interactions.txt index 615f8c5d9..1dee97a09 100644 --- a/common/character_interactions/00_prison_interactions.txt +++ b/common/character_interactions/00_prison_interactions.txt @@ -1689,6 +1689,10 @@ VALUE = 100 } + evaluate_action_decreasing_house_unity = { + VALUE = 100 + } + # TGP Be more careful with blocs generally house_bloc_tyranny_war_modifiers = yes @@ -6586,6 +6590,35 @@ release_from_prison_interaction = { } desc = "DEMAND_PATRICIAN_HOUSE_SUPPORT_REASON" } + + # Demand Patrician Family Support + modifier = { + add = { + value = -60 + if = { + limit = { + house ?= { has_house_aspiration_parameter = republic_communal } + } + add = 20 + } + else_if = { + limit = { + house ?= { has_house_aspiration_parameter = republic_aggrandizement } + } + add = -20 + } + else_if = { + limit = { + house ?= { has_house_aspiration_parameter = republic_signorial } + } + add = -15 + } + } + trigger = { + scope:demand_patrician_house_support = yes + } + desc = "DEMAND_PATRICIAN_HOUSE_SUPPORT_REASON" + } } # AI diff --git a/common/character_interactions/06_ep3_laamp_interactions.txt b/common/character_interactions/06_ep3_laamp_interactions.txt index 0f0e56321..f732675de 100644 --- a/common/character_interactions/06_ep3_laamp_interactions.txt +++ b/common/character_interactions/06_ep3_laamp_interactions.txt @@ -1235,6 +1235,7 @@ request_laamp_invasion_sponsorship_interaction = { has_playable_adventurer_dlc_trigger = yes scope:recipient = { is_landed = yes } scope:recipient != scope:actor + NOT = { scope:actor = { has_realm_law = camp_purpose_legitimists } } } is_valid_showing_failures_only = { diff --git a/common/coat_of_arms/template_lists/colored_emblem_lists.txt b/common/coat_of_arms/template_lists/colored_emblem_lists.txt index dc1a4a4f3..c96ceee34 100644 --- a/common/coat_of_arms/template_lists/colored_emblem_lists.txt +++ b/common/coat_of_arms/template_lists/colored_emblem_lists.txt @@ -1,4 +1,4 @@ -colored_emblem_texture_lists = { +colored_emblem_texture_lists = { charge = { 10 = "ce_anchor.dds" @@ -610,6 +610,61 @@ } 100 = "ce_eagle_iberia.dds" } + + special_selection = { + trigger = { + coa_merchant_trigger = yes + } + 500 = "ce_scales.dds" + 500 = "ce_balance.dds" + 500 = "ce_balance_single.dds" + 500 = "ce_cog_ship.dds" + 500 = "ce_cartwheel.dds" + 500 = "ce_wheel.dds" + 500 = "ce_barrel.dds" + 500 = "ce_bag.dds" + 500 = "ce_tradepost.dds" + 500 = "ce_tradepost_2.dds" + 500 = "ce_donkey.dds" + 500 = "ce_dromedary.dds" + 250 = "ce_chalice.dds" + 250 = "ce_goblet.dds" + 250 = "ce_tankard.dds" + 250 = "ce_jug.dds" + 250 = "ce_bucket.dds" + 250 = "ce_grapes.dds" + 250 = "ce_sickle.dds" + 250 = "ce_anvil.dds" + 250 = "ce_smith_hammer.dds" + 250 = "ce_tongs.dds" + 250 = "ce_carpenter_axe.dds" + 250 = "ce_butcher_knife.dds" + 250 = "ce_lute.dds" + 250 = "ce_sax.dds" + 125 = "ce_weight.dds" + 125 = "ce_wagon.dds" + 125 = "ce_wagon_2.dds" + 125 = "ce_chest.dds" + 125 = "ce_basket_2.dds" + 125 = "ce_windmill.dds" + 125 = "ce_weaver.dds" + 125 = "ce_bread.dds" + 125 = "ce_apiary.dds" + 50 = "ce_anchor.dds" + 50 = "ce_key.dds" + 50 = "ce_ship_lymphad.dds" + 50 = "ce_grain.dds" + 50 = "ce_basket.dds" + 50 = "ce_bugle_horn_random.dds" + } + + special_selection = { + trigger = { + coa_merchant_trigger = yes + coa_mena_trigger = yes + } + 500 = "ce_camel.dds" + } } # thirds that are designed to line up propely with Mena tricolours @@ -2196,6 +2251,52 @@ 100 = "ce_thistle.dds" 100 = "ce_thistle_grass.dds" } + + special_selection = { + trigger = { + coa_merchant_trigger = yes + } + 400 = "ce_scales.dds" + 400 = "ce_balance.dds" + 400 = "ce_balance_single.dds" + 400 = "ce_cog_ship.dds" + 400 = "ce_cartwheel.dds" + 400 = "ce_wheel.dds" + 400 = "ce_barrel.dds" + 400 = "ce_bag.dds" + 400 = "ce_tradepost.dds" + 400 = "ce_tradepost_2.dds" + 400 = "ce_donkey.dds" + 200 = "ce_chalice.dds" + 200 = "ce_goblet.dds" + 200 = "ce_tankard.dds" + 200 = "ce_jug.dds" + 200 = "ce_bucket.dds" + 200 = "ce_grapes.dds" + 200 = "ce_sickle.dds" + 200 = "ce_anvil.dds" + 200 = "ce_smith_hammer.dds" + 200 = "ce_tongs.dds" + 200 = "ce_carpenter_axe.dds" + 200 = "ce_butcher_knife.dds" + 200 = "ce_lute.dds" + 200 = "ce_sax.dds" + 100 = "ce_weight.dds" + 100 = "ce_wagon.dds" + 100 = "ce_wagon_2.dds" + 100 = "ce_chest.dds" + 100 = "ce_basket_2.dds" + 100 = "ce_windmill.dds" + 100 = "ce_weaver.dds" + 100 = "ce_bread.dds" + 100 = "ce_apiary.dds" + 40 = "ce_anchor.dds" + 40 = "ce_key.dds" + 40 = "ce_ship_lymphad.dds" + 40 = "ce_grain.dds" + 40 = "ce_basket.dds" + 40 = "ce_bugle_horn_random.dds" + } } hr_three_charges_list = { @@ -2292,6 +2393,52 @@ 200 = "ce_thistle.dds" 200 = "ce_thistle_grass.dds" } + + special_selection = { + trigger = { + coa_merchant_trigger = yes + } + 440 = "ce_scales.dds" + 440 = "ce_balance.dds" + 440 = "ce_balance_single.dds" + 440 = "ce_cog_ship.dds" + 440 = "ce_cartwheel.dds" + 440 = "ce_wheel.dds" + 440 = "ce_barrel.dds" + 440 = "ce_bag.dds" + 440 = "ce_tradepost.dds" + 440 = "ce_tradepost_2.dds" + 440 = "ce_donkey.dds" + 220 = "ce_chalice.dds" + 220 = "ce_goblet.dds" + 220 = "ce_tankard.dds" + 220 = "ce_jug.dds" + 220 = "ce_bucket.dds" + 220 = "ce_grapes.dds" + 220 = "ce_sickle.dds" + 220 = "ce_anvil.dds" + 220 = "ce_smith_hammer.dds" + 220 = "ce_tongs.dds" + 220 = "ce_carpenter_axe.dds" + 220 = "ce_butcher_knife.dds" + 220 = "ce_lute.dds" + 220 = "ce_sax.dds" + 110 = "ce_weight.dds" + 110 = "ce_wagon.dds" + 110 = "ce_wagon_2.dds" + 110 = "ce_chest.dds" + 110 = "ce_basket_2.dds" + 110 = "ce_windmill.dds" + 110 = "ce_weaver.dds" + 110 = "ce_bread.dds" + 110 = "ce_apiary.dds" + 44 = "ce_anchor.dds" + 44 = "ce_key.dds" + 44 = "ce_ship_lymphad.dds" + 44 = "ce_grain.dds" + 44 = "ce_basket.dds" + 44 = "ce_bugle_horn_random.dds" + } } hr_three_charges_pall_list = { @@ -2345,6 +2492,32 @@ 30 = "ce_cross_couped.dds" 30 = "ce_cross_potenty.dds" 30 = "ce_cross_crosslet.dds" + + special_selection = { + trigger = { + coa_merchant_trigger = yes + } + 800 = "ce_scales.dds" + 800 = "ce_balance_single.dds" + 800 = "ce_cartwheel.dds" + 800 = "ce_wheel.dds" + 800 = "ce_barrel.dds" + 800 = "ce_bag.dds" + 400 = "ce_chalice.dds" + 400 = "ce_goblet.dds" + 400 = "ce_tankard.dds" + 400 = "ce_jug.dds" + 400 = "ce_grapes.dds" + 200 = "ce_weight.dds" + 200 = "ce_chest.dds" + 200 = "ce_bread.dds" + 200 = "ce_apiary.dds" + 80 = "ce_anchor.dds" + 80 = "ce_key.dds" + 80 = "ce_grain.dds" + 80 = "ce_basket.dds" + 80 = "ce_bugle_horn_random.dds" + } } hr_medium_charges_list = { 150 = "ce_lion_rampant.dds" @@ -2356,6 +2529,53 @@ 30 = "ce_molette.dds" 50 = "ce_cross_moline.dds" 50 = "ce_cross_patty.dds" + + special_selection = { + trigger = { + coa_merchant_trigger = yes + } + 200 = "ce_scales.dds" + 200 = "ce_balance.dds" + 200 = "ce_balance_single.dds" + 200 = "ce_cog_ship.dds" + 200 = "ce_cartwheel.dds" + 200 = "ce_wheel.dds" + 200 = "ce_barrel.dds" + 200 = "ce_bag.dds" + 200 = "ce_tradepost.dds" + 200 = "ce_tradepost_2.dds" + 200 = "ce_donkey.dds" + 200 = "ce_dromedary.dds" + 100 = "ce_chalice.dds" + 100 = "ce_goblet.dds" + 100 = "ce_tankard.dds" + 100 = "ce_jug.dds" + 100 = "ce_bucket.dds" + 100 = "ce_grapes.dds" + 100 = "ce_sickle.dds" + 100 = "ce_anvil.dds" + 100 = "ce_smith_hammer.dds" + 100 = "ce_tongs.dds" + 100 = "ce_carpenter_axe.dds" + 100 = "ce_butcher_knife.dds" + 100 = "ce_lute.dds" + 100 = "ce_sax.dds" + 50 = "ce_weight.dds" + 50 = "ce_wagon.dds" + 50 = "ce_wagon_2.dds" + 50 = "ce_chest.dds" + 50 = "ce_basket_2.dds" + 50 = "ce_windmill.dds" + 50 = "ce_weaver.dds" + 50 = "ce_bread.dds" + 50 = "ce_apiary.dds" + 20 = "ce_anchor.dds" + 20 = "ce_key.dds" + 20 = "ce_ship_lymphad.dds" + 20 = "ce_grain.dds" + 20 = "ce_basket.dds" + 20 = "ce_bugle_horn_random.dds" + } } hr_pale_charges_list = { # Charges featured in pale, 1:1:1 design (ie Plantagenêt) @@ -2600,6 +2820,52 @@ 30 = "ce_cross_patonce.dds" 30 = "ce_cross_fleury.dds" 30 = "ce_cross_potenty.dds" + + special_selection = { + trigger = { + coa_merchant_trigger = yes + } + 600 = "ce_scales.dds" + 600 = "ce_balance.dds" + 600 = "ce_balance_single.dds" + 600 = "ce_cog_ship.dds" + 600 = "ce_cartwheel.dds" + 600 = "ce_wheel.dds" + 600 = "ce_barrel.dds" + 600 = "ce_bag.dds" + 600 = "ce_tradepost.dds" + 600 = "ce_tradepost_2.dds" + 600 = "ce_donkey.dds" + 300 = "ce_chalice.dds" + 300 = "ce_goblet.dds" + 300 = "ce_tankard.dds" + 300 = "ce_jug.dds" + 300 = "ce_bucket.dds" + 300 = "ce_grapes.dds" + 300 = "ce_sickle.dds" + 300 = "ce_anvil.dds" + 300 = "ce_smith_hammer.dds" + 300 = "ce_tongs.dds" + 300 = "ce_carpenter_axe.dds" + 300 = "ce_butcher_knife.dds" + 300 = "ce_lute.dds" + 300 = "ce_sax.dds" + 150 = "ce_weight.dds" + 150 = "ce_wagon.dds" + 150 = "ce_wagon_2.dds" + 150 = "ce_chest.dds" + 150 = "ce_basket_2.dds" + 150 = "ce_windmill.dds" + 150 = "ce_weaver.dds" + 150 = "ce_bread.dds" + 150 = "ce_apiary.dds" + 60 = "ce_anchor.dds" + 60 = "ce_key.dds" + 60 = "ce_ship_lymphad.dds" + 60 = "ce_grain.dds" + 60 = "ce_basket.dds" + 60 = "ce_bugle_horn_random.dds" + } } hr_fur_overall_charges_list = { # One colour charges only @@ -2969,6 +3235,21 @@ } 100 = "ce_persian_lion.dds" } + + special_selection = { + trigger = { + coa_merchant_trigger = yes + } + 2900 = "ce_balance.dds" + 2900 = "ce_balance_single.dds" + 2900 = "ce_cartwheel.dds" + 2900 = "ce_wheel.dds" + 2900 = "ce_dromedary.dds" + 2900 = "ce_camel.dds" + 1450 = "ce_jug.dds" + 725 = "ce_wagon.dds" + 725 = "ce_wagon_2.dds" + } } mena_base_charges_list = { @@ -2997,6 +3278,22 @@ } 100 = "ce_eagle_iberia.dds" } + + # Merchant companies - trade symbols + special_selection = { + trigger = { + coa_merchant_trigger = yes + } + 10300 = "ce_balance.dds" + 10300 = "ce_balance_single.dds" + 10300 = "ce_cartwheel.dds" + 10300 = "ce_wheel.dds" + 10300 = "ce_dromedary.dds" + 10300 = "ce_camel.dds" + 5150 = "ce_jug.dds" + 2575 = "ce_wagon.dds" + 2575 = "ce_wagon_2.dds" + } } mena_middle_charges_list = { @@ -3013,6 +3310,17 @@ 500 = "ce_mena_khanja.dds" 500 = "ce_mena_lamp.dds" 500 = "ce_mena_crescent.dds" + + special_selection = { + trigger = { + coa_merchant_trigger = yes + } + 11000 = "ce_balance.dds" + 11000 = "ce_balance_single.dds" + 11000 = "ce_cartwheel.dds" + 11000 = "ce_wheel.dds" + 5500 = "ce_jug.dds" + } } mena_horizontal_charges_list = { @@ -3032,6 +3340,17 @@ 500 = "ce_mena_axe_fess.dds" 500 = "ce_zulfiqar_and_shield.dds" 500 = "ce_baglama.dds" + + special_selection = { + trigger = { + coa_merchant_trigger = yes + } + 14900 = "ce_balance.dds" + 14900 = "ce_dromedary.dds" + 14900 = "ce_camel.dds" + 3725 = "ce_wagon.dds" + 3725 = "ce_wagon_2.dds" + } } mena_horizontal_addorsed_charges_list = { diff --git a/common/combat_phase_events/00_knight_phase_events.txt b/common/combat_phase_events/00_knight_phase_events.txt index 2f4463552..ad3e67a7c 100644 --- a/common/combat_phase_events/00_knight_phase_events.txt +++ b/common/combat_phase_events/00_knight_phase_events.txt @@ -1434,8 +1434,11 @@ knight_qualify_for_accolade = { knight_army = { any_army_maa_regiment = { count > 0 } } - can_be_acclaimed = yes + is_acclaimed = no prowess >= accolade_prowess_requirement_value + # The chance is zero without accolade progress, so we check it before can_be_acclaimed + liege ?= { accolade_progress > 0 } + can_be_acclaimed = yes # accolade attributes are below max cap # possibly: no other MAA accolade attributes? TODO LB } diff --git a/common/council_positions/00_council_positions.txt b/common/council_positions/00_council_positions.txt index c524c8b2e..2fdf6a0b3 100644 --- a/common/council_positions/00_council_positions.txt +++ b/common/council_positions/00_council_positions.txt @@ -51,9 +51,11 @@ } valid_position = { + government_allows = council NOR = { - government_has_flag = government_is_landless_adventurer government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant } } @@ -92,6 +94,15 @@ scale = council_scaled_admin_value } + modifier = { # Republic ambition bonus + name = republic_councillor_chancellor_modifier + monthly_prestige = 0.5 + monthly_income = 0.25 + owned_personal_scheme_success_chance_add = 4 + stress_loss_mult = 0.1 + scale = council_scaled_republic_value + } + council_owner_modifier = { name = learn_on_the_job_modifier diplomacy = 1 @@ -115,7 +126,7 @@ trigger_else = { can_be_chancellor_trigger = { COURT_OWNER = root.liege_or_court_owner } } - tgp_is_ceremonial_liege_trigger = no + is_ceremonial_liege = no } on_get_position = { @@ -201,15 +212,17 @@ councillor_steward = { } valid_position = { + government_allows = council NOR = { - government_has_flag = government_is_landless_adventurer government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant } } modifier = { name = councillor_steward_modifier - monthly_income = 1 + monthly_income = 0.25 scale = council_scaled_monthly_income } @@ -228,6 +241,14 @@ councillor_steward = { scale = council_scaled_admin_value } + modifier = { # Republic ambition bonus + name = republic_councillor_steward_modifier + monthly_prestige = 0.5 + monthly_income = 0.25 + trade_competitiveness_add = 2 + scale = council_scaled_republic_value + } + council_owner_modifier = { name = learn_on_the_job_modifier stewardship = 1 @@ -251,7 +272,7 @@ councillor_steward = { trigger_else = { can_be_steward_trigger = { COURT_OWNER = root.liege_or_court_owner } } - tgp_is_ceremonial_liege_trigger = no + is_ceremonial_liege = no } on_get_position = { @@ -337,9 +358,12 @@ councillor_marshal = { } valid_position = { + government_allows = council NOR = { - government_has_flag = government_is_landless_adventurer government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + gdp_use_patrician_council_trigger = yes } } @@ -370,6 +394,15 @@ councillor_marshal = { scale = council_scaled_celestial_ministry_value } + modifier = { # Republic ambition bonus + name = republic_councillor_marshal_modifier + monthly_prestige = 0.5 + monthly_income = 0.25 + mercenary_hire_limit = 1 + mercenary_hire_cost_mult = -0.05 + scale = council_scaled_republic_value + } + council_owner_modifier = { name = learn_on_the_job_modifier martial = 1 @@ -393,7 +426,7 @@ councillor_marshal = { trigger_else = { can_be_marshal_trigger = { COURT_OWNER = root.liege_or_court_owner } } - tgp_is_ceremonial_liege_trigger = no + is_ceremonial_liege = no } on_get_position = { @@ -479,7 +512,11 @@ councillor_spymaster = { } valid_position = { - NOT = { government_has_flag = government_is_landless_adventurer } + government_allows = council + NOR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + } } # Scaled modifiers. @@ -504,6 +541,14 @@ councillor_spymaster = { scale = council_scaled_admin_value } + modifier = { # Republic ambition bonus + name = republic_councillor_spymaster_modifier + monthly_prestige = 0.5 + monthly_income = 0.25 + owned_hostile_scheme_success_chance_growth_add = 4 + scale = council_scaled_republic_value + } + council_owner_modifier = { name = learn_on_the_job_modifier intrigue = 1 @@ -527,7 +572,7 @@ councillor_spymaster = { trigger_else = { can_be_spymaster_trigger = { COURT_OWNER = root.liege_or_court_owner } } - tgp_is_ceremonial_liege_trigger = no + is_ceremonial_liege = no } on_get_position = { @@ -785,7 +830,7 @@ councillor_court_chaplain = { modifier = { name = councillor_court_chaplain_modifier - county_opinion_add = 5 + popular_opinion_add = 5 monthly_learning_lifestyle_xp_gain_mult = 0.05 scale = council_scaled_by_liege_tier } @@ -822,13 +867,16 @@ councillor_court_chaplain = { trigger_else = { can_be_court_chaplain_trigger = { COURT_OWNER = root.liege_or_court_owner } } - tgp_is_ceremonial_liege_trigger = no + is_ceremonial_liege = no } valid_position = { + government_allows = council NOR = { - government_has_flag = government_is_landless_adventurer government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + gdp_use_patrician_council_trigger = yes } } @@ -977,6 +1025,12 @@ councillor_court_chaplain = { is_clergy = yes is_ai = yes any_held_title = {} + OR = { + government_has_flag = government_is_theocracy + government_has_flag = government_is_monastic_holy_order + has_trait = devoted + has_trait = cleric + } OR = { NOT = { liege ?= scope:councillor_liege } puppeteer ?= scope:councillor_liege @@ -1041,6 +1095,64 @@ councillor_spouse = { trigger = { scope:councillor = { is_male = yes } } desc = { first_valid = { + #Patrician + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + culture = { has_cultural_pillar = heritage_latin } + } + desc = republic_estate_holder_latin_male + } + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + culture = { has_cultural_pillar = heritage_central_germanic } + } + desc = republic_estate_holder_germanic_male + } + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + culture = { has_cultural_pillar = heritage_frankish } + } + desc = republic_estate_holder_frankish_male + } + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + culture = { has_cultural_pillar = heritage_byzantine } + } + desc = republic_estate_holder_greek_male + } + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + culture = { + OR = { + has_name_list = name_list_andalusian + has_name_list = name_list_bedouin + has_name_list = name_list_egyptian + has_name_list = name_list_levantine + has_name_list = name_list_maghrebi + has_name_list = name_list_yemeni + } + } + } + desc = republic_estate_holder_arabic_male + } + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + } + desc = republic_estate_holder_male + } + #Merchant + triggered_desc = { + trigger = { + government_has_flag = government_is_merchant + } + desc = spouse_company_holder_male + } #Mongol All triggered_desc = { trigger = { @@ -1926,6 +2038,64 @@ councillor_spouse = { } desc = { first_valid = { + #Patrician + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + culture = { has_cultural_pillar = heritage_latin } + } + desc = republic_estate_holder_latin_female + } + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + culture = { has_cultural_pillar = heritage_central_germanic } + } + desc = republic_estate_holder_germanic_female + } + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + culture = { has_cultural_pillar = heritage_frankish } + } + desc = republic_estate_holder_frankish_female + } + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + culture = { has_cultural_pillar = heritage_byzantine } + } + desc = republic_estate_holder_greek_female + } + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + culture = { + OR = { + has_name_list = name_list_andalusian + has_name_list = name_list_bedouin + has_name_list = name_list_egyptian + has_name_list = name_list_levantine + has_name_list = name_list_maghrebi + has_name_list = name_list_yemeni + } + } + } + desc = republic_estate_holder_arabic_female + } + triggered_desc = { + trigger = { + gdp_use_patrician_council_trigger = yes + } + desc = republic_estate_holder_female + } + #Merchant + triggered_desc = { + trigger = { + government_has_flag = government_is_merchant + } + desc = spouse_company_holder_female + } #Saxon Feudal/Tribal triggered_desc = { trigger = { @@ -2820,7 +2990,7 @@ councillor_spouse = { valid_character = { exists = liege can_be_spouse_councillor_trigger = { COUNCIL_OWNER = liege } - tgp_is_ceremonial_liege_trigger = no + is_ceremonial_liege = no } on_get_position = { @@ -2934,7 +3104,7 @@ councillor_kurultai_1 = { modifier = { name = councillor_kurultai_modifier - monthly_income = 0.5 + monthly_income = 0.25 scale = council_scaled_monthly_income } @@ -3028,7 +3198,7 @@ councillor_kurultai_2 = { modifier = { name = councillor_kurultai_modifier - monthly_income = 0.5 + monthly_income = 0.25 scale = council_scaled_monthly_income } @@ -3122,7 +3292,7 @@ councillor_kurultai_3 = { modifier = { name = councillor_kurultai_modifier - monthly_income = 0.5 + monthly_income = 0.25 scale = council_scaled_monthly_income } @@ -3216,7 +3386,7 @@ councillor_kurultai_4 = { modifier = { name = councillor_kurultai_modifier - monthly_income = 0.5 + monthly_income = 0.25 scale = council_scaled_monthly_income } diff --git a/common/council_tasks/00_court_chaplain_tasks.txt b/common/council_tasks/00_court_chaplain_tasks.txt index 8b2b64c9f..0c368af75 100644 --- a/common/council_tasks/00_court_chaplain_tasks.txt +++ b/common/council_tasks/00_court_chaplain_tasks.txt @@ -323,7 +323,7 @@ task_conversion = { } desc = task_conversion_rite_only_effect_desc } - # Development loss only applies on a real Faith change (people refuse to convert and migrate) + # Prosperity loss only applies on a real Faith change (people refuse to convert and migrate) triggered_desc = { trigger = { trigger_if = { @@ -339,7 +339,24 @@ task_conversion = { scope:county.faith != scope:councillor.faith } } - desc = task_conversion_development_loss_desc + desc = task_conversion_prosperity_loss_desc + } + triggered_desc = { + trigger = { + trigger_if = { + limit = { + scope:councillor_liege = { tgp_has_access_to_ministry_trigger = yes } + } + exists = scope:county.faith + scope:county.faith != scope:councillor_liege.faith + } + trigger_else = { + exists = scope:county.faith + scope:county.faith != scope:councillor_liege.faith + scope:county.faith != scope:councillor.faith + } + } + desc = task_conversion_settlement_size_loss_desc } # Fervor effects only on a real Faith change (rite shifts within the same Faith do not move fervor) triggered_desc = { @@ -381,7 +398,7 @@ task_conversion = { trigger = { learning > mediocre_skill_rating } - desc = task_conversion_development_gain + desc = task_conversion_prosperity_gain } triggered_desc = { trigger = { @@ -648,7 +665,6 @@ task_conversion = { } multiply = court_chaplain_conversion_factors - min = { value = 0.1 desc = minimum_conversion @@ -678,7 +694,7 @@ task_conversion = { save_temporary_scope_as = employer } any_ruler = { - has_government = landless_adventurer_government + government_type_filter = government_type:landless_adventurer_government is_within_diplo_range = { CHARACTER = scope:councillor } any_character_task_contract = { task_contract_type = laamp_fight_faith_conversion_contract @@ -758,8 +774,8 @@ task_conversion = { OR = { NOT = { has_variable = associated_county } AND = { - has_variable = converted_development - var:converted_development <= 0 + has_variable = converted_prosperity + var:converted_prosperity <= 0 } } } @@ -773,8 +789,8 @@ task_conversion = { OR = { NOT = { has_variable = associated_culture } AND = { - has_variable = converted_development - var:converted_development <= 0 + has_variable = converted_prosperity + var:converted_prosperity <= 0 } } } @@ -785,21 +801,70 @@ task_conversion = { } if = { limit = { - NOT = { has_variable = converted_development } + NOT = { has_variable = converted_prosperity } } set_variable = { - name = converted_development - value = scope:county.convert_faith_development_value + name = converted_prosperity + value = scope:county.convert_faith_prosperity_value } } else = { change_variable = { - name = converted_development - add = scope:county.convert_faith_development_value + name = converted_prosperity + add = scope:county.convert_faith_prosperity_value } } } } + + scope:old_faith = { + if = { + limit = { + OR = { + NOT = { has_variable = associated_county } + AND = { + has_variable = converted_prosperity + var:converted_prosperity <= 0 + } + } + } + set_variable = { + name = associated_county + value = scope:county + } + } + if = { + limit = { + OR = { + NOT = { has_variable = associated_culture } + AND = { + has_variable = converted_prosperity + var:converted_prosperity <= 0 + } + } + } + set_variable = { + name = associated_culture + value = scope:county.culture + } + } + if = { + limit = { + NOT = { has_variable = converted_prosperity } + } + set_variable = { + name = converted_prosperity + value = scope:county.convert_faith_prosperity_value + } + } + else = { + change_variable = { + name = converted_prosperity + add = scope:county.convert_faith_prosperity_value + } + } + } + # Same decision matrix as potential_county: Liege drives the rite axis whenever the post-conversion Faith ends up as the Liege's. if = { limit = { @@ -815,7 +880,11 @@ task_conversion = { if = { limit = { scope:councillor_liege.faith != scope:old_faith } - change_development_level = convert_faith_development_loss + change_prosperity_level = convert_faith_prosperity_loss + every_county_province = { + limit = { has_holding = yes } + change_province_size_progress = convert_faith_settlement_size_loss + } scope:councillor_liege.faith = { change_fervor = { value = trivial_fervor_gain @@ -1037,7 +1106,10 @@ task_fabricate_claim = { # Perk Bonuses if = { limit = { - scope:councillor_liege = { has_perk = accomplished_forger_perk } + scope:councillor_liege = { + has_perk = accomplished_forger_perk + NOT = { government_has_flag = government_is_merchant } + } } add = { value = scope:councillor.court_chaplain_fabricate_claim_perk_bonus_monthly_increase diff --git a/common/council_tasks/00_marshal_tasks.txt b/common/council_tasks/00_marshal_tasks.txt index 44aedff81..5b7397288 100644 --- a/common/council_tasks/00_marshal_tasks.txt +++ b/common/council_tasks/00_marshal_tasks.txt @@ -508,7 +508,7 @@ task_increase_control = { ai_county_target = domain task_progress = task_progress_value task_current_value = scope:councillor_liege.marshal_increase_control_current_progress - task_max_value = 100 # Highest possible county control + task_max_value = scope:councillor_liege.marshal_increase_control_max_progress highlight_own_realm = yes restart_on_finish = yes # If it "finishes" by removing a corruption modifier, there'll still be control to regain @@ -520,6 +520,10 @@ task_increase_control = { } effect_desc = { + triggered_desc = { + trigger = { council_task_not_started_in_county_trigger = yes } + desc = task_increase_control_current_status + } desc = task_increase_control_effect_desc desc = { desc = council_task_possible_side_effects @@ -671,10 +675,22 @@ task_increase_control = { desc = INCREASE_COUNTY_CONTROL_EXPERIENCE_BONUS_VALUE } } + if = { + limit = { + exists = scope:county + scope:county.title_province = { + province_has_district = manor_houses_district + } + } + add = { + value = scope:councillor.manor_houses_marshal_increase_control_bonus + desc = MANOR_HOUSES_MARSHAL_CONTROL_BONUS + } + } if = { limit = { exists = scope:county } multiply = { - value = scope:county.monthly_county_control_growth_factor + value = scope:county.monthly_county_control_change desc = MARSHAL_COUNTY_SPEED_MODIFIERS } } @@ -728,19 +744,16 @@ task_increase_control = { custom_description = { text = potential_county_control_task_trigger OR = { + county_control < county_control_baseline has_county_corruption_trigger = yes - county_control < full_county_control } } - # If the growth factor is 0, no amount of trying to control helps - # (happens when the county is under siege/occupied most likely) - monthly_county_control_growth_factor > 0 } } county_modifier = { name = marshal_increase_control_modifier - monthly_county_control_growth_add = 1 + monthly_control_change_when_below_baseline_add = 0.5 scale = marshal_increase_control_total } @@ -786,7 +799,7 @@ task_increase_control = { } scope:county = { marshal_remove_random_county_corruption_modifier_effect = yes - change_county_control = -25 + change_county_control = -10 } } } @@ -802,6 +815,24 @@ task_increase_control = { } } + ai_target_score = { + value = 10 + scope:county = { + if = { + limit = { county_control < county_control_baseline } + add = { + value = county_control_baseline + subtract = county_control + multiply = 10 + } + } + add = { + value = county_corruption_modifier_count + multiply = 100 + } + } + } + ai_will_do = { value = 1000 # Highest prio if = { # Keep doing Organize levies if you're at war diff --git a/common/council_tasks/00_spymaster_tasks.txt b/common/council_tasks/00_spymaster_tasks.txt index 1d6154c7b..53af1b96e 100644 --- a/common/council_tasks/00_spymaster_tasks.txt +++ b/common/council_tasks/00_spymaster_tasks.txt @@ -254,6 +254,20 @@ task_support_schemes = { } desc = determination_spymaster_task_support_schemes_bonus } + # Republic House Ambition - Hostile Scheme Phase Length + triggered_desc = { + trigger = { + scope:councillor_liege.house ?= { + OR = { + has_house_aspiration_parameter = ambition_improved_task_support_schemes_1 + has_house_aspiration_parameter = ambition_improved_task_support_schemes_2 + has_house_aspiration_parameter = ambition_improved_task_support_schemes_3 + has_house_aspiration_parameter = ambition_improved_task_support_schemes_4 + } + } + } + desc = ambition_improved_task_support_schemes_phase_bonus + } desc = task_support_schemes_success_chance_base_desc triggered_desc = { trigger = { @@ -286,6 +300,20 @@ task_support_schemes = { } desc = determination_spymaster_task_support_schemes_success_chance_bonus } + # Republic House Ambition - Hostile Scheme Success Chance + triggered_desc = { + trigger = { + scope:councillor_liege.house ?= { + OR = { + has_house_aspiration_parameter = ambition_improved_task_support_schemes_1 + has_house_aspiration_parameter = ambition_improved_task_support_schemes_2 + has_house_aspiration_parameter = ambition_improved_task_support_schemes_3 + has_house_aspiration_parameter = ambition_improved_task_support_schemes_4 + } + } + } + desc = ambition_improved_task_support_schemes_success_chance_bonus + } desc = { desc = council_task_possible_side_effects triggered_desc = { @@ -517,6 +545,15 @@ task_find_secrets = { desc = court_without_secrets_modifier } } + if = { + limit = { + scope:councillor_liege.capital_province ?= { has_building_or_higher = royal_inner_court_1 } + } + add = { + value = spymaster_find_secrets_household_inner_court_increase + desc = HOUSEHOLD_INNER_COURT_FIND_SECRETS_VALUE + } + } if = { limit = { exists = scope:target_character.cp:councillor_spymaster @@ -624,25 +661,25 @@ task_find_secrets = { limit = { is_ai = yes } + scope:target_character = { + highest_held_title_tier >= tier_county + OR = { + is_vassal_of = scope:councillor_liege + has_relation_rival = scope:councillor_liege + } + in_diplomatic_range = scope:councillor_liege + } NOR = { has_relation_friend = scope:target_character has_relation_lover = scope:target_character is_allied_to = scope:target_character has_hook = scope:target_character } - scope:target_character = { - OR = { - is_vassal_of = scope:councillor_liege - has_relation_rival = scope:councillor_liege - } - in_diplomatic_range = scope:councillor_liege - highest_held_title_tier >= tier_county - } } trigger_else = { scope:target_character = { - in_diplomatic_range = scope:councillor_liege highest_held_title_tier >= tier_county + in_diplomatic_range = scope:councillor_liege } } } diff --git a/common/council_tasks/00_steward_tasks.txt b/common/council_tasks/00_steward_tasks.txt index a4fa2af2e..84786e005 100644 --- a/common/council_tasks/00_steward_tasks.txt +++ b/common/council_tasks/00_steward_tasks.txt @@ -13,7 +13,14 @@ } effect_desc = { - desc = task_collect_taxes_effect_desc + triggered_desc = { + desc = task_collect_taxes_effect_desc + trigger = { liege = { is_landed = yes } } + } + triggered_desc = { + desc = task_collect_taxes_domicile_effect_desc + trigger = { liege = { has_domicile = yes } } + } triggered_desc = { trigger = { liege = { has_perk = tax_man_perk } } desc = task_collect_taxes_tax_man_bonus_desc @@ -69,6 +76,7 @@ council_owner_modifier = { name = task_collect_taxes_modifier domain_tax_mult = 1 + domicile_monthly_gold_mult = 1 scale = steward_collect_taxes_total_scale } @@ -141,14 +149,15 @@ task_develop_county = { task_max_value = 100 highlight_own_realm = yes - asset = { - icon = "gfx/interface/icons/council_task_types/task_develop_county.dds" - background = "gfx/interface/buttons/button_round_bg.dds" - frame = "gfx/interface/buttons/button_round_frame.dds" - glow = "gfx/particles/halo.dds" - } - is_shown = { + scope:councillor_liege = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + } trigger_if = { limit = { scope:councillor_liege = { tgp_has_access_to_ministry_trigger = yes } @@ -157,7 +166,18 @@ task_develop_county = { } } + asset = { + icon = "gfx/interface/icons/council_task_types/task_increase_prosperity_county.dds" + background = "gfx/interface/buttons/button_round_bg.dds" + frame = "gfx/interface/buttons/button_round_frame.dds" + glow = "gfx/particles/halo.dds" + } + effect_desc = { + triggered_desc = { + trigger = { council_task_not_started_in_county_trigger = yes } + desc = task_develop_county_current_status + } desc = task_develop_county_complete_effect_desc desc = task_develop_county_effect_desc desc = { @@ -182,7 +202,7 @@ task_develop_county = { trigger_if = { limit = { exists = scope:county } scope:county = { - county_control < full_county_control + county_control < county_control_baseline } } } @@ -340,10 +360,22 @@ task_develop_county = { desc = COUNCILLOR_IS_YOUR_NEMESIS } } + if = { + limit = { + exists = scope:county + scope:county.title_province = { + has_building_or_higher = manor_chamber_blocks_1 + } + } + add = { + value = scope:councillor.manor_chamber_blocks_steward_develop_county_bonus + desc = MANOR_CHAMBER_BLOCKS_STEWARD_PROSPERITY_BONUS + } + } if = { #Tribal penalty limit = { scope:councillor_liege = { - should_apply_tribal_development_penalty_trigger = yes + should_apply_tribal_prosperity_penalty_trigger = yes } } add = { @@ -351,23 +383,23 @@ task_develop_county = { desc = DEVELOP_COUNTY_TRIBAL_PENALTY_VALUE } } - if = { # Development reduces the speed. + if = { # Prosperity reduces the speed. limit = { exists = scope:county scope:county = { - development_level > 0 + prosperity_level > 0 } } add = { - value = scope:county.current_development_penalty - desc = STEWARD_CURRENT_DEVELOPMENT_PENALTY + value = scope:county.current_prosperity_penalty + desc = STEWARD_CURRENT_PROSPERITY_PENALTY } } if = { limit = { exists = scope:county } multiply = { - value = scope:county.development_rate_modifier + value = scope:county.prosperity_rate_modifier desc = STEWARD_COUNTY_SPEED_MODIFIERS } } @@ -406,7 +438,7 @@ task_develop_county = { potential_county = { scope:county = { is_landless_type_title = no - development_level < max_development_level + prosperity_level < max_prosperity_level trigger_if = { limit = { scope:councillor_liege = { @@ -429,7 +461,7 @@ task_develop_county = { } OR = { scope:councillor_liege = { - has_character_flag = vassal_directive_improve_development + has_character_flag = vassal_directive_improve_prosperity vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } } culture = scope:councillor_liege.culture @@ -452,29 +484,37 @@ task_develop_county = { county_modifier = { name = steward_develop_county_modifier - development_growth = 100 + prosperity_growth = 100 holding_build_speed = -7 #holding_build_gold_cost = -1 build_speed = -7 + district_build_speed = -7 #build_gold_cost = -1 scale = { value = steward_develop_county_total divide = 100 } } county_modifier = { - name = steward_develop_county_current_development_modifier - development_growth = 100 - scale = { value = scope:councillor.current_development_penalty divide = 100 } + name = steward_develop_county_current_prosperity_modifier + prosperity_growth = 100 + scale = { + value = 0 + if = { + limit = { scope:county ?= { prosperity_level > 0 } } + add = scope:councillor.current_prosperity_penalty + divide = 100 + } + } } county_modifier = { name = steward_develop_county_tribal_penalty_modifier - development_growth = 100 + prosperity_growth = 100 scale = { value = 0 if = { limit = { scope:councillor_liege = { - should_apply_tribal_development_penalty_trigger = yes + should_apply_tribal_prosperity_penalty_trigger = yes } } value = scope:councillor.steward_develop_county_tribal_penalty @@ -484,13 +524,13 @@ task_develop_county = { } on_start_task_county = { - # save current development_level for catalyst purpose + # save current prosperity_level for catalyst purpose if = { limit = { exists = scope:county } scope:county = { set_variable = { - name = current_development_level - value = development_level + name = current_prosperity_level + value = prosperity_level } } } @@ -503,7 +543,7 @@ task_develop_county = { AND = { exists = scope:county scope:county = { - development_level = max_development_level + prosperity_level = max_prosperity_level } } scope:councillor_liege = { @@ -519,19 +559,19 @@ task_develop_county = { on_monthly_county = { scope:councillor_liege = { - # Check development level progress + # Check prosperity level progress if = { limit = { exists = scope:county - exists = scope:county.var:current_development_level scope:county = { - floored_development_value > floored_current_development_value + has_variable = current_prosperity_level + prosperity_level > var:current_prosperity_level } } scope:county = { set_variable = { - name = current_development_level - value = development_level + name = current_prosperity_level + value = prosperity_level } } @@ -540,23 +580,23 @@ task_develop_county = { limit = { exists = primary_title primary_title.tier >= tier_kingdom + NOT = { + has_focus = stewardship_domain_focus + } any_sub_realm_county = { culture = { cultural_acceptance = { target = scope:councillor_liege.culture value < 52 } } } - NOT = { - has_focus = stewardship_domain_focus - } } add_character_flag = { - flag = no_ai_increase_development + flag = no_ai_increase_prosperity years = 15 } } else = { add_character_flag = { - flag = no_ai_increase_development + flag = no_ai_increase_prosperity years = 5 } } @@ -614,8 +654,8 @@ task_develop_county = { } scope:county = { set_variable = { - name = current_development_level - value = development_level + name = current_prosperity_level + value = prosperity_level } } } @@ -635,13 +675,13 @@ task_develop_county = { if = { # Don't do this too often limit = { - scope:councillor_liege = { has_character_flag = no_ai_increase_development } + scope:councillor_liege = { has_character_flag = no_ai_increase_prosperity } } multiply = 0 } else_if = { limit = { - scope:councillor_liege.gold >= steward_increase_development_value + scope:councillor_liege.gold >= steward_increase_prosperity_value } add = 300 } @@ -656,7 +696,7 @@ task_develop_county = { if = { limit = { scope:councillor_liege = { - has_character_flag = vassal_directive_improve_development + has_character_flag = vassal_directive_improve_prosperity vassal_is_valid_and_follows_directive_trigger = { VASSAL = this LIEGE = liege } } } @@ -665,6 +705,334 @@ task_develop_county = { } } +task_republic_trade_logistics = { + position = councillor_steward + task_type = task_type_general + task_progress = task_progress_infinite + + is_shown = { + scope:councillor_liege = { + government_has_flag = government_is_republic + } + } + + asset = { + icon = "gfx/interface/icons/council_task_types/task_trade_logistics.dds" + background = "gfx/interface/buttons/button_round_bg.dds" + frame = "gfx/interface/buttons/button_round_frame.dds" + glow = "gfx/particles/halo.dds" + } + + effect_desc = { + # Trade Capacity + desc = task_republic_trade_logistics_capacity_desc + triggered_desc = { + trigger = { + scope:councillor_liege.house ?= { + OR = { + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_1 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_2 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_3 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_4 + } + } + } + desc = ambition_improved_task_logistics_capacity_bonus + } + # Trade Goods Expertise + desc = task_republic_trade_logistics_expertise_desc + triggered_desc = { + trigger = { + scope:councillor_liege.house ?= { + OR = { + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_1 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_2 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_3 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_4 + } + } + } + desc = ambition_improved_task_logistics_expertise_bonus + } + # Side effects + desc = { + desc = council_task_possible_side_effects + triggered_desc = { + trigger = { stewardship > mediocre_skill_rating } + desc = task_republic_trade_logistics_clearer_ledgers + } + triggered_desc = { + trigger = { + stewardship > mediocre_skill_rating + NOT = { has_character_modifier = republic_reliable_caravans_modifier } + } + desc = task_republic_trade_logistics_reliable_caravans + } + triggered_desc = { + trigger = { + stewardship < high_skill_rating + has_variable = republic_trade_logistics_value + var:republic_trade_logistics_value > 0 + } + desc = task_republic_trade_logistics_bottlenecked_warehouses + } + triggered_desc = { + trigger = { + stewardship < high_skill_rating + short_term_gold > 0 + } + desc = task_republic_trade_logistics_spoiled_cargo + } + } + } + + is_valid_showing_failures_only = { + tgp_natural_disaster_councillor_available_for_task_trigger = yes + } + + on_start_task = { + liege = { + set_variable = { + name = republic_trade_logistics_value + value = 0 + } + } + } + + on_cancel_task = { + if = { + limit = { + is_alive = yes + has_variable = republic_trade_logistics_value + } + remove_variable = republic_trade_logistics_value + } + } + + on_monthly = { + if = { + limit = { liege = { is_ai = no } } + if = { + limit = { + liege = { + has_variable = republic_trade_logistics_value + } + } + liege = { + if = { + limit = { + var:republic_trade_logistics_value < root.republic_trade_logistics_max_value + } + change_variable = { + name = republic_trade_logistics_value + add = root.republic_trade_logistics_monthly_increase + } + } + if = { + limit = { + var:republic_trade_logistics_value > root.republic_trade_logistics_max_value + } + set_variable = { + name = republic_trade_logistics_value + value = root.republic_trade_logistics_max_value + } + } + } + } + else = { + liege = { + set_variable = { + name = republic_trade_logistics_value + value = 0 + } + } + } + } + } + + council_owner_modifier = { + name = task_republic_trade_logistics_modifier + trade_capacity_mult = 0.01 + scale = republic_trade_logistics_final_value + } + + council_owner_modifier = { + name = task_republic_trade_logistics_modifier + trade_expertise_growth_mult = 0.01 + scale = republic_trade_logistics_expertise_final_value + } + + monthly_on_action = task_republic_trade_logistics_side_effects + + ai_will_do = { + value = 0 + } +} + +task_republic_market_oversight = { + position = councillor_steward + task_type = task_type_general + task_progress = task_progress_infinite + + is_shown = { + scope:councillor_liege = { + government_has_flag = government_is_republic + } + } + + asset = { + icon = "gfx/interface/icons/council_task_types/task_market_oversight.dds" + background = "gfx/interface/buttons/button_round_bg.dds" + frame = "gfx/interface/buttons/button_round_frame.dds" + glow = "gfx/particles/halo.dds" + } + + effect_desc = { + # Competitiveness + desc = task_republic_market_oversight_competitiveness_desc + triggered_desc = { + trigger = { + scope:councillor_liege.house ?= { + OR = { + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_1 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_2 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_3 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_4 + } + } + } + desc = ambition_improved_task_market_oversight_competitiveness_bonus + } + # Sell price + desc = task_republic_market_oversight_sell_price_desc + triggered_desc = { + trigger = { + scope:councillor_liege.house ?= { + OR = { + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_1 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_2 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_3 + has_house_aspiration_parameter = ambition_improved_task_logistics_and_market_4 + } + } + } + desc = ambition_improved_task_market_oversight_sell_price_bonus + } + # Side effects + desc = { + desc = council_task_possible_side_effects + triggered_desc = { + trigger = { + stewardship > mediocre_skill_rating + NOT = { has_character_modifier = republic_premium_contracts_modifier } + } + desc = task_republic_market_oversight_premium_contracts + } + triggered_desc = { + trigger = { stewardship > mediocre_skill_rating } + desc = task_republic_market_oversight_merchant_cooperation + } + triggered_desc = { + trigger = { + stewardship < high_skill_rating + has_variable = republic_market_oversight_value + var:republic_market_oversight_value > 0 + } + desc = task_republic_market_oversight_market_scandal + } + triggered_desc = { + trigger = { + stewardship < high_skill_rating + NOT = { has_character_modifier = republic_inspector_bribery_modifier } + } + desc = task_republic_market_oversight_inspector_bribery + } + } + } + + is_valid_showing_failures_only = { + tgp_natural_disaster_councillor_available_for_task_trigger = yes + } + + on_start_task = { + liege = { + set_variable = { + name = republic_market_oversight_value + value = 0 + } + } + } + + on_cancel_task = { + if = { + limit = { + is_alive = yes + has_variable = republic_market_oversight_value + } + remove_variable = republic_market_oversight_value + } + } + + on_monthly = { + if = { + limit = { liege = { is_ai = no } } + if = { + limit = { + liege = { + has_variable = republic_market_oversight_value + } + } + liege = { + if = { + limit = { + var:republic_market_oversight_value < root.republic_market_oversight_max_value + } + change_variable = { + name = republic_market_oversight_value + add = root.republic_market_oversight_monthly_increase + } + } + if = { + limit = { + var:republic_market_oversight_value > root.republic_market_oversight_max_value + } + set_variable = { + name = republic_market_oversight_value + value = root.republic_market_oversight_max_value + } + } + } + } + else = { + liege = { + set_variable = { + name = republic_market_oversight_value + value = 0 + } + } + } + } + } + + council_owner_modifier = { + name = task_republic_market_oversight_modifier + trade_competitiveness_mult = 0.01 + scale = republic_market_oversight_final_value + } + + council_owner_modifier = { + name = task_republic_market_oversight_modifier + trade_category_all_sell_price_mult = 0.01 + scale = republic_market_oversight_sell_price_final_value + } + + monthly_on_action = task_republic_market_oversight_side_effects + + ai_will_do = { + value = 0 + } +} + task_promote_culture = { position = councillor_steward @@ -675,6 +1043,17 @@ task_promote_culture = { restart_on_finish = yes highlight_own_realm = yes + is_shown = { + scope:councillor_liege = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + } + } + asset = { icon = "gfx/interface/icons/council_task_types/task_promote_culture.dds" background = "gfx/interface/buttons/button_round_bg.dds" @@ -728,7 +1107,7 @@ task_promote_culture = { } } } - desc = task_promote_culture_improve_county_opinion + desc = task_promote_culture_improve_popular_opinion } triggered_desc = { trigger = { @@ -798,16 +1177,27 @@ task_promote_culture = { add = steward_promote_culture_contextual_bonuses - if = { # Development reduces the speed. Should be the last non-multiply modifier applied to avoid negative values + if = { # Prosperity reduces the speed. Should be the last non-multiply modifier applied to avoid negative values limit = { exists = scope:county scope:county = { - development_level > 0 + prosperity_level > 0 } } add = { - value = scope:county.promote_culture_development_penalty - desc = STEWARD_PROMOTE_CULTURE_DEVELOPMENT_PENALTY + value = scope:county.promote_culture_prosperity_penalty + desc = STEWARD_PROMOTE_CULTURE_PROSPERITY_PENALTY + } + } + if = { + limit = { exists = scope:county.title_province } + multiply = { + value = 1 + subtract = { + value = scope:county.title_province.province_size_level + multiply = promote_culture_settlement_size_penalty_step + } + desc = STEWARD_PROMOTE_CULTURE_SETTLEMENT_SIZE } } #### @@ -1523,6 +1913,17 @@ task_accept_culture = { highlight_own_realm = yes task_progress = task_progress_infinite + is_shown = { + scope:councillor_liege = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + } + } + asset = { icon = "gfx/interface/icons/council_task_types/task_accept_culture.dds" background = "gfx/interface/buttons/button_round_bg.dds" @@ -1619,13 +2020,13 @@ task_accept_culture = { limit = { exists = scope:county } scope:county = { NOR = { - has_county_modifier = steward_accept_culture_reduced_development_spread_modifier - has_county_modifier = steward_accept_culture_increased_development_spread_modifier + has_county_modifier = steward_accept_culture_reduced_prosperity_spread_modifier + has_county_modifier = steward_accept_culture_increased_prosperity_spread_modifier } } } } - desc = task_accept_culture_reduced_development_growth + desc = task_accept_culture_reduced_prosperity_growth } triggered_desc = { trigger = { @@ -1634,13 +2035,13 @@ task_accept_culture = { limit = { exists = scope:county } scope:county = { NOR = { - has_county_modifier = steward_accept_culture_reduced_development_spread_modifier - has_county_modifier = steward_accept_culture_increased_development_spread_modifier + has_county_modifier = steward_accept_culture_reduced_prosperity_spread_modifier + has_county_modifier = steward_accept_culture_increased_prosperity_spread_modifier } } } } - desc = task_accept_culture_increased_development_growth + desc = task_accept_culture_increased_prosperity_growth } triggered_desc = { trigger = { @@ -1871,7 +2272,7 @@ task_accept_culture = { if = { # Prefer this over Collecting Taxes if you have some money limit = { - scope:councillor_liege.gold >= steward_increase_development_value + scope:councillor_liege.gold >= steward_increase_prosperity_value } add = 1 } @@ -1992,6 +2393,18 @@ task_convince_dejure = { ai_county_target = neighbor_land task_progress = task_progress_percentage + is_shown = { + has_dlc_feature = royal_court + scope:councillor_liege = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + } + is_landed = yes + } + } + } + asset = { icon = "gfx/interface/icons/council_task_types/task_convince_dejure.dds" background = "gfx/interface/buttons/button_round_bg.dds" @@ -2024,10 +2437,6 @@ task_convince_dejure = { } } - is_shown = { - has_dlc_feature = royal_court - } - progress = { value = 0 add = { diff --git a/common/court_positions/types/00_camp_officers.txt b/common/court_positions/types/00_camp_officers.txt index c819f94b4..7cff57a80 100644 --- a/common/court_positions/types/00_camp_officers.txt +++ b/common/court_positions/types/00_camp_officers.txt @@ -172,7 +172,7 @@ second_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -407,7 +407,7 @@ quartermaster_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -565,7 +565,7 @@ armorer_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -800,7 +800,7 @@ chief_forager_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -983,7 +983,7 @@ master_thief_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -1051,7 +1051,7 @@ master_thief_camp_officer = { custom_employer_modifier_description = master_thief_camp_officer_employer_custom_effect_description base_employer_court_modifier = { - domicile_monthly_gold_add = 0.25 + domicile_monthly_gold_add = 0.1 } modifier = { @@ -1151,7 +1151,7 @@ head_porter_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -1456,7 +1456,7 @@ head_groom_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -1653,7 +1653,7 @@ huntperson_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -1834,7 +1834,7 @@ kennelperson_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -2000,7 +2000,7 @@ chief_engineer_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -2217,7 +2217,7 @@ witness_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -2410,7 +2410,7 @@ person_haggler_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -2605,7 +2605,7 @@ camp_cook_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -2819,7 +2819,7 @@ master_bard_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -2976,7 +2976,7 @@ stooge_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -3119,7 +3119,7 @@ master_of_arms_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -3292,7 +3292,7 @@ light_cavalry_captain_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -3470,7 +3470,7 @@ camelry_captain_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -3644,7 +3644,7 @@ elephantry_captain_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -3823,7 +3823,7 @@ heavy_cavalry_captain_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -3997,7 +3997,7 @@ horse_archer_captain_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -4171,7 +4171,7 @@ archer_captain_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -4345,7 +4345,7 @@ heavy_infantry_captain_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -4519,7 +4519,7 @@ light_infantry_captain_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -4693,7 +4693,7 @@ pike_captain_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -4897,7 +4897,7 @@ master_of_spoils_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -5041,7 +5041,7 @@ laureate_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } @@ -5209,7 +5209,7 @@ camp_priest_camp_officer = { } is_shown = { - has_ep3_dlc_trigger = yes + has_playable_adventurer_dlc_trigger = yes custom_tooltip = { text = landless_government_tt OR = { government_has_flag = government_is_landless_adventurer government_has_flag = government_is_landless_minority } diff --git a/common/culture/eras/00_culture_eras.txt b/common/culture/eras/00_culture_eras.txt index 04b190095..017abf009 100644 --- a/common/culture/eras/00_culture_eras.txt +++ b/common/culture/eras/00_culture_eras.txt @@ -14,8 +14,13 @@ culture_era_early_medieval = { culture_tradition_max_add = 1 } + character_modifier = { + men_at_arms_maintenance = 0.15 + } + custom = more_expensive_court_positions custom = increased_activity_cost + custom = unlock_early_medieval_holding_tiers ################################################## # MAA Upgrades @@ -49,10 +54,12 @@ culture_era_high_medieval = { character_modifier = { mercenary_hire_cost_mult = 0.15 + men_at_arms_maintenance = 0.15 } custom = more_expensive_court_positions custom = increased_activity_cost + custom = unlock_high_medieval_holding_tiers ################################################## # MAA Upgrades @@ -93,10 +100,12 @@ culture_era_late_medieval = { character_modifier = { mercenary_hire_cost_mult = 0.15 + men_at_arms_maintenance = 0.15 } custom = more_expensive_court_positions custom = increased_activity_cost + custom = unlock_late_medieval_holding_tiers ################################################## diff --git a/common/culture/innovations/00_early_medieval_innovations.txt b/common/culture/innovations/00_early_medieval_innovations.txt index 4632da20b..c37c82ecb 100644 --- a/common/culture/innovations/00_early_medieval_innovations.txt +++ b/common/culture/innovations/00_early_medieval_innovations.txt @@ -48,10 +48,6 @@ innovation_battlements = { custom = unlock_early_medieval_fortification_buildings custom = unlock_fortification_rights_contract - - character_modifier = { - men_at_arms_maintenance = -0.05 - } flag = global_regular flag = early_medieval_era_regular @@ -66,6 +62,7 @@ innovation_mangonel = { custom = unlock_siege_maa_second_level custom = eligible_accolade_besieger_attribute + custom = unlock_mangonel_buildings asset = { trigger = { @@ -131,6 +128,10 @@ innovation_burhs = { # Stone Forts in-game levy_size = 0.05 } + parameters = { + stone_forts = yes + } + flag = global_regular flag = early_medieval_era_regular } @@ -141,6 +142,8 @@ innovation_house_soldiers = { culture_era = culture_era_early_medieval icon = @maa_01 + custom = unlock_early_medieval_maa_buildings + character_modifier = { men_at_arms_cap = 1 men_at_arms_limit = 3 @@ -158,6 +161,12 @@ innovation_horseshoes = { character_modifier = { movement_speed = 0.1 + light_cavalry_damage_mult = 0.05 + light_cavalry_maintenance_mult = 0.05 + heavy_cavalry_damage_mult = 0.05 + heavy_cavalry_maintenance_mult = 0.05 + archer_cavalry_damage_mult = 0.05 + archer_cavalry_maintenance_mult = 0.05 } flag = global_regular @@ -173,6 +182,44 @@ innovation_arched_saddle = { custom = unlock_maa_armored_horsemen custom = eligible_accolade_lancer_attribute + character_modifier = { + heavy_cavalry_toughness_mult = 0.05 + heavy_cavalry_maintenance_mult = 0.05 + archer_cavalry_toughness_mult = 0.05 + archer_cavalry_maintenance_mult = 0.05 + camel_cavalry_toughness_mult = 0.05 + camel_cavalry_maintenance_mult = 0.05 + } + + flag = global_regular + flag = early_medieval_era_regular + + ai_weight_for_fascination = { + value = 100 + if = { + limit = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + multiply = 0 + } + } +} + +innovation_riveted_mail = { + skill = martial + group = culture_group_military + culture_era = culture_era_early_medieval + icon = @weapons_and_armor_01 + + character_modifier = { + heavy_infantry_toughness_mult = 0.05 + heavy_infantry_maintenance_mult = 0.05 + pikemen_toughness_mult = 0.05 + pikemen_maintenance_mult = 0.05 + } + flag = global_regular flag = early_medieval_era_regular } @@ -183,24 +230,29 @@ innovation_manorialism = { culture_era = culture_era_early_medieval icon = @fortifications - custom = unlock_early_medieval_economic_buildings + custom = unlock_manorial_buildings custom = more_parochial character_modifier = { - build_speed = -0.1 + villages_district_district_build_speed = -0.1 } flag = global_regular flag = early_medieval_era_regular } -innovation_development_02 = { +innovation_prosperity_02 = { skill = stewardship group = culture_group_civic culture_era = culture_era_early_medieval - icon = @nobility_03 + icon = @merchant custom = reduce_develop_county_penalty_02 + custom = unlock_prosperity_02_buildings + + county_modifier = { + urban_tax_mult = 0.025 + } flag = global_regular flag = early_medieval_era_regular @@ -213,9 +265,14 @@ innovation_currency_02 = { icon = @coinage custom = unlock_coinage_rights_contract + custom = unlock_mint_buildings character_modifier = { - development_growth_factor = 0.1 + prosperity_growth_factor = 0.05 + } + + county_modifier = { + commerce_tax_mult = 0.025 } flag = global_regular @@ -250,6 +307,7 @@ innovation_royal_prerogative = { unlock_law = crown_authority_2 unlock_law = crown_authority_3 custom = more_courtly + custom = unlock_royal_prerogative_buildings flag = global_regular flag = early_medieval_era_regular @@ -273,10 +331,16 @@ innovation_armilary_sphere = { skill = learning group = culture_group_civic culture_era = culture_era_early_medieval - icon = @misc_inventions + icon = @navigator + custom = unlock_armilary_sphere_buildings character_modifier = { naval_movement_speed_mult = 0.25 + trade_route_length_add = 1 + } + + county_modifier = { + maritime_tax_mult = 0.05 } flag = global_regular @@ -316,13 +380,197 @@ innovation_baliffs = { # Magistrates in-game } county_modifier = { - building_slot_add = 1 + levy_size = 0.05 } character_modifier = { tax_slot_add = 1 } custom = more_glory_hounds + custom = unlock_baliffs_buildings + + flag = global_regular + flag = early_medieval_era_regular + + ai_weight_for_fascination = { + value = 100 + if = { + limit = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + multiply = 0 + } + } +} + +innovation_heavy_plow = { + skill = stewardship + group = culture_group_civic + culture_era = culture_era_early_medieval + icon = @heavy_plow + + asset = { + trigger = { + OR = { + has_cultural_pillar = heritage_indo_aryan + has_cultural_pillar = heritage_dravidian + } + } + icon = @innovation_farm + name = innovation_heavy_plow_eri + } + + asset = { + trigger = { + NOR = { + has_cultural_pillar = heritage_frankish + has_cultural_pillar = heritage_west_germanic + has_cultural_pillar = heritage_central_germanic + has_cultural_pillar = heritage_west_slavic + has_cultural_pillar = heritage_north_germanic + has_cultural_pillar = heritage_east_slavic + has_cultural_pillar = heritage_brythonic + has_cultural_pillar = heritage_goidelic + has_cultural_pillar = heritage_magyar + has_cultural_pillar = heritage_south_slavic + has_cultural_pillar = heritage_vlach + has_cultural_pillar = heritage_baltic + has_cultural_pillar = heritage_balto_finnic + has_cultural_pillar = heritage_volga_finnic + has_cultural_pillar = heritage_ugro_permian + has_cultural_pillar = heritage_gothic + } + } + name = innovation_heavy_plow_transplanting + } + + county_modifier = { + agricultural_tax_mult = 0.025 + } + + parameters = { + heavy_plow = yes + } + + custom = unlock_heavy_plow_buildings + + flag = global_regular + flag = early_medieval_era_regular + + ai_weight_for_fascination = { + value = 100 + if = { + limit = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + multiply = 0 + } + } +} + +innovation_prospecting = { + skill = learning + group = culture_group_civic + culture_era = culture_era_early_medieval + icon = @miner + + county_modifier = { + mining_tax_mult = 0.025 + } + + custom = unlock_prospecting_buildings + + flag = global_regular + flag = early_medieval_era_regular + + ai_weight_for_fascination = { + value = 100 + if = { + limit = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + multiply = 0 + } + } +} + +innovation_coppicing = { + skill = stewardship + group = culture_group_civic + culture_era = culture_era_early_medieval + icon = @coppicing + + county_modifier = { + woodland_tax_mult = 0.05 + } + + custom = unlock_coppicing_buildings + + flag = global_regular + flag = early_medieval_era_regular + + ai_weight_for_fascination = { + value = 100 + if = { + limit = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + multiply = 0 + } + } +} + +innovation_monasticism = { + skill = learning + group = culture_group_civic + culture_era = culture_era_early_medieval + icon = @wine + + county_modifier = { + religious_tax_mult = 0.05 + } + + character_modifier = { + monthly_piety_gain_mult = 0.05 + } + + custom = unlock_monasticism_buildings + + flag = global_regular + flag = early_medieval_era_regular + + ai_weight_for_fascination = { + value = 100 + if = { + limit = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + multiply = 0 + } + } +} + +innovation_craft_ordinances = { + skill = stewardship + group = culture_group_civic + culture_era = culture_era_early_medieval + icon = @weaver + + county_modifier = { + artisan_tax_mult = 0.05 + } + + custom = unlock_craft_ordinances_buildings flag = global_regular flag = early_medieval_era_regular @@ -371,9 +619,10 @@ innovation_ghilman = { icon = @maa_02 character_modifier = { - men_at_arms_maintenance = -0.15 + men_at_arms_maintenance = -0.05 } flag = global_regional flag = early_medieval_era_regional } + diff --git a/common/culture/innovations/tgp_innovations.txt b/common/culture/innovations/tgp_innovations.txt index 0271fb996..9d9cede18 100644 --- a/common/culture/innovations/tgp_innovations.txt +++ b/common/culture/innovations/tgp_innovations.txt @@ -587,7 +587,7 @@ innovation_coking = { } character_modifier = { - men_at_arms_recruitment_cost = -0.15 + men_at_arms_recruitment_cost = -0.1 } county_modifier = { diff --git a/common/culture/pillars/00_language.txt b/common/culture/pillars/00_language.txt index 8fb7d3454..936a2f9fc 100644 --- a/common/culture/pillars/00_language.txt +++ b/common/culture/pillars/00_language.txt @@ -405,6 +405,24 @@ language_finnic = { color = finnish } +language_arpitan = { + type = language + is_shown = { + language_is_shown_trigger = { + LANGUAGE = language_arpitan + } + } + ai_will_do = { + value = 10 + if = { + limit = { has_cultural_pillar = language_arpitan } + multiply = 10 + } + } + + color = arpitan +} + language_frankish = { type = language is_shown = { diff --git a/common/culture/traditions/09_mpo_traditions.txt b/common/culture/traditions/09_mpo_traditions.txt index 28feb77f3..cde0f3490 100644 --- a/common/culture/traditions/09_mpo_traditions.txt +++ b/common/culture/traditions/09_mpo_traditions.txt @@ -314,7 +314,7 @@ tradition_mpo_northern_tribes = { can_pick_for_hybridization = { custom_tooltip = { text = cannot_hybridize_northern_tribes - always = no + has_cultural_tradition = tradition_mpo_northern_tribes } } diff --git a/common/decisions/80_major_decisions_british_isles.txt b/common/decisions/80_major_decisions_british_isles.txt index b4d616bca..12e8c1671 100644 --- a/common/decisions/80_major_decisions_british_isles.txt +++ b/common/decisions/80_major_decisions_british_isles.txt @@ -1,6 +1,6 @@ #The culture of the people both high and low is veering towards Celtic - embrace it? ### Reclaim Britannia ### - +# ##The culture of the people both high and low is veering towards Celtic - embrace it? #### Reclaim Britannia ### #reclaim_britannia_decision = { diff --git a/common/decisions/dlc_decisions/ep_3/06_ep3_hasan_story_cycle_decisions.txt b/common/decisions/dlc_decisions/ep_3/06_ep3_hasan_story_cycle_decisions.txt index 8e2b63cb6..38f150af4 100644 --- a/common/decisions/dlc_decisions/ep_3/06_ep3_hasan_story_cycle_decisions.txt +++ b/common/decisions/dlc_decisions/ep_3/06_ep3_hasan_story_cycle_decisions.txt @@ -374,9 +374,9 @@ # scope:location = { # if = { # limit = { -# has_special_building = no +# has_special_district = no # } -# add_special_building = assassin_castle_01 +# add_special_district = assassin_castle_01_district # } # else_if = { # limit = { @@ -385,7 +385,7 @@ # hidden_effect = { # remove_building = alamut_castle_01 # } -# add_special_building = alamut_castle_02 +# add_special_district = alamut_castle_01_district # } # } # add_intrigue_skill = 2 diff --git a/common/decisions/dlc_decisions/mpo/mpo_pax_mongolica_decision.txt b/common/decisions/dlc_decisions/mpo/mpo_pax_mongolica_decision.txt index 9fd67e8a8..c68055372 100644 --- a/common/decisions/dlc_decisions/mpo/mpo_pax_mongolica_decision.txt +++ b/common/decisions/dlc_decisions/mpo/mpo_pax_mongolica_decision.txt @@ -7,16 +7,17 @@ # } # decision_group_type = nomad_major # sort_order = 120 - +# # is_shown = { # government_has_flag = government_is_nomadic +# exists = situation:the_great_steppe # any_character_situation = { # this = situation:the_great_steppe # } # NOT = { has_variable = pax_mongolica_var } -# exists = situation:the_great_steppe +# dynasty ?= { has_dynasty_perk = mpo_nomad_legacy_5 } # } - +# # is_valid = { # dynasty ?= { has_dynasty_perk = mpo_nomad_legacy_5 } # OR = { @@ -24,11 +25,11 @@ # has_realm_law = nomadic_authority_5 # } # } - +# # is_valid_showing_failures_only = { # is_available_adult = yes # } - +# # cost = { # gold = { # value = 0 @@ -52,8 +53,8 @@ # value = massive_prestige_value # } # } - - +# +# # effect = { # set_variable = pax_mongolica_var # # Rewards given out in the event @@ -84,10 +85,10 @@ # else_if = { # limit = { # NOT = { -# culture = { has_innovation = innovation_development_01 } +# culture = { has_innovation = innovation_prosperity_01 } # } # } -# culture = { add_innovation = innovation_development_01 } +# culture = { add_innovation = innovation_prosperity_01 } # } # else = { # culture = { add_random_innovation = culture_group_civic } @@ -95,7 +96,7 @@ # } # trigger_event = mpo_decisions_events.0400 # } - +# # ai_check_interval_by_tier = { # barony = 0 # county = 0 @@ -104,17 +105,17 @@ # empire = 24 # hegemony = 24 # } - +# # ai_potential = { # prestige >= massive_prestige_value # } - +# # ai_will_do = { # base = 30 # modifier = { # add = -100 # NOT = { -# prestige >= { +# gold >= { # value = monumental_gold_value # multiply = 2 # } @@ -135,3 +136,4 @@ # } # } #} +# \ No newline at end of file diff --git a/common/decisions/dlc_decisions/pam/bulls_decisions.txt b/common/decisions/dlc_decisions/pam/bulls_decisions.txt index c8d5b93fe..55fd3fe92 100644 --- a/common/decisions/dlc_decisions/pam/bulls_decisions.txt +++ b/common/decisions/dlc_decisions/pam/bulls_decisions.txt @@ -676,6 +676,10 @@ pam_permit_tenet_bull_decision = { factor = anathema_to_faith_ai_weight_factor tenet_is_anathema_to_faith_trigger = { FAITH = scope:actor.faith } } + modifier = { + factor = anathema_to_faith_ai_weight_factor + tenet_is_anathema_to_faith_trigger = { FAITH = scope:actor.faith } + } } save_scope_as = selected_item } @@ -709,6 +713,10 @@ pam_permit_tenet_bull_decision = { factor = anathema_to_faith_ai_weight_factor tenet_is_anathema_to_faith_trigger = { FAITH = scope:actor.faith } } + modifier = { + factor = anathema_to_faith_ai_weight_factor + tenet_is_anathema_to_faith_trigger = { FAITH = scope:actor.faith } + } } save_scope_as = selected_item } diff --git a/common/decisions/dlc_decisions/pam/pam_decisions.txt b/common/decisions/dlc_decisions/pam/pam_decisions.txt index 409e3d061..d84171cae 100644 --- a/common/decisions/dlc_decisions/pam/pam_decisions.txt +++ b/common/decisions/dlc_decisions/pam/pam_decisions.txt @@ -1844,11 +1844,11 @@ pam_reform_monastic_endowment_decision = { ai_check_interval_by_tier = { barony = 0 - county = 48 - duchy = 36 - kingdom = 36 - empire = 24 - hegemony = 24 + county = 120 + duchy = 120 + kingdom = 60 + empire = 60 + hegemony = 60 } is_shown = { diff --git a/common/defines/00_defines.txt b/common/defines/00_defines.txt index c78ef8999..6f6844c83 100644 --- a/common/defines/00_defines.txt +++ b/common/defines/00_defines.txt @@ -950,13 +950,13 @@ NTitle = { CREATE_TITLE_OR_TIER_KINGDOM = { -1 -1 -1 2 1 1 1 } CREATE_TITLE_PRESTIGE_GAIN = { 0 0 0 300 400 500 600 } CREATE_TITLE_LEGITIMACY_GAIN = { 0 0 0 25 50 75 100 } - CREATE_TITLE_GOLD_COST = { 0 0 0 250 500 1000 2000 } # remember to update values in create_duchy_title_value etc. in 01_dynamic_values.txt! - CREATE_TITLE_MIN_COST_FACTOR = 0.2 # creating a title will always cost at least this much in percent of the base cost, ex. 20% of 250 for a duchy + CREATE_TITLE_GOLD_COST = { 0 0 0 150 300 600 1200 } # remember to update values in create_duchy_title_value etc. in 01_dynamic_values.txt! + CREATE_TITLE_MIN_COST_FACTOR = 0.2 # creating a title will always cost at least this much in percent of the base cost, ex. 20% of 150 for a duchy CREATE_TITLE_MIN_PIETY_COST_FACTOR = 0.2 # creating a title will always cost at least this much in percent of the base cost, ex. 20% of 250 for a duchy DESTROY_TITLE_PRESTIGE_COST = { 0 0 0 400 800 1200 2200 } DESTROY_TITLE_LEGITIMACY_LOSS = { 0 0 0 25 50 75 100 } # Legitimacy lost when destroying titles of certain ranks (still allowed if you do not have enough legitimacy) DESTROY_TITLE_CLEAR_LAW_MULT = 1 # when destroying a title with title-specifc laws, the cost for clearing laws must be payed, multiplied by this value - USURP_TITLE_GOLD_COST = { 0 0 0 250 500 1000 2000 } # remember to update action_can_usurp_title in 00_title_actions.txt! + USURP_TITLE_GOLD_COST = { 0 0 0 150 300 600 1200 } # remember to update action_can_usurp_title in 00_title_actions.txt! USURP_TITLE_PRESTIGE_GAIN = { 0 0 0 300 400 500 600 } USURP_FAITH_HOSTILITY = 2 # If at or above this level of faith hostility, usurpation can only be done if the holder has no land in the title TAKE_TITLE_PRESTIGE_MULT = { 0 0.5 1 5 15 50 100 } @@ -1533,8 +1533,8 @@ NRaid = { RAID_LOOT_PER_SOLDIER = 0.1 # How much loot can a single soldier carry? Minimum increment is 0.001 MIN_SOLDIERS_TO_RAID = 200 # How small can a raid army be and still be able to loot? MONTHLY_ATTRITION = 0.01 # How much attrition do you take while looting a province? 0.01 = 1% per month - MONTHS_OF_RAID_LOOT = 12 # How many months of holding income (with owner effects discounted) does raiding provide? - LESS_MONTHS_OF_RAID_LOOT = 6 # This is subtracted from MONTHS_OF_RAID_LOOT if you have the government 'barter = yes' + MONTHS_OF_RAID_LOOT = 10 # How many months of holding income (with owner effects discounted) does raiding provide? + LESS_MONTHS_OF_RAID_LOOT = 4 # This is subtracted from MONTHS_OF_RAID_LOOT if you have the government 'barter = yes' # Progress cannot be lower than 1/day (except when interrupted by combat) BASE_PROGRESS = 20 # How much base raid action progress do you get per day? diff --git a/common/epidemics/00_epidemics.txt b/common/epidemics/00_epidemics.txt index 2079125c5..39e91b731 100644 --- a/common/epidemics/00_epidemics.txt +++ b/common/epidemics/00_epidemics.txt @@ -513,36 +513,54 @@ bubonic_plague = { infection_levels = { 10 = { province_modifier = { - monthly_county_control_decline_add = -0.6 - development_decline = -3 + all_tax_mult = -0.1 + province_size_baseline_add = -50 + monthly_province_size_change_when_above_baseline_add = -4 + monthly_control_change_when_above_baseline_add = -0.6 + prosperity_decline = -3 levy_reinforcement_rate = -0.3 levy_size = -0.25 supply_limit_mult = -0.2 - county_opinion_add = -10 + popular_opinion_add = -10 epidemic_travel_danger = 25 - } + } + county_modifier = { + control_baseline_add = -10 + } } 50 = { province_modifier = { - monthly_county_control_decline_add = -0.8 - development_decline = -6 + all_tax_mult = -0.25 + province_size_baseline_add = -100 + monthly_province_size_change_when_above_baseline_add = -8 + monthly_control_change_when_above_baseline_add = -0.8 + prosperity_decline = -6 levy_reinforcement_rate = -0.5 levy_size = -0.4 supply_limit_mult = -0.5 - county_opinion_add = -25 + popular_opinion_add = -25 epidemic_travel_danger = 40 - } + } + county_modifier = { + control_baseline_add = -20 + } } 80 = { province_modifier = { - monthly_county_control_decline_add = -0.8 - development_decline = -8 + all_tax_mult = -0.5 + province_size_baseline_add = -150 + monthly_province_size_change_when_above_baseline_add = -12.5 + monthly_control_change_when_above_baseline_add = -0.8 + prosperity_decline = -8 levy_reinforcement_rate = -1 levy_size = -0.5 supply_limit_mult = -1 - county_opinion_add = -25 + popular_opinion_add = -25 epidemic_travel_danger = 60 } + county_modifier = { + control_baseline_add = -25 + } } } @@ -622,11 +640,6 @@ bubonic_plague = { } outbreak_chance = { - value = { - value = outbreak_chance_black_plague_default_value - multiply = outbreak_chance_black_plague_mult_value - multiply = recent_epidemics_outbreak_mult_value - } if = { limit = { current_date >= 2835.1.1 @@ -634,15 +647,11 @@ bubonic_plague = { NOT = { has_global_variable = black_death_happened } - geographical_region = world_central_asia } - add = 100 - } - - if = { - limit = { - # Currently happening - has_global_variable = black_death + value = { + value = outbreak_chance_black_plague_default_value + multiply = outbreak_chance_black_plague_mult_value + multiply = recent_epidemics_outbreak_mult_value } value = 0 } @@ -667,11 +676,12 @@ bubonic_plague = { OR = { current_date < 2835.1.1 NOT = { - geographical_region = world_central_asia + has_global_variable = black_death_happened } + geographical_region = world_central_asia } + add = 100 } - value = 0 } multiply = 0.1 @@ -698,8 +708,9 @@ bubonic_plague = { on_province_infected = { county = { - apply_infection_development_loss = { BASE = 10 } + apply_infection_prosperity_loss = { BASE = 10 } } + apply_infection_trade_disruption = yes every_player = { if = { limit = { @@ -953,32 +964,50 @@ typhus = { infection_levels = { 10 = { province_modifier = { - monthly_county_control_decline_add = -0.3 - development_decline = -1 + all_tax_mult = -0.1 + province_size_baseline_add = -30 + monthly_province_size_change_when_above_baseline_add = -2.5 + monthly_control_change_when_above_baseline_add = -0.3 + prosperity_decline = -1 levy_reinforcement_rate = -0.2 - county_opinion_add = -2 + popular_opinion_add = -2 epidemic_travel_danger = 20 - } + } + county_modifier = { + control_baseline_add = -5 + } } 50 = { province_modifier = { - monthly_county_control_decline_add = -0.4 - development_decline = -2 + all_tax_mult = -0.25 + province_size_baseline_add = -60 + monthly_province_size_change_when_above_baseline_add = -5 + monthly_control_change_when_above_baseline_add = -0.4 + prosperity_decline = -2 levy_reinforcement_rate = -0.2 garrison_size = -0.1 - county_opinion_add = -3 + popular_opinion_add = -2 epidemic_travel_danger = 30 - } + } + county_modifier = { + control_baseline_add = -10 + } } 80 = { province_modifier = { - monthly_county_control_decline_add = -0.5 - development_decline = -3 + all_tax_mult = -0.5 + province_size_baseline_add = -90 + monthly_province_size_change_when_above_baseline_add = -7.5 + monthly_control_change_when_above_baseline_add = -0.5 + prosperity_decline = -3 levy_reinforcement_rate = -0.2 garrison_size = -0.2 - county_opinion_add = -5 + popular_opinion_add = -5 epidemic_travel_danger = 40 } + county_modifier = { + control_baseline_add = -15 + } } } @@ -1105,8 +1134,9 @@ typhus = { on_province_infected = { county = { - apply_infection_development_loss = { BASE = 5 } + apply_infection_prosperity_loss = { BASE = 5 } } + apply_infection_trade_disruption = yes cant_touch_this_achievement_effect = yes } @@ -1327,25 +1357,43 @@ consumption = { #Tuberculosis infection_levels = { 10 = { province_modifier = { - development_decline = -2 + all_tax_mult = -0.1 + province_size_baseline_add = -30 + monthly_province_size_change_when_above_baseline_add = -2.5 + prosperity_decline = -2 epidemic_travel_danger = 20 } + county_modifier = { + control_baseline_add = -5 + } } 50 = { province_modifier = { - monthly_county_control_decline_add = -0.05 - development_decline = -3 - county_opinion_add = -2 + all_tax_mult = -0.25 + province_size_baseline_add = -60 + monthly_province_size_change_when_above_baseline_add = -5 + monthly_control_change_when_above_baseline_add = -0.05 + prosperity_decline = -3 + popular_opinion_add = -2 epidemic_travel_danger = 40 - } + } + county_modifier = { + control_baseline_add = -10 + } } 80 = { province_modifier = { - monthly_county_control_decline_add = -0.1 - development_decline = -4 - county_opinion_add = -3 + all_tax_mult = -0.5 + province_size_baseline_add = -90 + monthly_province_size_change_when_above_baseline_add = -7.5 + monthly_control_change_when_above_baseline_add = -0.1 + prosperity_decline = -4 + popular_opinion_add = -2 epidemic_travel_danger = 60 } + county_modifier = { + control_baseline_add = -15 + } } } @@ -1515,8 +1563,9 @@ consumption = { #Tuberculosis on_province_infected = { county = { - apply_infection_development_loss = { BASE = 7 } + apply_infection_prosperity_loss = { BASE = 7 } } + apply_infection_trade_disruption = yes cant_touch_this_achievement_effect = yes } @@ -1724,25 +1773,43 @@ measles = { infection_levels = { 10 = { province_modifier = { - monthly_county_control_decline_add = -0.1 + all_tax_mult = -0.1 + province_size_baseline_add = -25 + monthly_province_size_change_when_above_baseline_add = -2 + monthly_control_change_when_above_baseline_add = -0.1 epidemic_travel_danger = 5 - } + } + county_modifier = { + control_baseline_add = -5 + } } 50 = { province_modifier = { - monthly_county_control_decline_add = -0.2 - development_decline = -0.25 - county_opinion_add = -2 + all_tax_mult = -0.25 + province_size_baseline_add = -50 + monthly_province_size_change_when_above_baseline_add = -4 + monthly_control_change_when_above_baseline_add = -0.2 + prosperity_decline = -0.25 + popular_opinion_add = -2 epidemic_travel_danger = 15 - } + } + county_modifier = { + control_baseline_add = -10 + } } 80 = { province_modifier = { - monthly_county_control_decline_add = -0.4 - development_decline = -0.5 - county_opinion_add = -5 + all_tax_mult = -0.5 + province_size_baseline_add = -75 + monthly_province_size_change_when_above_baseline_add = -6 + monthly_control_change_when_above_baseline_add = -0.4 + prosperity_decline = -0.5 + popular_opinion_add = -5 epidemic_travel_danger = 30 } + county_modifier = { + control_baseline_add = -15 + } } } @@ -1896,8 +1963,9 @@ measles = { on_province_infected = { county = { - apply_infection_development_loss = { BASE = 5 } + apply_infection_prosperity_loss = { BASE = 5 } } + apply_infection_trade_disruption = yes cant_touch_this_achievement_effect = yes } @@ -2087,29 +2155,47 @@ dysentery = { infection_levels = { 10 = { province_modifier = { - monthly_county_control_decline_add = -0.15 - county_opinion_add = -2 + all_tax_mult = -0.1 + province_size_baseline_add = -20 + monthly_province_size_change_when_above_baseline_add = -1.5 + monthly_control_change_when_above_baseline_add = -0.15 + popular_opinion_add = -2 epidemic_travel_danger = 10 - development_decline = -1.5 - } + prosperity_decline = -1.5 + } + county_modifier = { + control_baseline_add = -5 + } } 50 = { province_modifier = { - monthly_county_control_decline_add = -0.3 - development_decline = -2.5 + all_tax_mult = -0.25 + province_size_baseline_add = -40 + monthly_province_size_change_when_above_baseline_add = -3.5 + monthly_control_change_when_above_baseline_add = -0.3 + prosperity_decline = -2.5 supply_limit_mult = -0.1 - county_opinion_add = -3 + popular_opinion_add = -2 epidemic_travel_danger = 20 - } + } + county_modifier = { + control_baseline_add = -10 + } } 80 = { province_modifier = { - monthly_county_control_decline_add = -0.5 - development_decline = -4 + all_tax_mult = -0.5 + province_size_baseline_add = -60 + monthly_province_size_change_when_above_baseline_add = -5 + monthly_control_change_when_above_baseline_add = -0.5 + prosperity_decline = -4 supply_limit_mult = -0.2 - county_opinion_add = -5 + popular_opinion_add = -5 epidemic_travel_danger = 30 } + county_modifier = { + control_baseline_add = -15 + } } } @@ -2237,8 +2323,9 @@ dysentery = { on_province_infected = { county = { - apply_infection_development_loss = { BASE = 3 } + apply_infection_prosperity_loss = { BASE = 3 } } + apply_infection_trade_disruption = yes cant_touch_this_achievement_effect = yes } @@ -2318,7 +2405,7 @@ ergotism = { #dancing plague - not contagious triggered_desc = { trigger = { outbreak_province = { - county = { development_level <= 5 } + county = { prosperity_level <= 5 } } } desc = epidemic_realm_dancing_plague @@ -2326,7 +2413,7 @@ ergotism = { #dancing plague - not contagious triggered_desc = { trigger = { outbreak_province = { - county = { development_level <= 5 } + county = { prosperity_level <= 5 } } } desc = epidemic_culture_dancing_plague @@ -2334,7 +2421,7 @@ ergotism = { #dancing plague - not contagious triggered_desc = { trigger = { outbreak_province = { - county = { development_level <= 5 } + county = { prosperity_level <= 5 } } } desc = epidemic_location_dancing_plague @@ -2454,31 +2541,43 @@ ergotism = { #dancing plague - not contagious infection_levels = { 10 = { province_modifier = { - monthly_county_control_decline_add = -0.1 + all_tax_mult = -0.1 + monthly_control_change_when_above_baseline_add = -0.1 holding_build_speed = 0.5 #this is negative stationed_maa_toughness_mult = -0.1 supply_limit_mult = -0.1 #food related epidemic_travel_danger = 5 - } + } + county_modifier = { + control_baseline_add = -5 + } } 50 = { province_modifier = { - monthly_county_control_decline_add = -0.15 + all_tax_mult = -0.25 + monthly_control_change_when_above_baseline_add = -0.15 holding_build_speed = 0.75 stationed_maa_toughness_mult = -0.2 supply_limit_mult = -0.2 epidemic_travel_danger = 10 - } + } + county_modifier = { + control_baseline_add = -10 + } } 80 = { province_modifier = { - development_decline = -0.5 - monthly_county_control_decline_add = -0.15 + all_tax_mult = -0.5 + prosperity_decline = -0.5 + monthly_control_change_when_above_baseline_add = -0.15 holding_build_speed = 1 stationed_maa_toughness_mult = -1 supply_limit_mult = -0.3 epidemic_travel_danger = 15 } + county_modifier = { + control_baseline_add = -15 + } } } diff --git a/common/flavorization/01_domicile.txt b/common/flavorization/01_domicile.txt index 045ab51c2..61acef4b4 100644 --- a/common/flavorization/01_domicile.txt +++ b/common/flavorization/01_domicile.txt @@ -25,6 +25,28 @@ domicile_minority_community = { priority = 26 governments = { landless_minority_government } + flavourization_rules = { + top_liege = no + } +} + +domicile_merchant_company_merchant = { + type = domicile + domicile_type = merchant_company + priority = 26 + governments = { merchant_government } + + flavourization_rules = { + top_liege = no + } +} + +domicile_merchant_company_republic = { + type = domicile + domicile_type = merchant_company + priority = 26 + governments = { republic_government } + flavourization_rules = { top_liege = no } diff --git a/common/game_rules/00_game_rules.txt b/common/game_rules/00_game_rules.txt index 3da8fac43..17b1015ee 100644 --- a/common/game_rules/00_game_rules.txt +++ b/common/game_rules/00_game_rules.txt @@ -983,7 +983,7 @@ custom_duchies = { historicity titles } - default = on_custom_duchies + default = on_custom_duchies_player on_custom_duchies = {} diff --git a/common/governments/00_government_types.txt b/common/governments/00_government_types.txt index 7e94f850e..a9962d26f 100644 --- a/common/governments/00_government_types.txt +++ b/common/governments/00_government_types.txt @@ -239,7 +239,7 @@ feudal_government = { republic_government = { primary_holding = city_holding - valid_holdings = { castle_holding } + valid_holdings = { castle_holding temple_citadel_holding } required_county_holdings = { city_holding castle_holding church_holding } government_rules = { @@ -947,6 +947,10 @@ administrative_government = { value = administrative_house_power_score } + house_power = { + value = administrative_house_power_score + } + royal_court = any blocked_subject_courts = { meritocratic_government celestial_government japan_administrative_government administrative_government steppe_admin_government } @@ -1389,6 +1393,10 @@ celestial_government = { value = administrative_house_power_score } + house_power = { + value = administrative_house_power_score + } + royal_court = any blocked_subject_courts = { meritocratic_government celestial_government japan_administrative_government administrative_government steppe_admin_government } @@ -1720,6 +1728,10 @@ steppe_admin_government = { value = administrative_house_power_score } + house_power = { + value = administrative_house_power_score + } + royal_court = any blocked_subject_courts = { meritocratic_government celestial_government japan_administrative_government administrative_government steppe_admin_government } @@ -1872,6 +1884,10 @@ meritocratic_government = { # e.g. Korea, Dai Viet value = administrative_house_power_score } + house_power = { + value = administrative_house_power_score + } + royal_court = any blocked_subject_courts = { meritocratic_government celestial_government japan_administrative_government administrative_government steppe_admin_government } mechanic_type = administrative diff --git a/common/important_actions/tgp_actions.txt b/common/important_actions/tgp_actions.txt index 665146c22..279ed6c6a 100644 --- a/common/important_actions/tgp_actions.txt +++ b/common/important_actions/tgp_actions.txt @@ -112,6 +112,7 @@ action_hegemonic_tributary_has_low_subject_standing_tributary = { limit = { is_tributary = yes suzerain = { highest_held_title_tier = tier_hegemony } + subject_standing >= 0 subject_standing < exact_tribute_subject_standing_value } try_create_important_action = { @@ -164,6 +165,7 @@ action_hegemonic_tributary_has_low_subject_standing_suzerain = { limit = { highest_held_title_tier = tier_hegemony any_tributary = { + subject_standing >= 0 subject_standing < exact_tribute_subject_standing_value save_temporary_scope_as = target_tributary } @@ -1140,14 +1142,19 @@ action_start_great_project = { # Only non-important ones, Important GPs get thei root = { OR = { can_plan_great_project = great_project_type:minister_project_culture - can_plan_great_project = great_project_type:minister_project_development + can_plan_great_project = great_project_type:minister_project_prosperity can_plan_great_project = great_project_type:minister_project_establish_control + can_plan_great_project = great_project_type:minister_project_train_troops + can_plan_great_project = great_project_type:minister_project_conduct_census + can_plan_great_project = great_project_type:minister_compel_religious_uniformity can_plan_great_project = great_project_type:construct_great_barracks can_plan_great_project = great_project_type:strengthen_capital can_plan_great_project = great_project_type:great_wall can_plan_great_project = great_project_type:great_wall_extend_to_shanhai_pass can_plan_great_project = great_project_type:great_wall_extend_to_liaodong can_plan_great_project = great_project_type:grand_canals + can_plan_great_project = great_project_type:gdp_republic_civic_works + gdp_can_plan_great_plaza_project_trigger = yes } } } diff --git a/common/laws/00_realm_laws.txt b/common/laws/00_realm_laws.txt index 48af52517..a16205022 100644 --- a/common/laws/00_realm_laws.txt +++ b/common/laws/00_realm_laws.txt @@ -4,6 +4,7 @@ @company_purpose_cooldown_years = 5 @company_purpose_ai_will_do_malus_t3 = -30 @company_purpose_ai_will_do_malus_t2 = -20 +@company_purpose_ai_will_do_malus_t1 = -10 @company_purpose_ai_will_do_bonus_t3 = 30 @company_purpose_ai_will_do_bonus_t2 = 20 @company_purpose_ai_will_do_bonus_t1 = 10 @@ -26,16 +27,15 @@ @mandala_decree_piety_cost = 1000 @mandala_decree_prestige_cost = 500 - crown_authority_0 = { law_group_type = crown_authority index = 0 modifier = { belligerent_opinion = -10 - barons_and_minor_landholders_opinion = 20 - glory_hound_opinion = 10 - parochial_opinion = 10 + barons_and_minor_landholders_opinion = 10 + glory_hound_opinion = 5 + parochial_opinion = 5 courtly_opinion = 5 } flag = uses_crown_authority @@ -54,8 +54,13 @@ crown_authority_0 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } } + crown_authority_1 = { law_group_type = crown_authority index = 1 @@ -128,6 +133,10 @@ crown_authority_1 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = crown_authority_0 } @@ -136,6 +145,7 @@ crown_authority_1 = { } } + crown_authority_2 = { law_group_type = crown_authority index = 2 @@ -214,6 +224,10 @@ crown_authority_2 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = crown_authority_1 } @@ -222,6 +236,7 @@ crown_authority_2 = { } } + crown_authority_3 = { law_group_type = crown_authority index = 3 @@ -290,6 +305,10 @@ crown_authority_3 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } } @@ -298,10 +317,11 @@ tribal_authority_0 = { index = 0 modifier = { - glory_hound_opinion = 10 - parochial_opinion = 10 + glory_hound_opinion = 5 + parochial_opinion = 5 courtly_opinion = 5 belligerent_opinion = -15 + character_capital_popular_opinion_add = 20 } flag = uses_tribal_authority flag = imprisonment_toggle_enable @@ -314,8 +334,13 @@ tribal_authority_0 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } } + tribal_authority_1 = { law_group_type = tribal_authority index = 1 @@ -326,6 +351,7 @@ tribal_authority_1 = { courtly_opinion = -5 minority_opinion = -10 belligerent_opinion = 5 + character_capital_popular_opinion_add = -10 } flag = can_have_tributaries flag = can_change_succession_laws @@ -380,6 +406,10 @@ tribal_authority_1 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = tribal_authority_0 } @@ -388,6 +418,7 @@ tribal_authority_1 = { } } + tribal_authority_2 = { law_group_type = tribal_authority index = 2 @@ -399,6 +430,7 @@ tribal_authority_2 = { zealot_opinion = -10 minority_opinion = -10 belligerent_opinion = 15 + character_capital_popular_opinion_add = -10 } flag = title_revocation_allowed flag = vassal_retraction_allowed @@ -411,7 +443,7 @@ tribal_authority_2 = { limit = { NOT = { culture = { - has_cultural_parameter = forming_confederations_is_easier + has_cultural_parameter = confederation_tribal_authority } } } @@ -468,6 +500,10 @@ tribal_authority_2 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = tribal_authority_1 } @@ -476,6 +512,7 @@ tribal_authority_2 = { } } + tribal_authority_3 = { law_group_type = tribal_authority index = 3 @@ -487,6 +524,7 @@ tribal_authority_3 = { zealot_opinion = -20 minority_opinion = -30 belligerent_opinion = 20 + character_capital_popular_opinion_add = -10 } flag = max_authority_level flag = authority_level_3 @@ -499,7 +537,7 @@ tribal_authority_3 = { limit = { NOT = { culture = { - has_cultural_parameter = forming_confederations_is_easier + has_cultural_parameter = confederation_tribal_authority } } } @@ -537,6 +575,10 @@ tribal_authority_3 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = tribal_authority_2 } @@ -571,6 +613,7 @@ church_authority_0 = { } } + church_authority_1 = { law_group_type = church_authority index = 1 @@ -649,6 +692,7 @@ church_authority_1 = { } } + church_authority_2 = { law_group_type = church_authority index = 2 @@ -733,6 +777,7 @@ church_authority_2 = { } } + church_authority_3 = { law_group_type = church_authority index = 3 @@ -839,9 +884,14 @@ camp_purpose_wanderers = { } } + requires_approve = { + always = no + } + ai_will_do = { value = 0 } } + camp_purpose_mercenaries = { law_group_type = camp_purpose index = 1 @@ -879,7 +929,7 @@ camp_purpose_mercenaries = { modifier = { men_at_arms_cap = 1 embarkation_cost_mult = -0.5 - knight_limit = 8 + knight_limit = 4 } on_pass = { @@ -895,6 +945,10 @@ camp_purpose_mercenaries = { } } + requires_approve = { + always = no + } + ai_will_do = { # If we've picked a purpose, don't change it. if = { @@ -962,6 +1016,7 @@ camp_purpose_mercenaries = { } } + camp_purpose_scholars = { law_group_type = camp_purpose index = 2 @@ -1015,6 +1070,10 @@ camp_purpose_scholars = { } } + requires_approve = { + always = no + } + ai_will_do = { # If we've picked a purpose, don't change it. if = { @@ -1084,6 +1143,7 @@ camp_purpose_scholars = { } } + camp_purpose_explorers = { law_group_type = camp_purpose index = 3 @@ -1111,7 +1171,22 @@ camp_purpose_explorers = { flag = unlocks_camp_fire_local_hangers_on flag = unlocks_camp_perimeter_extra_watch - can_keep = { realm_law_use_camp_purpose = yes } + potential = { + has_ep3_dlc_trigger = yes + } + + can_keep = { + realm_law_use_camp_purpose = yes + has_ep3_dlc_trigger = yes + } + + can_have = { + has_ep3_dlc_trigger = yes + } + + can_pass = { + has_ep3_dlc_trigger = yes + } pass_cost = { prestige = { @@ -1137,6 +1212,10 @@ camp_purpose_explorers = { } } + requires_approve = { + always = no + } + ai_will_do = { # If we've picked a purpose, don't change it. if = { @@ -1211,6 +1290,7 @@ camp_purpose_explorers = { } } + camp_purpose_brigands = { law_group_type = camp_purpose index = 4 @@ -1235,7 +1315,22 @@ camp_purpose_brigands = { flag = unlocks_camp_fire_juicy_rumors flag = unlocks_proving_grounds_the_stick_game - can_keep = { realm_law_use_camp_purpose = yes } + potential = { + has_ep3_dlc_trigger = yes + } + + can_keep = { + realm_law_use_camp_purpose = yes + has_ep3_dlc_trigger = yes + } + + can_have = { + has_ep3_dlc_trigger = yes + } + + can_pass = { + has_ep3_dlc_trigger = yes + } pass_cost = { prestige = { @@ -1266,6 +1361,10 @@ camp_purpose_brigands = { knight_limit = 3 } + requires_approve = { + always = no + } + ai_will_do = { # If we've picked a purpose, don't change it. if = { @@ -1369,6 +1468,7 @@ camp_purpose_brigands = { } } + camp_purpose_legitimists = { law_group_type = camp_purpose index = 5 @@ -1390,11 +1490,24 @@ camp_purpose_legitimists = { flag = unlocks_proving_grounds_bodyguard_drills flag = unlocks_proving_grounds_lockwagon - can_keep = { - realm_law_use_camp_purpose = yes + potential = { + has_ep3_dlc_trigger = yes + } + + can_keep = { + realm_law_use_camp_purpose = yes + has_ep3_dlc_trigger = yes ep3_can_have_legitimists_camp_purpose_trigger = yes } + can_have = { + has_ep3_dlc_trigger = yes + } + + can_pass = { + has_ep3_dlc_trigger = yes + } + pass_cost = { prestige = { if = { @@ -1424,6 +1537,10 @@ camp_purpose_legitimists = { knight_limit = 8 } + requires_approve = { + always = no + } + ai_will_do = { # Weight up legitimists inherently. value = 100 @@ -1488,7 +1605,7 @@ imperial_bureaucracy_0 = { modifier = { belligerent_opinion = -10 - barons_and_minor_landholders_opinion = 20 + barons_and_minor_landholders_opinion = 10 glory_hound_opinion = 10 parochial_opinion = 10 courtly_opinion = 5 @@ -1524,8 +1641,14 @@ imperial_bureaucracy_0 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } + } + imperial_bureaucracy_1 = { law_group_type = imperial_bureaucracy index = 1 @@ -1613,6 +1736,10 @@ imperial_bureaucracy_1 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = imperial_bureaucracy_0 } @@ -1621,6 +1748,7 @@ imperial_bureaucracy_1 = { } } + imperial_bureaucracy_2 = { law_group_type = imperial_bureaucracy index = 2 @@ -1633,7 +1761,6 @@ imperial_bureaucracy_2 = { courtly_opinion = -5 zealot_opinion = -10 minority_opinion = -10 - republic_government_tax_contribution_add = 0.05 vassal_limit = 100 } flag = vassal_refusal_is_treason @@ -1710,6 +1837,10 @@ imperial_bureaucracy_2 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = imperial_bureaucracy_1 } @@ -1718,6 +1849,7 @@ imperial_bureaucracy_2 = { } } + imperial_bureaucracy_3 = { law_group_type = imperial_bureaucracy index = 3 @@ -1730,7 +1862,6 @@ imperial_bureaucracy_3 = { 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 @@ -1796,6 +1927,10 @@ imperial_bureaucracy_3 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } } @@ -1833,8 +1968,13 @@ nomadic_authority_1 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } } + nomadic_authority_2 = { law_group_type = nomadic_authority index = 1 @@ -1913,6 +2053,10 @@ nomadic_authority_2 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = nomadic_authority_1 } @@ -1921,6 +2065,7 @@ nomadic_authority_2 = { } } + nomadic_authority_3 = { law_group_type = nomadic_authority index = 2 @@ -1950,7 +2095,7 @@ nomadic_authority_3 = { limit = { NOT = { culture = { - has_cultural_parameter = forming_confederations_is_easier + has_cultural_parameter = confederation_tribal_authority } } } @@ -2009,6 +2154,10 @@ nomadic_authority_3 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = nomadic_authority_2 } @@ -2017,6 +2166,7 @@ nomadic_authority_3 = { } } + nomadic_authority_4 = { law_group_type = nomadic_authority index = 3 @@ -2044,7 +2194,7 @@ nomadic_authority_4 = { limit = { NOT = { culture = { - has_cultural_parameter = forming_confederations_is_easier + has_cultural_parameter = confederation_tribal_authority } } } @@ -2103,6 +2253,10 @@ nomadic_authority_4 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = nomadic_authority_3 } @@ -2111,6 +2265,7 @@ nomadic_authority_4 = { } } + nomadic_authority_5 = { law_group_type = nomadic_authority index = 4 @@ -2138,7 +2293,7 @@ nomadic_authority_5 = { limit = { NOT = { culture = { - has_cultural_parameter = forming_confederations_is_easier + has_cultural_parameter = confederation_tribal_authority } } } @@ -2210,6 +2365,10 @@ nomadic_authority_5 = { play_sound_effect = "event:/DLC/CE2/UI/Notifications/ce2_ui_notifications_nomadicAuthority_wolf" } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = nomadic_authority_4 } @@ -2233,7 +2392,6 @@ celestial_bureaucracy_0 = { 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 @@ -2266,8 +2424,13 @@ celestial_bureaucracy_0 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } } + celestial_bureaucracy_1 = { law_group_type = celestial_bureaucracy index = 1 @@ -2282,7 +2445,6 @@ celestial_bureaucracy_1 = { 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 @@ -2359,6 +2521,10 @@ celestial_bureaucracy_1 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = celestial_bureaucracy_0 } @@ -2367,6 +2533,7 @@ celestial_bureaucracy_1 = { } } + celestial_bureaucracy_2 = { law_group_type = celestial_bureaucracy index = 2 @@ -2381,7 +2548,6 @@ celestial_bureaucracy_2 = { 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 @@ -2458,6 +2624,10 @@ celestial_bureaucracy_2 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = celestial_bureaucracy_1 } @@ -2466,6 +2636,7 @@ celestial_bureaucracy_2 = { } } + celestial_bureaucracy_3 = { law_group_type = celestial_bureaucracy index = 3 @@ -2480,7 +2651,6 @@ celestial_bureaucracy_3 = { 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 @@ -2557,6 +2727,10 @@ celestial_bureaucracy_3 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } } @@ -2582,11 +2756,16 @@ mandala_decree_none = { on_pass = { } + requires_approve = { + always = no + } + ai_will_do = { value = 0 } } + mandala_decree_prosperity = { law_group_type = mandala_decree index = 1 @@ -2594,7 +2773,7 @@ mandala_decree_prosperity = { modifier = { men_at_arms_maintenance = 0.25 levy_size = -0.25 - tributary_opinion = 15 + tributary_opinion = 10 } #Standard laws flag = can_have_tributaries @@ -2634,6 +2813,10 @@ mandala_decree_prosperity = { } } + requires_approve = { + always = no + } + ai_will_do = { value = 1 #Traits @@ -2652,6 +2835,7 @@ mandala_decree_prosperity = { } } + mandala_decree_expansion = { law_group_type = mandala_decree index = 2 @@ -2659,7 +2843,7 @@ mandala_decree_expansion = { modifier = { vassal_levy_contribution_mult = 0.25 independent_ruler_opinion = -25 - tributary_opinion = 25 + tributary_opinion = 15 } #Standard laws flag = can_have_tributaries @@ -2699,6 +2883,10 @@ mandala_decree_expansion = { } } + requires_approve = { + always = no + } + ai_will_do = { value = 1 #Traits @@ -2717,6 +2905,7 @@ mandala_decree_expansion = { } } + mandala_decree_reverence = { law_group_type = mandala_decree index = 3 @@ -2762,6 +2951,10 @@ mandala_decree_reverence = { } } + requires_approve = { + always = no + } + ai_will_do = { value = 1 #Traits @@ -2787,7 +2980,7 @@ meritocratic_bureaucracy_0 = { modifier = { belligerent_opinion = -10 - barons_and_minor_landholders_opinion = 20 + barons_and_minor_landholders_opinion = 10 glory_hound_opinion = 10 parochial_opinion = 10 courtly_opinion = 5 @@ -2823,8 +3016,13 @@ meritocratic_bureaucracy_0 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } } + meritocratic_bureaucracy_1 = { law_group_type = meritocratic_bureaucracy index = 1 @@ -2914,6 +3112,10 @@ meritocratic_bureaucracy_1 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = meritocratic_bureaucracy_0 } @@ -2922,6 +3124,7 @@ meritocratic_bureaucracy_1 = { } } + meritocratic_bureaucracy_2 = { law_group_type = meritocratic_bureaucracy index = 2 @@ -2936,7 +3139,6 @@ meritocratic_bureaucracy_2 = { minority_opinion = -10 meritocratic_government_tax_contribution_add = 0.05 steppe_admin_government_tax_contribution_add = 0.05 - republic_government_tax_contribution_add = 0.05 } flag = uses_meritocratic_bureaucracy flag = vassal_refusal_is_treason @@ -3024,6 +3226,10 @@ meritocratic_bureaucracy_2 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = meritocratic_bureaucracy_1 } @@ -3032,6 +3238,7 @@ meritocratic_bureaucracy_2 = { } } + meritocratic_bureaucracy_3 = { law_group_type = meritocratic_bureaucracy index = 3 @@ -3046,7 +3253,6 @@ meritocratic_bureaucracy_3 = { minority_opinion = -30 meritocratic_government_tax_contribution_add = 0.1 steppe_admin_government_tax_contribution_add = 0.1 - republic_government_tax_contribution_add = 0.05 } flag = uses_meritocratic_bureaucracy flag = vassal_all_wars_banned_permanent @@ -3112,6 +3318,10 @@ meritocratic_bureaucracy_3 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } } @@ -3121,7 +3331,7 @@ japanese_bureaucracy_0 = { modifier = { belligerent_opinion = -10 - barons_and_minor_landholders_opinion = 20 + barons_and_minor_landholders_opinion = 10 glory_hound_opinion = 10 parochial_opinion = 10 courtly_opinion = 5 @@ -3157,8 +3367,13 @@ japanese_bureaucracy_0 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } + + requires_approve = { + always = no + } } + japanese_bureaucracy_1 = { law_group_type = japanese_bureaucracy index = 1 @@ -3246,6 +3461,10 @@ japanese_bureaucracy_1 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = japanese_bureaucracy_0 } @@ -3254,6 +3473,7 @@ japanese_bureaucracy_1 = { } } + japanese_bureaucracy_2 = { law_group_type = japanese_bureaucracy index = 2 @@ -3268,7 +3488,6 @@ japanese_bureaucracy_2 = { minority_opinion = -10 vassal_tax_contribution_mult = 0.1 vassal_levy_contribution_mult = 0.1 - republic_government_tax_contribution_add = 0.05 } flag = uses_japanese_bureaucracy flag = vassal_refusal_is_treason @@ -3357,6 +3576,10 @@ japanese_bureaucracy_2 = { remove_law_related_modifiers_effect = yes } + requires_approve = { + always = no + } + ai_will_do = { if = { limit = { has_realm_law = japanese_bureaucracy_1 } @@ -3365,6 +3588,7 @@ japanese_bureaucracy_2 = { } } + japanese_bureaucracy_3 = { law_group_type = japanese_bureaucracy index = 3 @@ -3379,7 +3603,6 @@ japanese_bureaucracy_3 = { minority_opinion = -30 vassal_tax_contribution_mult = 0.15 vassal_levy_contribution_mult = 0.15 - republic_government_tax_contribution_add = 0.05 } flag = uses_japanese_bureaucracy flag = max_authority_level @@ -3446,127 +3669,306 @@ japanese_bureaucracy_3 = { # Remove modifiers. remove_law_related_modifiers_effect = yes } -} -uncrowned = { - law_group_type = crowned_laws - index = 0 - - 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 = { - law_group_type = crowned_laws - index = 1 - - 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 = { - law_group_type = crowned_laws - index = 2 - - 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 = { + requires_approve = { always = no } - potential = { - coronation_trigger = yes - NOT = { - has_game_rule = coronation_laws_off +} + + +company_size_small = { + law_group_type = company_size + index = 0 + + pass_phrase = company_size_pass_phrase + confirmation_title = company_size_confirmation_title + confirmation_button_text = company_size_confirmation_button_text + + can_pass = { + NOR = { + has_realm_law = company_size_medium + has_realm_law = company_size_large + has_realm_law = company_size_huge } } + + can_keep = { realm_law_use_company_purpose = yes } + + modifier = { + } + + on_pass = { + # Remove modifiers. + remove_law_related_modifiers_effect = yes + } + + requires_approve = { always = no } +} + + +company_size_medium = { + law_group_type = company_size + index = 1 + + pass_phrase = company_size_pass_phrase + confirmation_title = company_size_confirmation_title + confirmation_button_text = company_size_confirmation_button_text + + can_pass = { + has_realm_law = company_size_small + custom_description = { + subject = root + text = "has_company_size_cooldown" + NAND = { + has_variable = company_size_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + domicile ?= { + domicile_uses_acumen = yes + acumen >= define:NDomicile|MERCHANT_ACUMEN_LEVEL_2_THRESHOLD + } + } + + can_keep = { realm_law_use_company_purpose = yes } + + pass_cost = { + prestige = { + if = { + limit = { + is_ai = no + has_realm_law = company_size_small + } + add = @company_size_prestige_cost + } + } + } + + modifier = { + trade_competitiveness_add = 20 + trade_route_length_add = 4 + monthly_dynasty_prestige = 0.25 + } + + on_pass = { + set_variable = { + name = company_size_cooldown + years = @company_size_cooldown_years + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + play_sound_effect = "event:/DLC/EP5/SFX/Stingers/ep5_mx_sting_company_size_increase" + } + + requires_approve = { always = no } + + ai_will_do = { + if = { + limit = { has_realm_law = company_size_small } + value = 1 + } + } +} + + +company_size_large = { + law_group_type = company_size + index = 2 + + pass_phrase = company_size_pass_phrase + confirmation_title = company_size_confirmation_title + confirmation_button_text = company_size_confirmation_button_text + + can_pass = { + has_realm_law = company_size_medium + custom_description = { + subject = root + text = "has_company_size_cooldown" + NAND = { + has_variable = company_size_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + domicile ?= { + domicile_uses_acumen = yes + acumen >= define:NDomicile|MERCHANT_ACUMEN_LEVEL_3_THRESHOLD + } + } + + can_keep = { realm_law_use_company_purpose = yes } + + pass_cost = { + prestige = { + if = { + limit = { + is_ai = no + has_realm_law = company_size_medium + } + add = @company_size_prestige_cost + } + } + } + + modifier = { + trade_competitiveness_add = 30 + trade_route_length_add = 8 + monthly_dynasty_prestige = 0.5 + } + + on_pass = { + set_variable = { + name = company_size_cooldown + years = @company_size_cooldown_years + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + play_sound_effect = "event:/DLC/EP5/SFX/Stingers/ep5_mx_sting_company_size_increase" + } + + requires_approve = { always = no } + + ai_will_do = { + if = { + limit = { has_realm_law = company_size_medium } + value = 1 + } + } +} + + +company_size_huge = { + law_group_type = company_size + index = 3 + + pass_phrase = company_size_pass_phrase + confirmation_title = company_size_confirmation_title + confirmation_button_text = company_size_confirmation_button_text + + can_pass = { + has_realm_law = company_size_large + custom_description = { + subject = root + text = "has_company_size_cooldown" + NAND = { + has_variable = company_size_cooldown + NOT = { + culture = { has_innovation = innovation_all_things } + } + } + } + domicile ?= { + domicile_uses_acumen = yes + acumen >= define:NDomicile|MERCHANT_ACUMEN_LEVEL_4_THRESHOLD + } + } + + can_keep = { realm_law_use_company_purpose = yes } + + pass_cost = { + prestige = { + if = { + limit = { + is_ai = no + has_realm_law = company_size_large + } + add = @company_size_prestige_cost + } + } + } + + modifier = { + trade_competitiveness_add = 40 + trade_route_length_add = 10 + monthly_dynasty_prestige = 0.75 + } + + on_pass = { + set_variable = { + name = company_size_cooldown + years = @company_size_cooldown_years + } + # Remove modifiers. + remove_law_related_modifiers_effect = yes + play_sound_effect = "event:/DLC/EP5/SFX/Stingers/ep5_mx_sting_company_size_increase" + } + + requires_approve = { always = no } + + ai_will_do = { + if = { + limit = { has_realm_law = company_size_large } + value = 1 + } + } +} + + +company_purpose_family = { + law_group_type = company_purpose + index = 0 + + pass_phrase = company_purpose_pass_phrase + confirmation_title = company_purpose_pass_phrase + confirmation_button_text = company_purpose_confirmation_button_text + + flag = uses_company_purpose + flag = can_change_succession_laws + flag = can_change_purpose_for_free + + can_keep = { realm_law_use_company_purpose = yes } + + can_pass = { + custom_description = { + subject = root + text = has_company_purpose_cooldown + NOT = { has_variable = company_purpose_cooldown } + } + custom_tooltip = { + text = company_purpose_child_blocker_tt + is_adult = yes + } + } + + pass_cost = { + prestige = { + if = { + limit = { + NOR = { + has_realm_law_flag = can_change_purpose_for_free + has_character_flag = free_starting_merchant_purpose_change + } + } + value = @company_purpose_prestige_cost + } + } + } + + modifier = { + close_relative_opinion = 10 + suzerain_opinion = 30 + trade_expertise_growth_mult = 0.1 + } + + on_pass = { + set_variable = { + name = company_purpose_cooldown + years = @company_purpose_cooldown_years + } + remove_character_flag = free_starting_merchant_purpose_change + # Remove modifiers. + remove_law_related_modifiers_effect = yes + merchant_company_law_purpose_effect = yes + } + + requires_approve = { + always = no + } + + ai_will_do = { value = 0 } } @@ -3695,6 +4097,141 @@ company_purpose_artisan = { } +company_purpose_creditor = { + law_group_type = company_purpose + index = 2 + + pass_phrase = company_purpose_pass_phrase + confirmation_title = company_purpose_pass_phrase + confirmation_button_text = company_purpose_confirmation_button_text + + flag = uses_company_purpose + flag = can_change_succession_laws + flag = intrigue_company_purpose + flag = unlock_military_merchant_patron_requests + + # Seize Land CB + flag = unlock_seize_realm_county_cb + + can_keep = { realm_law_use_company_purpose = yes } + + can_pass = { + custom_description = { + subject = root + text = has_company_purpose_cooldown + NOT = { has_variable = company_purpose_cooldown } + } + custom_tooltip = { + text = company_purpose_child_blocker_tt + is_adult = yes + } + } + + pass_cost = { + prestige = { + if = { + limit = { + NOR = { + has_realm_law_flag = can_change_purpose_for_free + has_character_flag = free_starting_merchant_purpose_change + } + } + value = @company_purpose_prestige_cost + } + } + } + + modifier = { + trade_category_precious_metals_xp_gain_mult = 0.2 + trade_category_jewelry_materials_xp_gain_mult = 0.2 + trade_category_base_metals_xp_gain_mult = 0.2 + trade_category_cereals_xp_gain_mult = 0.2 + trade_category_meat_xp_gain_mult = 0.2 + trade_category_carpentry_supplies_xp_gain_mult = 0.2 + trait_track_creditor_xp_gain_mult = 0.15 + } + + on_pass = { + set_variable = { + name = company_purpose_cooldown + years = @company_purpose_cooldown_years + } + remove_character_flag = free_starting_merchant_purpose_change + # Remove modifiers. + remove_law_related_modifiers_effect = yes + merchant_company_law_purpose_effect = yes + } + + requires_approve = { + always = no + } + + ai_will_do = { + # If we've picked a purpose, don't change it. + if = { + limit = { + NOT = { has_realm_law = company_purpose_creditor } + } + value = 0 + } + else = { + # Traits. + ## Education + if = { + limit = { has_trait = education_intrigue } + add = @company_purpose_ai_will_do_bonus_t3 + } + ## Personality. + ### Deceitful. + if = { + limit = { has_trait = deceitful } + add = @company_purpose_ai_will_do_bonus_t3 + } + ### Honest. + if = { + limit = { has_trait = honest } + add = @company_purpose_ai_will_do_malus_t3 + } + ### Arbitrary. + if = { + limit = { has_trait = arbitrary } + add = @company_purpose_ai_will_do_bonus_t3 + } + ### Just, + if = { + limit = { has_trait = just } + add = @company_purpose_ai_will_do_malus_t3 + } + ### Generous. + if = { + limit = { has_trait = generous } + add = @company_purpose_ai_will_do_malus_t2 + } + ### Arrogant. + if = { + limit = { has_trait = arrogant } + add = @company_purpose_ai_will_do_bonus_t2 + } + ### Wrathful. + if = { + limit = { has_trait = wrathful } + add = @company_purpose_ai_will_do_bonus_t1 + } + ### Callous. + if = { + limit = { has_trait = callous } + add = @company_purpose_ai_will_do_bonus_t2 + } + ### Compassionate. + if = { + limit = { has_trait = compassionate } + add = @company_purpose_ai_will_do_malus_t2 + } + } + } +} + + company_purpose_caravaneer = { law_group_type = company_purpose index = 3 @@ -3833,434 +4370,3 @@ company_purpose_caravaneer = { } } } - - -company_purpose_creditor = { - law_group_type = company_purpose - index = 2 - - pass_phrase = company_purpose_pass_phrase - confirmation_title = company_purpose_pass_phrase - confirmation_button_text = company_purpose_confirmation_button_text - - flag = uses_company_purpose - flag = can_change_succession_laws - flag = intrigue_company_purpose - flag = unlock_military_merchant_patron_requests - - # Seize Land CB - flag = unlock_seize_realm_county_cb - - can_keep = { realm_law_use_company_purpose = yes } - - can_pass = { - custom_description = { - subject = root - text = has_company_purpose_cooldown - NOT = { has_variable = company_purpose_cooldown } - } - custom_tooltip = { - text = company_purpose_child_blocker_tt - is_adult = yes - } - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law_flag = can_change_purpose_for_free - has_character_flag = free_starting_merchant_purpose_change - } - } - value = @company_purpose_prestige_cost - } - } - } - - modifier = { - trade_category_precious_metals_xp_gain_mult = 0.2 - trade_category_jewelry_materials_xp_gain_mult = 0.2 - trade_category_base_metals_xp_gain_mult = 0.2 - trade_category_cereals_xp_gain_mult = 0.2 - trade_category_meat_xp_gain_mult = 0.2 - trade_category_carpentry_supplies_xp_gain_mult = 0.2 - trait_track_creditor_xp_gain_mult = 0.15 - } - - on_pass = { - set_variable = { - name = company_purpose_cooldown - years = @company_purpose_cooldown_years - } - remove_character_flag = free_starting_merchant_purpose_change - # Remove modifiers. - remove_law_related_modifiers_effect = yes - merchant_company_law_purpose_effect = yes - } - - requires_approve = { - always = no - } - - ai_will_do = { - # If we've picked a purpose, don't change it. - if = { - limit = { - NOT = { has_realm_law = company_purpose_creditor } - } - value = 0 - } - else = { - # Traits. - ## Education - if = { - limit = { has_trait = education_intrigue } - add = @company_purpose_ai_will_do_bonus_t3 - } - ## Personality. - ### Deceitful. - if = { - limit = { has_trait = deceitful } - add = @company_purpose_ai_will_do_bonus_t3 - } - ### Honest. - if = { - limit = { has_trait = honest } - add = @company_purpose_ai_will_do_malus_t3 - } - ### Arbitrary. - if = { - limit = { has_trait = arbitrary } - add = @company_purpose_ai_will_do_bonus_t3 - } - ### Just, - if = { - limit = { has_trait = just } - add = @company_purpose_ai_will_do_malus_t3 - } - ### Generous. - if = { - limit = { has_trait = generous } - add = @company_purpose_ai_will_do_malus_t2 - } - ### Arrogant. - if = { - limit = { has_trait = arrogant } - add = @company_purpose_ai_will_do_bonus_t2 - } - ### Wrathful. - if = { - limit = { has_trait = wrathful } - add = @company_purpose_ai_will_do_bonus_t1 - } - ### Callous. - if = { - limit = { has_trait = callous } - add = @company_purpose_ai_will_do_bonus_t2 - } - ### Compassionate. - if = { - limit = { has_trait = compassionate } - add = @company_purpose_ai_will_do_malus_t2 - } - } - } -} - - -company_purpose_family = { - law_group_type = company_purpose - index = 0 - - pass_phrase = company_purpose_pass_phrase - confirmation_title = company_purpose_pass_phrase - confirmation_button_text = company_purpose_confirmation_button_text - - flag = uses_company_purpose - flag = can_change_succession_laws - flag = can_change_purpose_for_free - - can_keep = { realm_law_use_company_purpose = yes } - - can_pass = { - custom_description = { - subject = root - text = has_company_purpose_cooldown - NOT = { has_variable = company_purpose_cooldown } - } - custom_tooltip = { - text = company_purpose_child_blocker_tt - is_adult = yes - } - } - - pass_cost = { - prestige = { - if = { - limit = { - NOR = { - has_realm_law_flag = can_change_purpose_for_free - has_character_flag = free_starting_merchant_purpose_change - } - } - value = @company_purpose_prestige_cost - } - } - } - - modifier = { - close_relative_opinion = 10 - suzerain_opinion = 30 - trade_expertise_growth_mult = 0.1 - } - - on_pass = { - set_variable = { - name = company_purpose_cooldown - years = @company_purpose_cooldown_years - } - remove_character_flag = free_starting_merchant_purpose_change - # Remove modifiers. - remove_law_related_modifiers_effect = yes - merchant_company_law_purpose_effect = yes - } - - requires_approve = { - always = no - } - - ai_will_do = { value = 0 } -} - - -company_size_huge = { - law_group_type = company_size - index = 3 - - pass_phrase = company_size_pass_phrase - confirmation_title = company_size_confirmation_title - confirmation_button_text = company_size_confirmation_button_text - - can_pass = { - has_realm_law = company_size_large - custom_description = { - subject = root - text = "has_company_size_cooldown" - NAND = { - has_variable = company_size_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - domicile ?= { - domicile_uses_acumen = yes - acumen >= define:NDomicile|MERCHANT_ACUMEN_LEVEL_4_THRESHOLD - } - } - - can_keep = { realm_law_use_company_purpose = yes } - - pass_cost = { - prestige = { - if = { - limit = { - is_ai = no - has_realm_law = company_size_large - } - add = @company_size_prestige_cost - } - } - } - - modifier = { - trade_competitiveness_add = 40 - trade_route_length_add = 10 - monthly_dynasty_prestige = 0.75 - } - - on_pass = { - set_variable = { - name = company_size_cooldown - years = @company_size_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - play_sound_effect = "event:/DLC/EP5/SFX/Stingers/ep5_mx_sting_company_size_increase" - } - - requires_approve = { always = no } - - ai_will_do = { - if = { - limit = { has_realm_law = company_size_large } - value = 1 - } - } -} - - -company_size_large = { - law_group_type = company_size - index = 2 - - pass_phrase = company_size_pass_phrase - confirmation_title = company_size_confirmation_title - confirmation_button_text = company_size_confirmation_button_text - - can_pass = { - has_realm_law = company_size_medium - custom_description = { - subject = root - text = "has_company_size_cooldown" - NAND = { - has_variable = company_size_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - domicile ?= { - domicile_uses_acumen = yes - acumen >= define:NDomicile|MERCHANT_ACUMEN_LEVEL_3_THRESHOLD - } - } - - can_keep = { realm_law_use_company_purpose = yes } - - pass_cost = { - prestige = { - if = { - limit = { - is_ai = no - has_realm_law = company_size_medium - } - add = @company_size_prestige_cost - } - } - } - - modifier = { - trade_competitiveness_add = 30 - trade_route_length_add = 8 - monthly_dynasty_prestige = 0.5 - } - - on_pass = { - set_variable = { - name = company_size_cooldown - years = @company_size_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - play_sound_effect = "event:/DLC/EP5/SFX/Stingers/ep5_mx_sting_company_size_increase" - } - - requires_approve = { always = no } - - ai_will_do = { - if = { - limit = { has_realm_law = company_size_medium } - value = 1 - } - } -} - - -company_size_medium = { - law_group_type = company_size - index = 1 - - pass_phrase = company_size_pass_phrase - confirmation_title = company_size_confirmation_title - confirmation_button_text = company_size_confirmation_button_text - - can_pass = { - has_realm_law = company_size_small - custom_description = { - subject = root - text = "has_company_size_cooldown" - NAND = { - has_variable = company_size_cooldown - NOT = { - culture = { has_innovation = innovation_all_things } - } - } - } - domicile ?= { - domicile_uses_acumen = yes - acumen >= define:NDomicile|MERCHANT_ACUMEN_LEVEL_2_THRESHOLD - } - } - - can_keep = { realm_law_use_company_purpose = yes } - - pass_cost = { - prestige = { - if = { - limit = { - is_ai = no - has_realm_law = company_size_small - } - add = @company_size_prestige_cost - } - } - } - - modifier = { - trade_competitiveness_add = 20 - trade_route_length_add = 4 - monthly_dynasty_prestige = 0.25 - } - - on_pass = { - set_variable = { - name = company_size_cooldown - years = @company_size_cooldown_years - } - # Remove modifiers. - remove_law_related_modifiers_effect = yes - play_sound_effect = "event:/DLC/EP5/SFX/Stingers/ep5_mx_sting_company_size_increase" - } - - requires_approve = { always = no } - - ai_will_do = { - if = { - limit = { has_realm_law = company_size_small } - value = 1 - } - } -} - - -company_size_small = { - law_group_type = company_size - index = 0 - - pass_phrase = company_size_pass_phrase - confirmation_title = company_size_confirmation_title - confirmation_button_text = company_size_confirmation_button_text - - can_pass = { - NOR = { - has_realm_law = company_size_medium - has_realm_law = company_size_large - has_realm_law = company_size_huge - } - } - - can_keep = { realm_law_use_company_purpose = yes } - - modifier = { - } - - on_pass = { - # Remove modifiers. - remove_law_related_modifiers_effect = yes - } - - requires_approve = { always = no } -} diff --git a/common/laws/00_succession_laws.txt b/common/laws/00_succession_laws.txt index ef7f00f0f..5f32139b1 100644 --- a/common/laws/00_succession_laws.txt +++ b/common/laws/00_succession_laws.txt @@ -22,6 +22,10 @@ } } can_have = { + NOR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + } can_have_confederate_partition_succession_law_trigger = yes trigger_if = { limit = { @@ -58,7 +62,7 @@ } flag = partition_succession_law modifier = { - glory_hound_opinion = 10 + glory_hound_opinion = 5 parochial_opinion = 5 belligerent_opinion = -10 dynasty_house_opinion = 5 @@ -77,10 +81,14 @@ government_has_flag = government_is_celestial government_has_flag = government_is_meritocratic government_has_flag = government_is_steppe_admin + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant } } } + partition_succession_law = { law_group_type = succession_order_laws index = 1 @@ -110,17 +118,20 @@ partition_succession_law = { } } can_have = { - # it's failure only block, workaround for showing correct toolip. - trigger_if = { - limit = { - exists = primary_title + NOR = { + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + } + OR = { + can_have_partition_succession_law_trigger = yes + trigger_if = { + limit = { + exists = primary_title + } is_confederation_member = yes } is_confederation_member = yes } - trigger_else = { - can_have_partition_succession_law_trigger = yes - } } should_start_with = { NOR = { @@ -145,7 +156,7 @@ partition_succession_law = { } flag = partition_succession_law modifier = { - glory_hound_opinion = 10 + glory_hound_opinion = 5 parochial_opinion = 5 belligerent_opinion = -10 player_heir_opinion = 10 @@ -171,10 +182,14 @@ partition_succession_law = { government_has_flag = government_is_celestial government_has_flag = government_is_meritocratic government_has_flag = government_is_steppe_admin + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant } } } + high_partition_succession_law = { law_group_type = succession_order_laws index = 2 @@ -186,7 +201,11 @@ high_partition_succession_law = { can_change_partition_succession_law_trigger = yes } can_have = { - NOT = { government_has_flag = government_is_nomadic } + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + } can_have_high_partition_succession_law_trigger = yes } should_start_with = { @@ -242,10 +261,14 @@ high_partition_succession_law = { government_has_flag = government_is_celestial government_has_flag = government_is_meritocratic government_has_flag = government_is_steppe_admin + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant } } } + single_heir_succession_law = { law_group_type = succession_order_laws index = 3 @@ -266,8 +289,15 @@ single_heir_succession_law = { 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 + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + } + OR = { + can_have_single_heir_succession_law_trigger = yes + historical_succession_access_single_heir_succession_law_trigger = yes + } } can_pass = { can_change_succession_law_trigger = yes @@ -334,6 +364,9 @@ single_heir_succession_law = { NOR = { government_has_flag = government_is_nomadic government_has_flag = government_is_mandala + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + government_has_flag = government_is_republic } trigger_if = { limit = { @@ -347,6 +380,7 @@ single_heir_succession_law = { } } + single_heir_succession_kurultai_law = { law_group_type = succession_order_laws index = 4 @@ -392,6 +426,7 @@ single_heir_succession_kurultai_law = { } } + single_heir_succession_law_youngest = { law_group_type = succession_order_laws index = 5 @@ -408,7 +443,11 @@ single_heir_succession_law_youngest = { } } can_have = { - NOT = { government_has_flag = government_is_nomadic } + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + } can_have_single_heir_youngest_succession_law_trigger = yes } can_pass = { @@ -471,10 +510,14 @@ single_heir_succession_law_youngest = { NOR = { government_has_flag = government_is_nomadic government_has_flag = government_is_mandala + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant } } } + single_heir_dynasty_house = { # LAST CALL law_group_type = succession_order_laws index = 6 @@ -491,7 +534,11 @@ single_heir_dynasty_house = { # LAST CALL } } can_have = { - NOT = { government_has_flag = government_is_nomadic } + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + } can_have_single_heir_dynasty_house_trigger = yes } can_pass = { @@ -558,10 +605,14 @@ single_heir_dynasty_house = { # LAST CALL government_has_flag = government_is_administrative government_has_flag = government_is_nomadic government_has_flag = government_is_mandala + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant + government_has_flag = government_is_republic } } } + acclamation_succession_law = { law_group_type = succession_order_laws index = 7 @@ -613,6 +664,7 @@ acclamation_succession_law = { } } + appointment_succession_law = { law_group_type = succession_order_laws index = 8 @@ -681,11 +733,12 @@ appointment_succession_law = { government_has_flag = government_is_japan_administrative government_has_flag = government_has_merit } - is_independent_ruler = no + use_governor_appointment_law_trigger = yes } } #The prowess succession of LAAMPs is determined in code + landless_adventurer_succession_law = { law_group_type = succession_order_laws index = 9 @@ -826,6 +879,7 @@ bishop_theocratic_succession_law = { } } + holy_order_succession_law = { law_group_type = succession_order_laws index = 13 @@ -854,6 +908,7 @@ holy_order_succession_law = { can_have_holy_order_succession_law_trigger = yes } } + cultural_holy_order_succession_law = { law_group_type = succession_order_laws index = 14 @@ -880,6 +935,7 @@ cultural_holy_order_succession_law = { can_have_cultural_holy_order_succession_law_trigger = yes } } + monastic_holy_order_succession_law = { law_group_type = succession_order_laws index = 15 @@ -911,6 +967,7 @@ monastic_holy_order_succession_law = { can_have_monastic_holy_order_succession_law_trigger = yes } } + female_monastic_holy_order_succession_law = { law_group_type = succession_order_laws index = 16 @@ -937,6 +994,7 @@ female_monastic_holy_order_succession_law = { can_have_female_monastic_holy_order_succession_law_trigger = yes } } + male_monastic_holy_order_succession_law = { law_group_type = succession_order_laws index = 17 @@ -964,6 +1022,7 @@ male_monastic_holy_order_succession_law = { } } + mercenary_company_succession_law = { law_group_type = succession_order_laws index = 18 @@ -987,18 +1046,21 @@ mercenary_company_succession_law = { } } + city_succession_law = { law_group_type = succession_order_laws index = 19 can_keep = { can_have_city_succession_law_trigger = yes + highest_held_title_tier < tier_county } can_have = { can_have_city_succession_law_trigger = yes } should_start_with = { government_has_flag = government_is_republic + highest_held_title_tier < tier_county } succession = { order_of_succession = generate @@ -1010,10 +1072,115 @@ city_succession_law = { } } -clan_antagonistic_partition_succession_law = { +## Despot "Republics" +# +# Feudal posing as a "Republic". +# + +republican_despot_succession_law = { law_group_type = succession_order_laws index = 20 + modifier = { + character_capital_popular_opinion_add = -25 + } + + can_have = { + government_has_flag = government_is_republic + highest_held_title_tier >= tier_county + liege = { + OR = { + this = root + NOT = { government_has_flag = government_is_republic } + } + } + } + can_pass = { + government_has_flag = government_is_republic + capital_county = { + county_control >= county_control_baseline + } + has_realm_law = republic_assembly_authority_legislative + has_realm_law = republic_assembly_term_length_indefinite + has_realm_law = republic_end_term_law_1 + has_realm_law = republic_vassal_refusal_2_treason + has_realm_law = republic_title_revocation_2_allowed + has_realm_law = republic_retract_vassal_2_allowed + has_realm_law = republic_banishment_3_unrestricted + has_realm_law = republic_execution_3_unrestricted + } + + succession = { + order_of_succession = inheritance + traversal_order = children + rank = oldest + title_division = single_heir + } + + flag = advanced_succession_law + flag = can_designate_heirs + + modifier = { + player_heir_opinion = 20 + close_relative_opinion = 10 + republic_government_opinion = -20 + } + + revoke_cost = { + prestige = change_hre_title_succession_law_prestige_cost + } + pass_cost = { + prestige = gdp_republican_despot_law_prestige_cost + } + + requires_approve = { government_has_flag = government_is_republic } + voting_session = { government_has_flag = government_is_republic } + + on_pass = { + capital_county = { add_popular_opinion = -25 } + } + + ai_approval = { + value = { + value = -100 + desc = LAW_BASE_RELUCTANCE_DESC + } + } + + ai_will_do = { + value = 0 + if = { + limit = { + house ?= { + has_house_aspiration_parameter = republic_signorial + } + } + add = 2 + } + if = { + limit = { + OR = { + has_trait = ambitious + has_trait = arrogant + } + } + add = 1 + } + # Grace period + multiply = ai_law_grace_period_value + } + + potential = { + government_has_flag = government_is_republic + gdp_is_assembly_head_trigger = yes + } +} + + +clan_antagonistic_partition_succession_law = { + law_group_type = succession_order_laws + index = 21 + can_keep = { government_has_flag = government_is_clan house ?= { @@ -1043,9 +1210,11 @@ clan_antagonistic_partition_succession_law = { } requires_approve = { - NOT = { - government_has_flag = government_is_clan - } + always = no + } + + manual_law_change = { + always = no } succession = { @@ -1070,9 +1239,10 @@ clan_antagonistic_partition_succession_law = { widget_name = "widget_clan_law" } + clan_competitive_partition_succession_law = { law_group_type = succession_order_laws - index = 21 + index = 22 can_keep = { government_has_flag = government_is_clan @@ -1102,9 +1272,11 @@ clan_competitive_partition_succession_law = { } requires_approve = { - NOT = { - government_has_flag = government_is_clan - } + always = no + } + + manual_law_change = { + always = no } succession = { @@ -1128,9 +1300,10 @@ clan_competitive_partition_succession_law = { widget_name = "widget_clan_law" } + clan_impassive_partition_succession_law = { law_group_type = succession_order_laws - index = 22 + index = 23 can_keep = { government_has_flag = government_is_clan @@ -1170,9 +1343,11 @@ clan_impassive_partition_succession_law = { } requires_approve = { - NOT = { - government_has_flag = government_is_clan - } + always = no + } + + manual_law_change = { + always = no } flag = house_unity_stage_impassive @@ -1193,9 +1368,10 @@ clan_impassive_partition_succession_law = { widget_name = "widget_clan_law" } + clan_friendly_partition_succession_law = { law_group_type = succession_order_laws - index = 23 + index = 24 can_keep = { government_has_flag = government_is_clan @@ -1225,9 +1401,11 @@ clan_friendly_partition_succession_law = { } requires_approve = { - NOT = { - government_has_flag = government_is_clan - } + always = no + } + + manual_law_change = { + always = no } flag = house_unity_stage_friendly @@ -1248,9 +1426,10 @@ clan_friendly_partition_succession_law = { widget_name = "widget_clan_law" } + clan_harmonious_partition_succession_law = { law_group_type = succession_order_laws - index = 24 + index = 25 can_keep = { government_has_flag = government_is_clan @@ -1281,9 +1460,11 @@ clan_harmonious_partition_succession_law = { } requires_approve = { - NOT = { - government_has_flag = government_is_clan - } + always = no + } + + manual_law_change = { + always = no } flag = house_unity_stage_harmonious @@ -1304,9 +1485,10 @@ clan_harmonious_partition_succession_law = { widget_name = "widget_clan_law" } + herder_succession_law = { law_group_type = succession_order_laws - index = 25 + index = 26 can_keep = { can_have_herder_succession_law_trigger = yes @@ -1330,9 +1512,10 @@ herder_succession_law = { } } + celestial_appointment_succession_law = { law_group_type = succession_order_laws - index = 26 + index = 27 can_keep = { government_has_mechanic = administrative @@ -1401,13 +1584,14 @@ celestial_appointment_succession_law = { potential = { government_has_flag = government_is_celestial - is_independent_ruler = no + use_governor_appointment_law_trigger = yes } } + celestial_military_appointment_succession_law = { law_group_type = succession_order_laws - index = 27 + index = 28 can_keep = { government_has_mechanic = administrative @@ -1477,13 +1661,14 @@ celestial_military_appointment_succession_law = { potential = { government_has_flag = government_is_celestial - is_independent_ruler = no + use_governor_appointment_law_trigger = yes } } + japanese_regency_succession_law = { law_group_type = succession_order_laws - index = 28 + index = 29 can_keep = { can_have_japanese_regency_succession_law_trigger = yes @@ -1530,9 +1715,10 @@ japanese_regency_succession_law = { } } + japanese_appointment_succession_law = { law_group_type = succession_order_laws - index = 29 + index = 30 can_keep = { can_keep_japanese_appointment_succession_law_trigger = yes @@ -1595,13 +1781,14 @@ japanese_appointment_succession_law = { potential = { government_has_flag = government_is_japan_administrative - is_independent_ruler = no + use_governor_appointment_law_trigger = yes } } + japanese_military_appointment_succession_law = { law_group_type = succession_order_laws - index = 30 + index = 31 can_keep = { government_has_mechanic = administrative @@ -1672,13 +1859,14 @@ japanese_military_appointment_succession_law = { potential = { government_has_flag = government_is_japan_administrative - is_independent_ruler = no + use_governor_appointment_law_trigger = yes } } + mandala_succession_law = { law_group_type = succession_order_laws - index = 31 + index = 32 can_keep = { realm_law_is_mandala = yes @@ -1711,9 +1899,10 @@ mandala_succession_law = { } } + meritocratic_appointment_succession_law = { law_group_type = succession_order_laws - index = 32 + index = 33 can_keep = { government_has_mechanic = administrative @@ -1788,13 +1977,14 @@ meritocratic_appointment_succession_law = { government_has_flag = government_is_steppe_admin government_has_flag = government_is_meritocratic } - is_independent_ruler = no + use_governor_appointment_law_trigger = yes } } + meritocratic_military_appointment_succession_law = { law_group_type = succession_order_laws - index = 33 + index = 34 can_keep = { government_has_mechanic = administrative @@ -1869,13 +2059,14 @@ meritocratic_military_appointment_succession_law = { government_has_flag = government_is_steppe_admin government_has_flag = government_is_meritocratic } - is_independent_ruler = no + use_governor_appointment_law_trigger = yes } } + meritocratic_regency_succession_law = { law_group_type = succession_order_laws - index = 34 + index = 35 can_keep = { can_have_meritocratic_regency_succession_law_trigger = yes @@ -1922,6 +2113,193 @@ meritocratic_regency_succession_law = { } +merchant_succession_law = { + law_group_type = succession_order_laws + index = 36 + + can_keep = { + government_has_flag = government_is_merchant + } + can_have = { + government_has_flag = government_is_merchant + } + can_pass = { + government_has_flag = government_is_merchant + } + should_start_with = { + government_has_flag = government_is_merchant + } + 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_merchant + } +} + + ## Republic election + # + # The succession law most republics (county or greater) start with. + # + +republican_elective_succession_law = { + law_group_type = succession_order_laws + index = 37 + + can_keep = { + government_has_flag = government_is_republic + highest_held_title_tier >= tier_county + liege = { + OR = { + this = root + NOT = { government_has_flag = government_is_republic } + } + } + } + can_have = { + government_has_flag = government_is_republic + highest_held_title_tier >= tier_county + } + can_pass = { + government_has_flag = government_is_republic + } + should_start_with = { + government_has_flag = government_is_republic + highest_held_title_tier >= tier_county + } + + succession = { + allow_same_successor = yes + order_of_succession = election + election_type = republican_elective + use_term_length = yes + } + + modifier = { + short_reign_duration_mult = -2 + } + + flag = elective_succession_law + flag = succession_uses_term_length + + revoke_cost = { + prestige = { + value = change_title_succession_law_prestige_cost + multiply = gdp_republic_revoke_title_law_cost_scale_value + } + gold = { + add = { + value = 1000 + desc = BASE + } + value = gdp_republic_revoke_title_law_monetary_cost_value + multiply = gdp_republic_revoke_title_law_cost_scale_value + } + } + pass_cost = { + prestige = change_title_succession_law_prestige_cost + treasury_or_gold = gdp_republic_pass_title_law_monetary_cost_value + } + + requires_approve = { government_has_flag = government_is_republic } + voting_session = { government_has_flag = government_is_republic } + + ai_approval = { + value = { + value = 100 + desc = LAW_BASE_WILLINGNESS_DESC + } + } + + ai_will_do = { + value = 10 # TODO_GDP - Add proper AI values and weights + } + + potential = { + government_has_flag = government_is_republic + gdp_is_assembly_head_trigger = yes + } +} + + +republican_appointment_succession_law = { + law_group_type = succession_order_laws + index = 38 + + can_keep = { + government_has_flag = government_is_republic + highest_held_title_tier >= tier_county + liege = { + this != root + government_has_flag = government_is_republic + } + } + can_have = { + government_has_flag = government_is_republic + highest_held_title_tier >= tier_county + liege = { + this != root + government_has_flag = government_is_republic + } + } + can_pass = { + } + should_start_with = { + government_has_flag = government_is_republic + highest_held_title_tier >= tier_county + liege = { + this != root + government_has_flag = government_is_republic + } + } + succession = { + order_of_succession = appointment + appointment_type = republic_governor + } + flag = advanced_succession_law + flag = appointment_type_succession + modifier = { + } + 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_republic + gdp_is_assembly_head_trigger = no + } +} + + male_only_law = { law_group_type = succession_gender_laws index = 0 @@ -2022,8 +2400,60 @@ male_only_law = { revoke_cost = { prestige = change_succession_law_prestige_cost } + + requires_approve = { gdp_requires_assembly_approval_trigger = yes } + + ai_approval = { + value = 0 + if = { + limit = { + liege ?= { + gdp_requires_assembly_approval_trigger = yes + } + } + # Base + add = { + value = -30 + desc = LAW_BASE_RELUCTANCE_DESC + } + # Faith + if = { + limit = { + rite = { rite_has_parameter = male_dominated_law } + } + add = { + value = 25 + desc = MALE_DOMINATED_RITE_DESC + } + } + # Culture + if = { + limit = { + culture = { + has_cultural_parameter = male_only_inheritance + } + } + add = { + value = 25 + desc = MALE_DOMINATED_CULTURE_DESC + } + } + # Staunch Traditionalists never want to change + if = { + limit = { + culture ?= { has_cultural_tradition = tradition_staunch_traditionalists } + NOT = { has_realm_law = male_only_law } + } + add = { + value = -100 + desc = "[GetCultureTradition('tradition_staunch_traditionalists').GetName]" + } + } + } + } } + male_preference_law = { law_group_type = succession_gender_laws index = 1 @@ -2142,8 +2572,74 @@ male_preference_law = { revoke_cost = { prestige = change_succession_law_prestige_cost } + + requires_approve = { gdp_requires_assembly_approval_trigger = yes } + + ai_approval = { + value = 0 + if = { + limit = { + liege ?= { + gdp_requires_assembly_approval_trigger = yes + } + } + # Base + add = { + value = -20 + desc = LAW_BASE_RELUCTANCE_DESC + } + # Faith + if = { + limit = { + rite = { rite_has_parameter = male_dominated_law } + } + add = { + value = 25 + desc = MALE_DOMINATED_RITE_DESC + } + } + # Culture + if = { + limit = { + culture = { + OR = { + AND = { + has_cultural_parameter = male_only_inheritance + root = { + NOT = { has_realm_law = male_only_law } + } + } + has_cultural_parameter = male_preference_inheritance + NOR = { # A default if the culture has no specific preference + has_cultural_parameter = male_only_inheritance + has_cultural_parameter = female_only_inheritance + has_cultural_parameter = female_preference_inheritance + has_cultural_parameter = gender_equal_inheritance + } + } + } + } + add = { + value = 25 + desc = MALE_DOMINATED_CULTURE_DESC + } + } + # Staunch Traditionalists never want to change + if = { + limit = { + culture ?= { has_cultural_tradition = tradition_staunch_traditionalists } + NOT = { has_realm_law = male_preference_law } + } + add = { + value = -100 + desc = "[GetCultureTradition('tradition_staunch_traditionalists').GetName]" + } + } + } + } } + equal_law = { law_group_type = succession_gender_laws index = 2 @@ -2234,6 +2730,55 @@ equal_law = { prestige = change_succession_law_prestige_cost } + requires_approve = { gdp_requires_assembly_approval_trigger = yes } + + ai_approval = { + value = 0 + if = { + limit = { + liege ?= { + gdp_requires_assembly_approval_trigger = yes + } + } + # Base + add = { + value = -20 + desc = LAW_BASE_RELUCTANCE_DESC + } + # Faith + if = { + limit = { + rite = { rite_has_parameter = gender_equal_law } + } + add = { + value = 25 + desc = EQUAL_RITE_DESC + } + } + # Culture + if = { + limit = { + culture = { has_cultural_parameter = gender_equal_inheritance } + } + add = { + value = 25 + desc = EQUAL_CULTURE_DESC + } + } + # Staunch Traditionalists never want to change + if = { + limit = { + culture ?= { has_cultural_tradition = tradition_staunch_traditionalists } + NOT = { has_realm_law = equal_law } + } + add = { + value = -100 + desc = "[GetCultureTradition('tradition_staunch_traditionalists').GetName]" + } + } + } + } + ai_will_do = { if = { limit = { @@ -2250,6 +2795,7 @@ equal_law = { } } + female_preference_law = { law_group_type = succession_gender_laws index = 3 @@ -2347,8 +2893,68 @@ female_preference_law = { revoke_cost = { prestige = change_succession_law_prestige_cost } + + requires_approve = { gdp_requires_assembly_approval_trigger = yes } + + ai_approval = { + value = 0 + if = { + limit = { + liege ?= { + gdp_requires_assembly_approval_trigger = yes + } + } + # Base + add = { + value = -20 + desc = LAW_BASE_RELUCTANCE_DESC + } + # Faith + if = { + limit = { + rite = { rite_has_parameter = female_dominated_law } + } + add = { + value = 25 + desc = FEMALE_DOMINATED_RITE_DESC + } + } + # Culture + if = { + limit = { + culture = { + OR = { + AND = { + has_cultural_parameter = female_only_inheritance + root = { + NOT = { has_realm_law = female_only_law } + } + } + has_cultural_parameter = female_preference_inheritance + } + } + } + add = { + value = 25 + desc = FEMALE_DOMINATED_CULTURE_DESC + } + } + # Staunch Traditionalists never want to change + if = { + limit = { + culture ?= { has_cultural_tradition = tradition_staunch_traditionalists } + NOT = { has_realm_law = female_preference_law } + } + add = { + value = -100 + desc = "[GetCultureTradition('tradition_staunch_traditionalists').GetName]" + } + } + } + } } + female_only_law = { law_group_type = succession_gender_laws index = 4 @@ -2438,6 +3044,57 @@ female_only_law = { culture = { has_cultural_parameter = female_only_inheritance } } } + + requires_approve = { gdp_requires_assembly_approval_trigger = yes } + + ai_approval = { + value = 0 + if = { + limit = { + liege ?= { + gdp_requires_assembly_approval_trigger = yes + } + } + # Base + add = { + value = -30 + desc = LAW_BASE_RELUCTANCE_DESC + } + # Faith + if = { + limit = { + rite = { rite_has_parameter = female_dominated_law } + } + add = { + value = 25 + desc = FEMALE_DOMINATED_RITE_DESC + } + } + # Culture + if = { + limit = { + culture = { + has_cultural_parameter = female_only_inheritance + } + } + add = { + value = 25 + desc = FEMALE_DOMINATED_CULTURE_DESC + } + } + # Staunch Traditionalists never want to change + if = { + limit = { + culture ?= { has_cultural_tradition = tradition_staunch_traditionalists } + NOT = { has_realm_law = female_only_law } + } + add = { + value = -100 + desc = "[GetCultureTradition('tradition_staunch_traditionalists').GetName]" + } + } + } + } } @@ -2466,16 +3123,17 @@ same_faith_theocratic_succession_law = { shown_in_encyclopedia = no can_keep = { - religion != religion:christianity_religion faith = { religious_head = root has_doctrine = doctrine_spiritual_head } + religion != religion:christianity_religion } succession = { faith = same_faith } } + same_faith_succession_law = { law_group_type = succession_rel_head index = 1 diff --git a/common/laws/01_title_succession_laws.txt b/common/laws/01_title_succession_laws.txt index a6098f811..29acf8d7a 100644 --- a/common/laws/01_title_succession_laws.txt +++ b/common/laws/01_title_succession_laws.txt @@ -32,10 +32,12 @@ feudal_elective_succession_law = { } } + # HRE Succession + princely_elective_succession_law = { law_group_type = title_succession_laws - index = 1 + index = 2 can_have = { OR = { @@ -58,7 +60,7 @@ princely_elective_succession_law = { flag = elective_succession_law title_allegiance_opinion = 10 modifier = { - vassal_limit = 20 + vassal_limit = 40 minority_opinion = -15 } revoke_cost = { @@ -70,9 +72,10 @@ princely_elective_succession_law = { } # Witenagemot + saxon_elective_succession_law = { law_group_type = title_succession_laws - index = 2 + index = 3 can_have = { OR = { @@ -104,9 +107,10 @@ saxon_elective_succession_law = { } # Thing + scandinavian_elective_succession_law = { law_group_type = title_succession_laws - index = 3 + index = 4 can_have = { OR = { @@ -138,9 +142,10 @@ scandinavian_elective_succession_law = { } # Tanistry + gaelic_elective_succession_law = { law_group_type = title_succession_laws - index = 4 + index = 5 can_have = { OR = { @@ -178,9 +183,10 @@ gaelic_elective_succession_law = { } # Jirga elective + tribal_elective_succession_law = { #FOR FP3 law_group_type = title_succession_laws - index = 5 + index = 6 can_have = { OR = { @@ -212,9 +218,10 @@ tribal_elective_succession_law = { #FOR FP3 } # Player Heir + temporal_head_of_faith_succession_law = { law_group_type = title_succession_laws - index = 6 + index = 7 can_title_have = { is_temporal_head_of_faith_trigger = yes @@ -234,18 +241,25 @@ temporal_head_of_faith_succession_law = { } # Noble Family Succession + noble_family_succession_law = { law_group_type = title_succession_laws - index = 7 + index = 8 can_title_have = { is_noble_family_title = yes + NOT = { + holder ?= { government_has_flag = government_is_merchant } # uses its own law + } } should_show_for_title = { # Never show this in the UI, just apply it through script always = no } can_remove_from_title = { - always = no + custom_tooltip = { + text = cannot_remove_noble_family_succession_law_desc + always = no + } } succession = { order_of_succession = noble_family @@ -256,9 +270,10 @@ noble_family_succession_law = { # Law of the Land Title Succession # Applied in on_title_gain when a county title's capital province has required heir government types defined and the new holder does not meet the requirement. + law_of_the_land_succession_law = { law_group_type = title_succession_laws - index = 8 + index = 9 can_title_have = { tier = tier_county @@ -281,9 +296,10 @@ law_of_the_land_succession_law = { } } #Confederation elective + confederation_elective_succession_law = { law_group_type = title_succession_laws - index = 9 + index = 10 can_title_have = { tier >= tier_kingdom @@ -318,9 +334,10 @@ confederation_elective_succession_law = { } # Celestial Ministry Succession + celestial_ministry_appointment_succession_law = { law_group_type = title_succession_laws - index = 10 + index = 11 can_have = { government_has_flag = government_is_celestial @@ -351,9 +368,10 @@ celestial_ministry_appointment_succession_law = { } # Celestial Grand Marshal Succession + celestial_grand_marshal_appointment_succession_law = { law_group_type = title_succession_laws - index = 11 + index = 12 can_have = { government_has_flag = government_is_celestial diff --git a/common/men_at_arms_types/00_cultural_maa_types.txt b/common/men_at_arms_types/00_cultural_maa_types.txt index 846cca53e..7803f1d40 100644 --- a/common/men_at_arms_types/00_cultural_maa_types.txt +++ b/common/men_at_arms_types/00_cultural_maa_types.txt @@ -28,6 +28,8 @@ huscarl = { pursuit = 0 screen = 24 + control_value = 6 + terrain_bonus = { taiga = { damage = 8 } forest = { damage = 8 } @@ -82,6 +84,8 @@ landsknecht = { pursuit = 0 screen = 0 + control_value = 4 + terrain_bonus = { mountains = { damage = 5 toughness = 12 } desert_mountains = { damage = 5 toughness = 12 } @@ -131,6 +135,8 @@ longbowmen = { pursuit = 0 screen = 0 + control_value = 2 + terrain_bonus = { hills = { damage = 12 toughness = 4 } } @@ -172,6 +178,8 @@ goedendag = { pursuit = 0 screen = 16 + control_value = 2 + counters = { heavy_infantry = 1 heavy_cavalry = 1 @@ -213,6 +221,8 @@ gendarme = { pursuit = 20 screen = 10 + control_value = 8 + terrain_bonus = { plains = { damage = 30 } drylands = { damage = 30 } @@ -270,6 +280,8 @@ chasseur = { pursuit = 40 screen = 15 + control_value = 4 + terrain_bonus = { plains = { damage = 10 } drylands = { damage = 10 } @@ -325,6 +337,8 @@ picchieri = { pursuit = 0 screen = 0 + control_value = 4 + terrain_bonus = { mountains = { toughness = 12 } desert_mountains = { toughness = 12 } @@ -366,6 +380,46 @@ picchieri = { icon = pikemen } +condottieri = { + type = heavy_cavalry + + damage = 100 + toughness = 45 + pursuit = 20 + screen = 10 + + control_value = 4 + + terrain_bonus = { + plains = { damage = 25 } + drylands = { damage = 25 } + hills = { damage = -20 } + mountains = { damage = -75 } + desert_mountains = { damage = -75 } + wetlands = { damage = -75 toughness = -10 pursuit = -10 } + } + + counters = { + archers = 1 + gunpowder = 1 + pikemen = 0.5 + } + + can_recruit = { + has_gdp_dlc_trigger = yes + culture = { has_innovation = innovation_condottieri } + } + + buy_cost = { gold = condottieri_recruitment_cost } + low_maintenance_cost = { gold = condottieri_low_maint_cost } + high_maintenance_cost = { gold = condottieri_high_maint_cost } + provision_cost = @provisions_cost_cavalry_moderate + + stack = 50 + ai_quality = { value = @cultural_maa_extra_ai_score } + icon = heavy_cavalry +} + praetorian = { type = heavy_infantry @@ -374,6 +428,8 @@ praetorian = { pursuit = 0 screen = 20 + control_value = 8 + counters = { pikemen = 1 peasant_militia = 2 @@ -400,6 +456,8 @@ caballero = { pursuit = 30 screen = 50 + control_value = 4 + terrain_bonus = { hills = { damage = 15 toughness = 10 } plains = { damage = 10 } @@ -454,6 +512,8 @@ monaspa = { pursuit = 25 screen = 10 + control_value = 8 + terrain_bonus = { hills = { damage = 20 pursuit = 10 } mountains = { damage = 20 pursuit = 10 } @@ -509,6 +569,8 @@ cataphract = { pursuit = 10 screen = 0 + control_value = 10 + terrain_bonus = { plains = { damage = 30 toughness = 5 } drylands = { damage = 30 } @@ -556,6 +618,8 @@ hobelar = { pursuit = 50 screen = 30 + control_value = 4 + terrain_bonus = { forest = { damage = 15 } hills = { damage = 10 } @@ -614,6 +678,8 @@ schiltron = { pursuit = 0 screen = 0 + control_value = 4 + terrain_bonus = { mountains = { toughness = 12 } desert_mountains = { toughness = 12 } @@ -667,6 +733,8 @@ metsanvartija = { pursuit = 10 screen = 10 + control_value = 2 + terrain_bonus = { forest = { damage = 10 toughness = 4 } taiga = { damage = 10 toughness = 4 } @@ -683,15 +751,11 @@ metsanvartija = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_metsanvartija } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_metsanvartija } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_metsanvartija } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_metsanvartija } } government_allows = subject_men_at_arms } @@ -719,6 +783,8 @@ horse_archers = { pursuit = 40 screen = 40 + control_value = 4 + terrain_bonus = { steppe = { damage = 45 } plains = { damage = 20 } @@ -777,6 +843,8 @@ ayyar = { pursuit = 12 screen = 0 + control_value = 4 + counters = { pikemen = 1 peasant_militia = 2 @@ -785,18 +853,14 @@ ayyar = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_ayyar } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_ayyar } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_ayyar } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_ayyar } } government_allows = subject_men_at_arms } @@ -824,6 +888,8 @@ mubarizun = { pursuit = 0 screen = 0 + control_value = 4 + counters = { pikemen = 1 peasant_militia = 2 @@ -833,18 +899,14 @@ mubarizun = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_mubarizun } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_mubarizun } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_mubarizun } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_mubarizun } } government_allows = subject_men_at_arms } @@ -872,6 +934,8 @@ mulaththamun = { #Murabit Cavalry pursuit = 30 screen = 40 + control_value = 4 + terrain_bonus = { drylands = { damage = 10 toughness = 5 screen = 10 pursuit = 5 } desert = { damage = 10 toughness = 5 screen = 20 pursuit = 10 } @@ -896,18 +960,14 @@ mulaththamun = { #Murabit Cavalry can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_mulaththamun } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_mulaththamun } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_mulaththamun } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_mulaththamun } } government_allows = subject_men_at_arms } @@ -935,6 +995,8 @@ archers_of_the_nile = { #Nile Archers pursuit = 10 screen = 10 + control_value = 2 + terrain_bonus = { floodplains = { damage = 15 toughness = 15 pursuit = 10 screen = 10 } oasis = { damage = 15 pursuit = 5 screen = 5 } @@ -949,18 +1011,14 @@ archers_of_the_nile = { #Nile Archers can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_archers_of_the_nile } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_archers_of_the_nile } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_archers_of_the_nile } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_archers_of_the_nile } } government_allows = subject_men_at_arms } @@ -989,6 +1047,8 @@ paiks = { #Indian Footmen - carrying bows but also swords and spears. pursuit = 10 screen = 10 + control_value = 2 + terrain_bonus = { jungle = { damage = 15 toughness = 15 pursuit = 10 screen = 10 } forest = { damage = 15 pursuit = 5 screen = 5 } @@ -1041,6 +1101,8 @@ druzhina = { pursuit = 0 screen = 30 + control_value = 6 + counters = { pikemen = 1 peasant_militia = 2 @@ -1048,18 +1110,14 @@ druzhina = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_druzhina } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_druzhina } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_druzhina } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_druzhina } } government_allows = subject_men_at_arms } @@ -1087,6 +1145,8 @@ hussar = { pursuit = 60 screen = 20 + control_value = 4 + terrain_bonus = { plains = { damage = 15 } drylands = { damage = 15 } @@ -1108,18 +1168,14 @@ hussar = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_hussar } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_hussar } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_hussar } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_hussar } } government_allows = subject_men_at_arms } @@ -1147,6 +1203,8 @@ horn_warrior = { pursuit = 0 screen = 20 + control_value = 2 + terrain_bonus = { mountains = { damage = 10 toughness = 10 } desert_mountains = { damage = 10 toughness = 10 } @@ -1160,18 +1218,14 @@ horn_warrior = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_horn_warrior } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_horn_warrior } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_horn_warrior } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_horn_warrior } } government_allows = subject_men_at_arms } @@ -1199,6 +1253,8 @@ bush_hunter = { pursuit = 5 screen = 0 + control_value = 2 + terrain_bonus = { jungle = { damage = 8 toughness = 4 } forest = { damage = 8 toughness = 4 } @@ -1213,18 +1269,14 @@ bush_hunter = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_bush_hunter } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_bush_hunter } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_bush_hunter } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_bush_hunter } } government_allows = subject_men_at_arms } @@ -1252,24 +1304,22 @@ shomer = { pursuit = 0 screen = 40 + control_value = 2 + counters = { heavy_infantry = 1 } can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_shomer } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_shomer } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_shomer } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_shomer } } government_allows = subject_men_at_arms } @@ -1297,6 +1347,8 @@ garudas = { pursuit = 24 screen = 0 + control_value = 6 + terrain_bonus = { jungle = { damage = 8 } forest = { damage = 8 } @@ -1319,18 +1371,14 @@ garudas = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_garudas } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_garudas } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_garudas } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_garudas } } government_allows = subject_men_at_arms } @@ -1354,6 +1402,8 @@ khandayat = { pursuit = 0 screen = 0 + control_value = 4 + terrain_bonus = { jungle = { damage = 12 toughness = 8 } } @@ -1367,18 +1417,14 @@ khandayat = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_khandayat } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_khandayat } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_khandayat } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_khandayat } } government_allows = subject_men_at_arms } @@ -1407,6 +1453,8 @@ mountaineer = { pursuit = 0 screen = 0 + control_value = 4 + terrain_bonus = { mountains = { damage = 12 toughness = 12 } desert_mountains = { damage = 12 toughness = 12 } @@ -1424,18 +1472,14 @@ mountaineer = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_mountaineer } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_mountaineer } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_mountaineer } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_mountaineer } } government_allows = subject_men_at_arms } @@ -1464,6 +1508,8 @@ sahel_horsemen = { pursuit = 30 screen = 30 + control_value = 4 + terrain_bonus = { drylands = { damage = 15 toughness = 3 } floodplains = { damage = 15 toughness = 3 } @@ -1526,6 +1572,8 @@ guinea_warrior = { #AKA Guinean uplander pursuit = 0 screen = 20 + control_value = 2 + terrain_bonus = { forest = { damage = 10 toughness = 8 } hills = { damage = 6 toughness = 4 } @@ -1538,18 +1586,14 @@ guinea_warrior = { #AKA Guinean uplander can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_guinea_warrior } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_guinea_warrior } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_guinea_warrior } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_guinea_warrior } } government_allows = subject_men_at_arms } @@ -1577,6 +1621,8 @@ sarawit = { #AKA Ethiopian mountaineer pursuit = 0 screen = 10 + control_value = 4 + terrain_bonus = { mountains = { damage = 12 toughness = 10 } desert_mountains = { damage = 10 toughness = 8 } @@ -1630,6 +1676,8 @@ abudrar = { #AKA Jabali - Berber mountaineer pursuit = 20 screen = 10 + control_value = 2 + terrain_bonus = { desert_mountains = { damage = 10 toughness = 8 } mountains = { damage = 8 toughness = 6 } @@ -1645,18 +1693,14 @@ abudrar = { #AKA Jabali - Berber mountaineer can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_abudrar } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_abudrar } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_abudrar } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_abudrar } } government_allows = subject_men_at_arms } @@ -1684,6 +1728,8 @@ zbrojnosh = { pursuit = 0 screen = 10 + control_value = 4 + terrain_bonus = { hills = { damage = 8 toughness = 5 } mountains = { damage = 6 } @@ -1699,18 +1745,14 @@ zbrojnosh = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_zbrojnosh } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_zbrojnosh } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_zbrojnosh } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_zbrojnosh } } government_allows = subject_men_at_arms } @@ -1738,6 +1780,8 @@ palace_guards = { pursuit = 0 screen = 20 + control_value = 4 + terrain_bonus = { jungle = { damage = 10 toughness = 6 } hills = { damage = 8 toughness = 4 } @@ -1751,18 +1795,14 @@ palace_guards = { can_recruit = { OR = { AND = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_palace_guards } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_palace_guards } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= { - valid_for_maa_trigger = { PARAMETER = unlock_maa_palace_guards } - } + valid_for_maa_trigger = { PARAMETER = unlock_maa_palace_guards } } government_allows = subject_men_at_arms } @@ -1791,6 +1831,8 @@ shenbigong = { pursuit = 0 screen = 0 + control_value = 4 + terrain_bonus = { hills = { damage = 10 toughness = 4 } mountains = { damage = 8 toughness = 2 } @@ -1853,6 +1895,8 @@ guanch_vaulter = { screen = 20 siege_value = 0.1 + control_value = 2 + terrain_bonus = { hills = { damage = 4 toughness = 6 } mountains = { damage = 4 pursuit = 6 } @@ -1883,6 +1927,8 @@ teulu = { pursuit = 35 screen = 30 + control_value = 4 + terrain_bonus = { hills = { pursuit = 5 toughness = 10 } forest = { pursuit = 5 toughness = 10 } diff --git a/common/men_at_arms_types/00_maa_types.txt b/common/men_at_arms_types/00_maa_types.txt index a592e2049..386938c0e 100644 --- a/common/men_at_arms_types/00_maa_types.txt +++ b/common/men_at_arms_types/00_maa_types.txt @@ -27,6 +27,8 @@ light_footmen = { pursuit = 10 screen = 16 + control_value = 2 + terrain_bonus = { forest = { damage = 4 toughness = 6 } taiga = { damage = 4 toughness = 6 } @@ -81,6 +83,8 @@ bowmen = { pursuit = 0 screen = 0 + control_value = 2 + terrain_bonus = { hills = { damage = 10 toughness = 4 } forest = { toughness = 4 screen = 4 } @@ -140,6 +144,8 @@ light_horsemen = { pursuit = 30 screen = 30 + control_value = 4 + terrain_bonus = { plains = { damage = 15 } drylands = { damage = 15 } @@ -209,6 +215,8 @@ pikemen_unit = { pursuit = 0 screen = 0 + control_value = 4 + terrain_bonus = { mountains = { toughness = 12 } desert_mountains = { toughness = 12 } @@ -269,6 +277,8 @@ armored_footmen = { pursuit = 0 screen = 0 + control_value = 4 + counters = { pikemen = 1 peasant_militia = 2 @@ -364,6 +374,8 @@ armored_horsemen = { pursuit = 20 screen = 0 + control_value = 8 + terrain_bonus = { plains = { damage = 30 } drylands = { damage = 30 } @@ -476,6 +488,8 @@ crossbowmen = { pursuit = 0 screen = 0 + control_value = 4 + terrain_bonus = { hills = { damage = 10 } plains = { toughness = -8 } @@ -620,6 +634,8 @@ handgunners = { pursuit = 0 screen = 5 + control_value = 4 + can_recruit = { gunpowder_raise_limit_existing_gunpowder_units < gunpowder_raise_limit_existing_gunpowder_buildings # one powder magazine must be owned to support three handgunner regiments, regardless of maa size OR = { @@ -676,6 +692,8 @@ house_guard = { pursuit = 0 screen = 24 + control_value = 4 + counters = { pikemen = 2 peasant_militia = 4 @@ -713,6 +731,8 @@ pikemen_militia = { pursuit = 10 screen = 0 + control_value = 4 + terrain_bonus = { mountains = { toughness = 8 } desert_mountains = { toughness = 8 } diff --git a/common/men_at_arms_types/09_mpo_maa_types.txt b/common/men_at_arms_types/09_mpo_maa_types.txt index 4bd5aa2ff..f801802e9 100644 --- a/common/men_at_arms_types/09_mpo_maa_types.txt +++ b/common/men_at_arms_types/09_mpo_maa_types.txt @@ -28,6 +28,8 @@ nomadic_riders = { pursuit = 10 screen = 15 + control_value = 4 + terrain_bonus = { steppe = { damage = 8 pursuit = 10 } plains = { damage = 4 pursuit = 6 } @@ -102,6 +104,8 @@ kheshig = { pursuit = 24 screen = 36 + control_value = 6 + terrain_bonus = { steppe = { damage = 90 screen = 20 } plains = { damage = 50 screen = 10 } @@ -145,6 +149,8 @@ steppe_raiders = { pursuit = 30 screen = 30 + control_value = 4 + terrain_bonus = { steppe = { damage = 15 } plains = { damage = 15 } @@ -193,6 +199,8 @@ heavy_horse_archers = { pursuit = 24 screen = 24 + control_value = 4 + terrain_bonus = { steppe = { damage = 80 } plains = { damage = 40 } @@ -251,6 +259,8 @@ nomad_lancers = { pursuit = 20 screen = 0 + control_value = 6 + terrain_bonus = { steppe = { damage = 50 } plains = { damage = 40 } @@ -302,6 +312,8 @@ mangudai = { pursuit = 60 screen = 10 + control_value = 2 + terrain_bonus = { steppe = { damage = 45 } plains = { damage = 20 } @@ -345,6 +357,8 @@ cataphract_archers = { pursuit = 20 screen = 10 + control_value = 10 + terrain_bonus = { steppe = { damage = 40 } drylands = { damage = 40 } @@ -404,6 +418,8 @@ maturkan_warriors = { pursuit = 0 screen = 16 + control_value = 2 + terrain_bonus = { taiga = { damage = 12 toughness = 6 } forest = { damage = 10 toughness = 4 } diff --git a/common/men_at_arms_types/NEOW_maa_types.txt b/common/men_at_arms_types/NEOW_maa_types.txt index 679670866..ebbd3932c 100644 --- a/common/men_at_arms_types/NEOW_maa_types.txt +++ b/common/men_at_arms_types/NEOW_maa_types.txt @@ -962,14 +962,14 @@ tercos = { can_recruit = { OR = { AND = { - culture ?= {valid_for_maa_trigger = { PARAMETER = unlock_maa_tercos }} + valid_for_maa_trigger = { PARAMETER = } NOT = { culture ?= { has_cultural_parameter = strength_in_numbers_heavy_maa_ban } } } AND = { any_vassal = { - culture ?= {valid_for_maa_trigger = { PARAMETER = unlock_maa_tercos }} + valid_for_maa_trigger = { PARAMETER = } } government_allows = subject_men_at_arms } diff --git a/common/modifiers/00_basic_modifiers.txt b/common/modifiers/00_basic_modifiers.txt index b8c625efd..ca75f300c 100644 --- a/common/modifiers/00_basic_modifiers.txt +++ b/common/modifiers/00_basic_modifiers.txt @@ -22,6 +22,13 @@ dread_modifier = { trade_competitiveness_mult = 0.002 } +# Modifiers applied per amount of dread +dread_modifier = { + popular_opinion_add = -0.2 + control_baseline_add = 0.2 + trade_competitiveness_mult = 0.002 +} + # Skill modifiers, applied to each character # *_with_offset versions first subtract the NCharacter.SKILL_MODIFIER_OFFSET value from the skill diff --git a/common/modifiers/07_ep3_modifiers.txt b/common/modifiers/07_ep3_modifiers.txt index 81204fdd8..2596c86d9 100644 --- a/common/modifiers/07_ep3_modifiers.txt +++ b/common/modifiers/07_ep3_modifiers.txt @@ -923,7 +923,7 @@ ep3_governor_yearly_8040_shirker_modifier = { laamp_prepping_for_invasion = { icon = martial_positive men_at_arms_maintenance = -0.1 - men_at_arms_recruitment_cost = -0.1 + men_at_arms_recruitment_cost = -0.05 } laamp_familiar_lands = { diff --git a/common/modifiers/_modifiers.info b/common/modifiers/_modifiers.info index e335aafa3..7ddf8edde 100644 --- a/common/modifiers/_modifiers.info +++ b/common/modifiers/_modifiers.info @@ -1,4 +1,4 @@ -In this folder, character modifiers are defined +In this folder, character modifiers are defined The modifers are on the format: @@ -7,7 +7,7 @@ modifer_key = { # Effects, such as # tax_mult = 0.25 - # county_opinion_add = -30 + # popular_opinion_add = -30 # Modifier can have scale that'll be calculated once when effect assigns a modifier, and later # remains unchanged for the entire modifier duration @@ -21,6 +21,9 @@ modifer_key = { # Loc key that's used for base level entry, to show alongside with the scaled value desc = base_value_description } + + # Stacking modifiers will be added on top of each other if one is already present + stacking = yes } "modifier_key" is the name of the modifier, that is used in effects to apply it diff --git a/common/named_colors/culture_colors.txt b/common/named_colors/culture_colors.txt index bc54ddc8a..c33b137fc 100644 --- a/common/named_colors/culture_colors.txt +++ b/common/named_colors/culture_colors.txt @@ -1,4 +1,4 @@ -colors = { +colors = { # used by cultures and languages english = { 0.8 0.2 0.2 } bedouin = { 0.1 0.75 0.1 } @@ -19,10 +19,12 @@ colors = { somali = hsv{ 0.6 0.8 0.3 } dutch = { 0.8 0.59 0.4 } russian = { 0.2 0.4 0.1 } + novgorodian = { 0.25 0.6 0.3 } ethiopian = hsv{ 0.15 0.9 0.7 } finnish = { 0.1 0.6 0.6 } frankish = { 0.3 0.3 0.5 } french = { 0.1 0.1 0.6 } + arpitan = { 0.45 0.6 0.9 } gaelic = hsv{ 0.50 0.90 0.57 } gur = hsv{ 0.62 0.9 0.7 } hindustani = { 1.0 0.0 0.0 } @@ -39,12 +41,14 @@ colors = { persian = { 0.8 0.8 0.4 } ashkenazi = { 0.6 0.3 0.6 } italian = { 0.95 0.95 0.75 } + italo_norman = hsv{ 0.08 1.0 0.46 } kru = hsv{ 0.015 0.95 0.7 } akan = hsv{ 0.02 0.8 0.88 } hungarian = { 0.5 0.6 0.3 } malinke = hsv{ 0.66 0.69 0.58 } mongol = { 0.4 0.4 1.0 } norse = { 0.3 0.55 0.8 } + norse_gael = hsv{ 0.45 0.25 0.45 } khazar = { 0.7 0.45 0.1 } welayta = hsv{ 0.17 0.65 0.44 } qiang = { 0.8 0.2 0.2 } diff --git a/common/on_action/army_on_actions.txt b/common/on_action/army_on_actions.txt index 641f493f5..31f8da7aa 100644 --- a/common/on_action/army_on_actions.txt +++ b/common/on_action/army_on_actions.txt @@ -35,13 +35,30 @@ on_army_monthly = { # scope:war is the war causing the previous controller and the occupant to be hostile on_county_occupied = { effect = { +# #Guelphs & Ghibellines +# if = { +# limit = { +# scope:county = title:c_roma +# exists = scope:county.holder +# is_ghibelline_trigger = yes +# scope:war ?= { +# NOT = { has_variable = gg_rome_occupied } +# } +# } +# scope:war = { set_variable = gg_rome_occupied } +# gg_triggered_catalyst_effect = { +# ACTOR = root +# RECIPIENT = scope:county.holder +# CATALYST = catalyst_gg_rome_occupied +# } +# } random = { # chance of granting a knight eligibility for marauder / besieger accolade chance = 2 modifier = { factor = accolade_progress } - modifier = { - NOT = { + if = { + limit = { any_knight = { OR = { can_be_acclaimed = yes @@ -50,7 +67,7 @@ on_county_occupied = { } } knight_army ?= { - location.county = scope:county + location.county ?= scope:county } OR = { AND = { # needed for besieger @@ -70,159 +87,158 @@ on_county_occupied = { } } } - factor = 0 - } - set_variable = { - name = accolade_progress - value = 0 - } - random_list = { - 10 = { # marauder - trigger = { - any_knight = { - OR = { - can_be_acclaimed = yes - accolade ?= { - accolade_can_have_more_attributes = yes + set_variable = { + name = accolade_progress + value = 0 + } + random_list = { + 10 = { # marauder + trigger = { + any_knight = { + OR = { + can_be_acclaimed = yes + accolade ?= { + accolade_can_have_more_attributes = yes + } + } + knight_army ?= { + location.county ?= scope:county + } + NOT = { + has_trait = compassionate + } + marauder_attribute_trigger = no + } + } + random_knight = { + limit = { + OR = { + can_be_acclaimed = yes + accolade ?= { + accolade_can_have_more_attributes = yes + } + } + knight_army ?= { + location.county ?= scope:county + } + NOT = { + has_trait = compassionate + } + marauder_attribute_trigger = no + } + weight = { + base = 1 + modifier = { + add = 60 + is_acclaimed = yes + } + modifier = { + add = 30 + has_trait = sadistic + } + modifier = { + add = 30 + has_trait = callous + } + modifier = { + add = 30 + has_trait = wrathful + } + modifier = { + add = 30 + has_trait = greedy } } - knight_army ?= { - location.county = scope:county - } - NOT = { - has_trait = compassionate - } - marauder_attribute_trigger = no + save_scope_as = marauder + } + send_interface_message = { + type = msg_accolade_eligibility + title = accolade_marauder_unlock.t + left_icon = scope:marauder + right_icon = scope:recipient + custom_tooltip = accolade_marauder_unlock.tt + scope:marauder = { + set_variable = { + name = marauder_attribute_unlock + value = yes + } + } } } - random_knight = { - limit = { - OR = { - can_be_acclaimed = yes - accolade ?= { - accolade_can_have_more_attributes = yes + 10 = { # besieger + trigger = { + any_knight = { + OR = { + can_be_acclaimed = yes + accolade ?= { + accolade_can_have_more_attributes = yes + } + } + knight_army ?= { + location.county ?= scope:county + any_army_maa_regiment = { + is_unit_type = siege_weapon + } + } + besieger_attribute_trigger = no + } + } + random_knight = { + limit = { + OR = { + can_be_acclaimed = yes + accolade ?= { + accolade_can_have_more_attributes = yes + } + } + knight_army ?= { + location.county ?= scope:county + any_army_maa_regiment = { + is_unit_type = siege_weapon + } + } + besieger_attribute_trigger = no + } + weight = { + base = 1 + modifier = { + add = 60 + is_acclaimed = yes + } + modifier = { + add = 30 + has_trait = calm + } + modifier = { + add = 30 + has_trait = patient } } - knight_army ?= { - location.county = scope:county - } - NOT = { - has_trait = compassionate - } - marauder_attribute_trigger = no + save_scope_as = besieger } - weight = { - base = 1 - modifier = { - add = 60 - is_acclaimed = yes - } - modifier = { - add = 30 - has_trait = sadistic - } - modifier = { - add = 30 - has_trait = callous - } - modifier = { - add = 30 - has_trait = wrathful - } - modifier = { - add = 30 - has_trait = greedy - } + send_interface_message = { + type = msg_accolade_eligibility + title = accolade_besieger_unlock.t + left_icon = scope:besieger + right_icon = scope:recipient + custom_tooltip = accolade_besieger_unlock.tt + scope:besieger = { + set_variable = { + name = besieger_attribute_unlock + value = yes + } + } } - save_scope_as = marauder - } - send_interface_message = { - type = msg_accolade_eligibility - title = accolade_marauder_unlock.t - left_icon = scope:marauder - right_icon = scope:recipient - custom_tooltip = accolade_marauder_unlock.tt - scope:marauder = { - set_variable = { - name = marauder_attribute_unlock - value = yes - } - } } } - 10 = { # besieger - trigger = { - any_knight = { - OR = { - can_be_acclaimed = yes - accolade ?= { - accolade_can_have_more_attributes = yes - } - } - knight_army ?= { - location.county = scope:county - any_army_maa_regiment = { - is_unit_type = siege_weapon - } - } - besieger_attribute_trigger = no - } - } - random_knight = { - limit = { - OR = { - can_be_acclaimed = yes - accolade ?= { - accolade_can_have_more_attributes = yes - } - } - knight_army ?= { - location.county = scope:county - any_army_maa_regiment = { - is_unit_type = siege_weapon - } - } - besieger_attribute_trigger = no - } - weight = { - base = 1 - modifier = { - add = 60 - is_acclaimed = yes - } - modifier = { - add = 30 - has_trait = calm - } - modifier = { - add = 30 - has_trait = patient - } - } - save_scope_as = besieger - } - send_interface_message = { - type = msg_accolade_eligibility - title = accolade_besieger_unlock.t - left_icon = scope:besieger - right_icon = scope:recipient - custom_tooltip = accolade_besieger_unlock.tt - scope:besieger = { - set_variable = { - name = besieger_attribute_unlock - value = yes - } - } - } - } - } + } } scope:county = { if = { limit = { holder = { - NOT = { has_perk = enduring_hardships_perk } + NOT = { has_perk = a_mans_home_perk } } } change_county_control = county_control_loss_value @@ -413,7 +429,7 @@ on_siege_completion = { } } } - # If you have the Sacred Destruction tenet get piety/destroy development + # If you have the Sacred Destruction tenet get piety/destroy prosperity if = { limit = { rite = { rite_has_parameter = successful_sieges_give_piety } @@ -509,60 +525,88 @@ on_siege_completion = { army_commander ?= { if = { limit = { - has_trait = military_engineer is_commanding_army = yes location.barony = scope:barony } - add_trait_xp = { - trait = military_engineer - value = { - value = location.fort_level - divide = 2 - min = 1 - add = { - value = martial - divide = 20 + if = { + limit = { has_trait = military_engineer } + add_trait_xp = { + trait = military_engineer + value = { + value = location.fort_level + divide = 2 + min = 1 + add = { + value = martial + divide = 20 + } + } + } + } + if = { + limit = { has_trait = reaver } + add_trait_xp = { + trait = reaver + value = { + value = 0.2 + add = { + value = martial + divide = 20 + } + } + } + } + if = { + limit = { has_trait = peasant_leader } + add_trait_xp = { + trait = peasant_leader + value = { + value = 0.1 + add = { + value = martial + divide = 20 + } } } } } } - army_commander ?= { - if = { - limit = { - has_trait = reaver - is_commanding_army = yes - location.barony = scope:barony - } - add_trait_xp = { - trait = reaver - value = { - value = 0.2 - add = { - value = martial - divide = 20 + if = { + limit = { + army_owner = { + government_has_flag = government_has_merit + OR = { + this = root + AND = { + exists = scope:war + is_participant_in_war = scope:war + NOT = { is_at_war_with = root } } } } } - } - army_commander ?= { - if = { - limit = { - has_trait = peasant_leader - is_commanding_army = yes - } - add_trait_xp = { - trait = peasant_leader - value = { - value = 0.1 - add = { - value = martial - divide = 20 - } + save_temporary_scope_as = siege_army + army_commander ?= { + if = { + limit = { can_gain_military_career_merit_trigger = yes } + send_interface_message = { + type = msg_siege_effect + title = msg_military_merit_siege_won + left_icon = this + right_icon = scope:barony + change_merit = minor_merit_gain } } } + army_owner = { + every_knight = { + limit = { + knight_army ?= scope:siege_army + can_gain_military_career_merit_trigger = yes + } + change_merit = miniscule_merit_gain + } + } } } } @@ -642,50 +686,60 @@ on_siege_looting = { } effect = { - scope:barony.title_province ?= { - # Adventurer Siege replenish - every_army_in_location = { - limit = { - OR = { - AND = { - root = { is_landless_adventurer = yes } - army_owner = root - } - army_owner = { - is_landless_adventurer = yes - is_at_war = yes - any_war_ally = { this = root } - } - } - } - every_army_maa_regiment = { + save_scope_as = sieger + scope:barony = { + title_province ?= { + save_scope_as = siege_province + # Adventurer Siege replenish + every_army_in_location = { limit = { - maa_current_troops_count < maa_max_troops_count + OR = { + AND = { + root = { is_landless_adventurer = yes } + army_owner = root + } + army_owner = { + is_landless_adventurer = yes + is_at_war = yes + any_war_ally = { this = root } + } + } + } + every_army_maa_regiment = { + limit = { maa_current_troops_count < maa_max_troops_count } + change_maa_troops_count = adventurer_siege_replenish_amount } - change_maa_troops_count = adventurer_siege_replenish_amount } - } - # Strict Organization - every_army_in_location = { - limit = { - OR = { - AND = { - root = { + # Strict Organization + every_army_in_location = { + limit = { + OR = { + AND = { + root = { + is_landless_adventurer = yes + has_perk = strict_organization_perk + } + army_owner = root + } + army_owner = { is_landless_adventurer = yes has_perk = strict_organization_perk + is_at_war = yes + any_war_ally = { this = root } } - army_owner = root - } - army_owner = { - is_landless_adventurer = yes - has_perk = strict_organization_perk - is_at_war = yes - any_war_ally = { this = root } } } + army_owner.domicile ?= { change_provisions = adventurer_siege_provisions_amount } } - army_owner = { - domicile ?= { change_provisions = adventurer_siege_provisions_amount } + add_province_modifier = { + modifier = recently_looted_modifier + years = 5 + } + } + trade_market = { + add_trade_market_modifier = { + modifier = gdp_market_recently_sieged_capacity_modifier + years = 5 } } trade_market = { @@ -705,12 +759,9 @@ on_siege_looting = { } } } - #Gain some gold on top of the siege loot from the Master of Spoils Camp Officer if = { - limit = { - employs_court_position = master_of_spoils_camp_officer - } + limit = { employs_court_position = master_of_spoils_camp_officer } add_gold = { value = court_position:master_of_spoils_camp_officer.aptitude:master_of_spoils_camp_officer add = 1 @@ -762,12 +813,11 @@ on_army_enter_province = { 1 = epidemic_events.1120 # Corpse catapult event } effect = { + save_scope_as = army_owner # Commander trait leveling scope:army.army_commander ?= { if = { - limit = { - has_trait = logistician - } + limit = { has_trait = logistician } add_trait_xp = { trait = logistician value = { @@ -780,9 +830,7 @@ on_army_enter_province = { } } if = { - limit = { - has_trait = organizer - } + limit = { has_trait = organizer } add_trait_xp = { trait = organizer value = { @@ -1067,7 +1115,7 @@ on_raid_action_completion = { if = { limit = { holder = { - NOT = { has_perk = enduring_hardships_perk } + NOT = { has_perk = a_mans_home_perk } } } change_county_control = raid_county_control_loss_value @@ -1096,6 +1144,9 @@ on_raid_action_completion = { } every_in_list = { list = raid_targets + limit = { + NOT = { this = scope:raider } + } send_interface_message = { type = msg_raid_lost left_icon = scope:raider diff --git a/common/on_action/barter_on_actions.txt b/common/on_action/barter_on_actions.txt index ec88d4d64..52a674b71 100644 --- a/common/on_action/barter_on_actions.txt +++ b/common/on_action/barter_on_actions.txt @@ -34,7 +34,6 @@ on_barter_action_completion = { desc = msg_barter_completed_barterer_desc left_icon = scope:county.holder right_icon = scope:barony - show_as_tooltip = { add_loot = scope:value scope:barony = { diff --git a/common/on_action/death.txt b/common/on_action/death.txt index 7c8f323b5..bc9456e76 100644 --- a/common/on_action/death.txt +++ b/common/on_action/death.txt @@ -85,7 +85,7 @@ on_death = { is_ruler = yes top_liege != this has_variable = { - name = vassal_directive_improve_development + name = vassal_directive_improve_prosperity name = vassal_directive_train_commanders name = vassal_directive_build_maa name = vassal_directive_convert_faith @@ -97,7 +97,7 @@ on_death = { } primary_heir ?= { has_none_of_variables = { - name = vassal_directive_improve_development + name = vassal_directive_improve_prosperity name = vassal_directive_train_commanders name = vassal_directive_build_maa name = vassal_directive_convert_faith @@ -111,9 +111,9 @@ on_death = { } if = { limit = { - has_variable = vassal_directive_improve_development + has_variable = vassal_directive_improve_prosperity } - primary_heir ?= { set_variable = vassal_directive_improve_development } + primary_heir ?= { set_variable = vassal_directive_improve_prosperity } } else_if = { limit = { @@ -193,6 +193,12 @@ on_death = { famed_parent = scope:famous_parent } } + scope:new_memory = { + set_variable = { + name = parent_fame_lvl + value = scope:famous_parent.prestige_level + } + } trigger_event = { id = bp2_yearly.4010 days = 5 @@ -234,6 +240,12 @@ on_death = { pious_parent = scope:pious_parent } } + scope:new_memory = { + set_variable = { + name = parent_piety_lvl + value = scope:pious_parent.piety_level + } + } trigger_event = { id = bp2_yearly.4020 days = 10 @@ -314,6 +326,92 @@ on_death = { } } + # Dead character has debtors who their heir should inherit (make them have a money claim) + if = { + limit = { + any_in_list = { variable = owes_me_money } + } + save_scope_as = dead_lender + if = { # Reversed form of story_cycle_loan on_owner_death, but for the lender + limit = { primary_heir ?= { is_alive = yes } } + primary_heir = { save_scope_as = new_lender } + every_in_list = { + variable = owes_me_money + save_scope_as = debtor + every_owned_story = { + limit = { + story_type = story_cycle_loan + var:lender = scope:dead_lender + NOR = { + story_owner = scope:new_lender + var:lender = { is_player_heir_of = scope:new_lender } + } + } + save_scope_as = inherited_loan + scope:new_lender = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ho_debt_inherited_title + left_icon = scope:debtor + right_icon = scope:dead_lender + custom_description = { + text = ho_debt_inherited_lender_tt + subject = scope:debtor + object = scope:dead_lender + value = scope:inherited_loan.var:amount_owed + } + } + } + scope:debtor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ho_debt_inherited_title + left_icon = scope:new_lender + right_icon = scope:dead_lender + custom_description = { + text = ho_debt_inherited_debtor_tt + subject = scope:new_lender + object = scope:dead_lender + value = scope:inherited_loan.var:amount_owed + } + transfer_loan_effect = { + OLD_LOAN = scope:inherited_loan + NEW_LENDER = scope:new_lender + NEW_DEBTOR = scope:debtor + } + } + } + } + } + } + else = { # Wipe loans if you have no heir + every_in_list = { + variable = owes_me_money + every_owned_story = { + limit = { + story_type = story_cycle_loan + var:lender = scope:dead_lender + } + save_scope_as = wiped_loan + story_owner = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ho_debt_wiped_title + right_icon = scope:dead_lender + custom_description = { + text = ho_debt_wiped_debtor_tt + subject = this + object = scope:dead_lender + value = scope:wiped_loan.var:amount_owed + } + scope:wiped_loan = { end_loan_story_effect = yes } + } + } + } + } + } + } + if = { # Lower Grandeur a little bit on death limit = { has_royal_court = yes @@ -349,85 +447,79 @@ on_death = { # } # destroy_title = title:e_mongol_empire # } - - # Ludwig the Younger inherits East Francia and Karlmann Bavaria, as historically. - if = { - limit = { - # Make sure we're looking at the right guy & that the circumstances haven't changed too much. - this = character:90107 - highest_held_title_tier = tier_kingdom - has_realm_law = confederate_partition_succession_law - # Bavaria should be in a fit state for interfering with the handout order. - title:k_bavaria = { - OR = { - is_title_created = no - holder = root - } - any_in_de_jure_hierarchy = { - tier = tier_county - # More than 50%. - count >= 22 - holder = { - any_liege_or_above = { this = root } - } - } - } - NOT = { has_primary_title = title:k_bavaria } - NOT = { exists = designated_heir } - is_valid_designated_heir = character:42019 - } - set_designated_heir = character:42019 - } - else_if = { - limit = { - this = character:90107 - has_variable = ludwig_younger_designated_by_history - designated_heir ?= character:42019 - NAND = { - highest_held_title_tier = tier_kingdom - has_realm_law = confederate_partition_succession_law - title:k_bavaria = { - OR = { - is_title_created = no - holder = root - } - any_in_de_jure_hierarchy = { - tier = tier_county - count >= 22 - holder = { - any_liege_or_above = { this = root } - } - } - } - NOT = { has_primary_title = title:k_bavaria } - } - } - clear_designated_heir = yes - } - # Salzburg sits outside any de jure kingdom, so it would follow Ludwig the Younger into East Francia instead of going to Bavaria with Karlmann - if = { - limit = { - this = character:90107 - designated_heir ?= character:42019 - title:d_et_salzburg.holder ?= { is_vassal_of = root } - character:42018 ?= { - is_alive = yes - is_vassal_of = root - } - } - create_title_and_vassal_change = { - type = granted - save_scope_as = salzburg_change - add_claim_on_loss = no - } - title:d_et_salzburg.holder = { - change_liege = { - liege = character:42018 - change = scope:salzburg_change - } - } - resolve_title_and_vassal_change = scope:salzburg_change - } +# +# # Ludwig the Younger inherits East Francia and Karlmann Bavaria, as historically. +# if = { +# limit = { +# # Make sure we're looking at the right guy & that the circumstances haven't changed too much. +# this = character:90107 +# highest_held_title_tier = tier_kingdom +# has_realm_law = confederate_partition_succession_law +# # Bavaria should be in a fit state for interfering with the handout order. +# title:k_bavaria = { +# OR = { +# is_title_created = no +# holder = root +# } +# any_in_de_jure_hierarchy = { +# tier = tier_county +# # More than 50%. +# count >= 22 +# holder = { +# any_liege_or_above = { this = root } +# } +# } +# } +# NOT = { has_primary_title = title:k_bavaria } +# NOT = { exists = designated_heir } +# is_valid_designated_heir = character:42019 +# } +# set_designated_heir = character:42019 +# } +# else_if = { +# limit = { +# this = character:90107 +# has_variable = ludwig_younger_designated_by_history +# designated_heir ?= character:42019 +# NAND = { +# highest_held_title_tier = tier_kingdom +# has_realm_law = confederate_partition_succession_law +# title:k_bavaria = { +# OR = { +# is_title_created = no +# holder = root +# } +# any_in_de_jure_hierarchy = { +# tier = tier_county +# count >= 22 +# holder = { +# any_liege_or_above = { this = root } +# } +# } +# } +# NOT = { has_primary_title = title:k_bavaria } +# } +# } +# clear_designated_heir = yes +# } +# # Salzburg sits outside any de jure kingdom, so it would follow Ludwig the Younger into East Francia instead of going to Bavaria with Karlmann +# if = { +# limit = { +# this = character:90107 +# designated_heir ?= character:42019 +# title:d_et_salzburg.holder ?= { is_vassal_of = root } +# character:42018 ?= { +# is_alive = yes +# is_vassal_of = root +# } +# } +# character:42018 = { +# trigger_event = { +# on_action = ludwig_german_salzburg_to_karlmann +# days = 1 +# } +# } +# } # Diarchies ## Handle regency loyalties. @@ -567,7 +659,7 @@ on_death = { primary_heir = { save_scope_as = new_wedding_host } } if = { # If such an heir exists, copy all involved scopes, clean up, and recreate the promise on all relevant characters - limit = { + limit = { exists = scope:new_wedding_host has_variable = promised_grand_wedding_to } @@ -658,9 +750,9 @@ on_death = { # Send relevant event to player heir if = { limit = { - exists = player_heir exists = involved_activity is_travelling = yes + exists = player_heir # Tour has their own death invalidation event trigger_if = { limit = { @@ -1107,7 +1199,10 @@ on_death = { # Court position boon invalidation if = { - limit = { exists = var:booner_target } + limit = { + exists = var:booner_target + exists = employer + } employed_booner_invalidation_effect = { EMPLOYEE = root LIEGE = root.employer } } # Cleanup booner focus on dead courtiers @@ -2030,7 +2125,7 @@ on_death = { if = { limit = { OR = { - NOT = { + NOT = { player_heir = { has_variable = not_subject_to_succession_trials } } primary_title.tier > player_heir.primary_title.tier @@ -2174,7 +2269,7 @@ on_death = { } if = { limit = { is_playable_character = no } - set_player_character = top_liege.primary_title.var:administrative_ui_special_title.holder + set_player_character = ceremonial_liege } create_title_and_vassal_change = { type = appointment @@ -2183,7 +2278,7 @@ on_death = { random_held_title = { limit = { is_noble_family_title = yes } change_title_holder = { - holder = top_liege.primary_title.var:administrative_ui_special_title.holder + holder = ceremonial_liege change = scope:change } } @@ -2220,6 +2315,7 @@ on_death = { } } } + #Beatify dead order founders if = { limit = { @@ -2274,7 +2370,7 @@ on_death = { } if = { limit = { - primary_title = { + primary_title ?= { has_variable = founder var:founder = { is_alive = yes @@ -2338,6 +2434,7 @@ on_death = { else = { add_trait = saint } + #TODO_PAM_JC order should lose worldliness from its founder becoming a saint } #PAM - Holy Myron: the herb-gathering chaplain dies en route; inform whoever sent them if = { @@ -2704,6 +2801,29 @@ ce3_theocrat_dynasty_chain_succession = { } } +## Root = Karlmann, one day after Ludwig the German died with Ludwig the Younger as designated heir +## change_liege does nothing until Karlmann outranks the archbishop, so we wait until he is King of Bavaria +#ludwig_german_salzburg_to_karlmann = { +# trigger = { +# has_title = title:k_bavaria +# title:d_et_salzburg.holder ?= { is_vassal_of = character:42019 } +# } +# effect = { +# create_title_and_vassal_change = { +# type = granted +# save_scope_as = salzburg_change +# add_claim_on_loss = no +# } +# title:d_et_salzburg.holder = { +# change_liege = { +# liege = root +# change = scope:salzburg_change +# } +# } +# resolve_title_and_vassal_change = scope:salzburg_change +# } +#} + # Root = character # Triggered when someone is about to die from a natural death but is given a second chance by meeting # the has_natural_death_second_chance scripted rule diff --git a/common/on_action/game_start.txt b/common/on_action/game_start.txt index d778af174..459e1a87a 100644 --- a/common/on_action/game_start.txt +++ b/common/on_action/game_start.txt @@ -459,71 +459,31 @@ on_game_start = { } } - if = { - limit = { - government_has_mechanic = 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 } - } - - every_religion_global = { - every_faith = { - - limit = { - has_doctrine_parameter = holy_order_head_of_faith - } - - save_scope_as = holy_order_faith - - ordered_holy_site = { - limit = { - title_province.faith = { - has_doctrine_parameter = holy_order_head_of_faith - } - title_province.faith = scope:holy_order_faith - } - #position = 1 - title_province.county = { - if = { - limit = { - #any_county_province = { has_holding = no } - holder.faith = scope:holy_order_faith #{ has_doctrine_parameter = holy_order_head_of_faith } - } -# holder = { -# trigger_event = { id = N3OW_holy_order.0001 } -# } - } - } - } - } - } - #Dynamic Titles - character:benelux_oranje_nassau_weilburg_guillem = { + every_ruler = { if = { limit = { - is_alive = yes + government_has_mechanic = 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_powerful_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 } + } + } + } } - trigger_event = NEOW_dynamic_titles.0005 - trigger_event = NEOW_dynamic_titles.0009 - title:e_benelux = { set_coa = e_lotharingia } + create_noble_family_effect = { GOVERNMENT_GIVER = this } + domicile ?= { set_up_domicile_estate_effect = yes } } } + #title:d_piedmonte.holder = { # create_confederation = { # name = holy_lombard_league @@ -647,7 +607,7 @@ on_game_start = { vassal_contract_set_obligation_level = { type = japan_administrative_provinces level = 0 } set_subject_contract_modification_blocked = no } - title:c_buckingham.holder ?= { + title:c_buckinghamshire.holder ?= { vassal_contract_set_obligation_level = { type = japan_administrative_provinces level = 0 } set_subject_contract_modification_blocked = no } @@ -671,7 +631,7 @@ on_game_start = { vassal_contract_set_obligation_level = { type = japan_administrative_provinces level = 0 } set_subject_contract_modification_blocked = no } - title:d_bedford.holder ?= { + title:d_buckingham.holder ?= { vassal_contract_set_obligation_level = { type = japan_administrative_provinces level = 1 } set_subject_contract_modification_blocked = no } @@ -983,41 +943,6 @@ on_game_start = { } } } - every_religion_global = { - every_faith = { - - limit = { - has_doctrine_parameter = holy_order_head_of_faith - } - - save_scope_as = holy_order_faith - - ordered_holy_site = { - limit = { - title_province.faith = { - has_doctrine_parameter = holy_order_head_of_faith - } - title_province.faith = scope:holy_order_faith - } - #position = 1 - title_province.county = { - if = { - limit = { - #any_county_province = { has_holding = no } - holder.faith = scope:holy_order_faith #{ has_doctrine_parameter = holy_order_head_of_faith } - } -# holder = { -# trigger_event = { id = N3OW_holy_order.0001 } -# } - } - } - } - } - } - - - - # Silk & Silver: initialize NEOW merchant and republic rulers. every_independent_ruler = { if = { @@ -1179,32 +1104,20 @@ on_game_start = { has_cp3_dlc_trigger = yes } title:b_barcelona.title_province = { add_special_district_slot = drassanes_01_district } #1892 - title:b_merv.title_province = { add_special_district = kyz_kala_01_district } #4238 if = { limit = { game_start_date >= 1178.10.1 } title:b_cluny.title_province = { add_special_district = cluny_abbey_01_district special_district = { add_building = cluny_abbey_02 } } } #2304 else_if = { limit = { game_start_date >= 1066.9.15 } title:b_cluny.title_province = { add_special_district = cluny_abbey_01_district } } else = { title:b_cluny.title_province = { add_special_district_slot = cluny_abbey_01_district } } title:b_york.title_province = { add_special_district = york_walls_01_district } #1595 title:b_damascus.title_province = { add_special_district = damascus_mosque_01_district } #5924 - title:b_lhasa.title_province = { add_special_district = jokhang_01_district } #9237 if = { limit = { game_start_date >= 1178.10.1 } title:b_schmalkalden.title_province = { add_special_district = wartburg_01_district } } #3010 else = { title:b_schmalkalden.title_province = { add_special_district_slot = wartburg_01_district } } - title:b_lalibela.title_province = { add_special_district_slot = beta_giyorgis_01_district } #8301 if = { limit = { game_start_date >= 1066.9.15 } title:b_novgorod.title_province = { add_special_district = holy_wisdom_01_district } } #5137 else = { title:b_novgorod.title_province = { add_special_district_slot = holy_wisdom_01_district } } - title:b_kano.title_province = { add_special_district_slot = kano_walls_01_district } #6519 - title:b_somapur.title_province = { add_special_district = somapura_university_01_district } #848 if = { limit = { game_start_date >= 1178.10.1 } title:b_firenze.title_province = { add_special_district = duomo_florence_01_district } } #2543 else = { title:b_firenze.title_province = { add_special_district = duomo_florence_01_district } } - title:b_konarak.title_province = { add_special_district_slot = konark_temple_01_district } #928 - title:b_fes.title_province = { add_special_district = al_qarawiyyin_university_01_district } #4694 - title:b_kairouan.title_province = { add_special_district = kairouan_basins_01_district } #4594 - title:b_al-ghaba.title_province = { add_special_district = ghana_palace_01_district } #6628 #NOTE: likely existed since the 8th, but earliest (only) source on palace is from 1068 title:b_visegrad_hun.title_province = { add_special_district_slot = visegrad_castle_01_district } #3803 if = { limit = { game_start_date >= 1161.9.15 } title:b_leczyca.title_province = { add_special_district = wawel_cathedral_01_district } } #4924 #Date of consecreation of Archcollegiate Church of St. Mary and St. Alexius in Tum else = { title:b_leczyca.title_province = { add_special_district_slot = wawel_cathedral_01_district } } - title:b_vatapi.title_province = { add_special_district = vatapi_caves_01_district } #1198 - if = { limit = { game_start_date >= 1178.10.1 } title:b_jaisalmer.title_province = { add_special_district = jaisalmer_fort_01_district } } #3387 - else = { title:b_jaisalmer.title_province = { add_special_district_slot = jaisalmer_fort_01_district } } #3387 } # CP6 additions affecting the old world. Existing NEOW special district @@ -1336,22 +1249,6 @@ on_game_start = { # } # ### UNIVERSITIES ### - title:b_fes.title_province = { - if = { - limit = { - has_special_district_slot = no #Depends on DLC - } - add_special_district_slot = generic_university_district - } - } - title:b_somapur.title_province = { - if = { - limit = { - has_special_district_slot = no #Depends on DLC - } - add_special_district_slot = generic_university_district - } - } #title:b_bologna.title_province = { add_special_district_slot = generic_university_district } # Added in province history title:b_salamanca.title_province = { add_special_district_slot = generic_university_district } title:b_madrid.title_province = { add_special_district_slot = generic_university_district } @@ -1364,11 +1261,8 @@ on_game_start = { title:b_vienna.title_province = { add_special_district_slot = generic_university_district } title:b_praha.title_province = { add_special_district_slot = generic_university_district } title:b_perugia.title_province = { add_special_district_slot = generic_university_district } - title:b_malappuram.title_province = { add_special_district_slot = generic_university_district } - title:b_janakpur.title_province = { add_special_district_slot = generic_university_district } title:b_uppsala.title_province = { add_special_district_slot = generic_university_district } title:b_montlhery.title_province = { add_special_district_slot = generic_university_district } # Technically should be Paris, but that's occupied by Notre Dame - title:b_qartajana.title_province = { add_special_district_slot = generic_university_district } # Technically should be Tunis, but that's occupied by a cathedral title:b_wazwan.title_province = { add_special_district_slot = generic_university_district } # Technically should be Isfahan, but that's occupied by the Friday Mosque title:b_sarsar.title_province = { add_special_district_slot = generic_university_district } # Technically should be Baghdad, but that's occupied by the House of Wisdom title:b_speyer.title_province = { add_special_district_slot = generic_university_district } # 1350ish, should be in Heidelberg but that's a church @@ -1389,11 +1283,6 @@ on_game_start = { title:b_barcelona.title_province = { add_special_district_slot = generic_university_district } # 1450ish, but still fun to build } title:b_dumbarton.title_province = { add_special_district_slot = generic_university_district } # 1450ish, but still fun to build - title:b_bidar.title_province = { add_special_district_slot = generic_university_district } # 1450ish, but still fun to build - title:b_changsha.title_province = { - add_special_district_slot = generic_university_district - } - ### GREAT WALL OF CHINA ### # title:b_wulan.title_province = { add_great_building = the_great_wall_01 } @@ -1568,14 +1457,6 @@ on_game_start = { } } } - if = { - limit = { has_tgp_dlc_trigger = no } - title:k_yongson_throne ?= { - holder ?= { - destroy_title = prev - } - } - } every_ruler = { # PUT EVERY_RULER TYPE STUFF HERE FOR PERFORMANCE REASONS # Set up anyone who should be in a regency at start whether we have sources or not. ## If you start as a child, incapable, or imprisoned, you get a regency. @@ -1793,6 +1674,44 @@ on_game_start = { } } } + # GDP - merchant trait + if = { + limit = { + government_has_flag = government_is_merchant + NOT = { has_trait = lifestyle_merchant } + } + add_trait = lifestyle_merchant + add_trait_xp = { + trait = lifestyle_merchant + track = caravaneer + value = { + integer_range = { + min = small_lifestyle_random_xp_low + max = small_lifestyle_random_xp_high + } + } + } + add_trait_xp = { + trait = lifestyle_merchant + track = artisan + value = { + integer_range = { + min = small_lifestyle_random_xp_low + max = small_lifestyle_random_xp_high + } + } + } + add_trait_xp = { + trait = lifestyle_merchant + track = creditor + value = { + integer_range = { + min = small_lifestyle_random_xp_low + max = small_lifestyle_random_xp_high + } + } + } + } } # DYNASTIC CYCLE SETUP # situation:dynastic_cycle ?= { @@ -2794,13 +2713,10 @@ on_game_start = { } vassal_contract_has_modifiable_obligations = yes OR = { - faith = faith:genevan faith = faith:anglican_faith faith = faith:lutheran_faith - faith = faith:illuminated - faith = faith:carolingian - faith = faith:atlantean - faith = faith:volksmarchen + faith = faith:illuminated_faith + faith = faith:volksmarchen_faith } } vassal_contract_set_obligation_level = { type = religious_rights level = 1 } @@ -3130,7 +3046,6 @@ on_game_start_after_lobby = { save_scope_as = holder if = { limit = { - NOR = { liege = { government_has_flag = government_allows_nomad_domicile_titles } government_has_flag = government_allows_nomad_domicile_titles } NOT = { any_held_title = { is_nomad_title = yes @@ -3320,6 +3235,7 @@ on_game_start_after_lobby = { } every_knight = { limit = { + this != top_liege # the leaders of holy orders are knights is_councillor = no } make_councillor_start_up_effect = yes @@ -3432,27 +3348,10 @@ on_game_start_after_lobby = { else_if = { limit = { government_has_flag = government_is_herder + gold > 0 } - if = { - limit = { gold >= 30 } - remove_short_term_gold = 27 - } - else_if = { - limit = { gold >= 25 } - remove_short_term_gold = 22 - } - else_if = { - limit = { gold >= 20 } - remove_short_term_gold = 18 - } - else_if = { - limit = { gold >= 15 } - remove_short_term_gold = 11 - } - else_if = { - limit = { gold >= 10 } - remove_short_term_gold = 5 - } + remove_short_term_gold = gold + add_gold = { 1 10 } # We're fine with them having 10 gold max if = { @@ -3508,6 +3407,8 @@ on_game_start_after_lobby = { #Autopopulate families. if = { limit = { + culture ?= { always = yes } + faith ?= { always = yes } trigger_if = { limit = { has_game_rule = on_generate_families_ai_only @@ -3602,6 +3503,34 @@ on_game_start_after_lobby = { } } } + ### REPUBLIC SETUP ### + else_if = { + limit = { government_has_flag = government_is_republic } + # Hand out a family title to any republican who doesn't have one + if = { + limit = { + highest_held_title_tier >= tier_county + is_house_head = yes + NOT = { + any_held_title = { + is_noble_family_title = yes + } + } + } + save_scope_as = republican_founder + create_dynamic_title = { + name = NEW_PATRICIAN_TITLE_NAME + tier = county + type = title_type_merchant_family + holder = scope:republican_founder + article = DEFAULT_TITLE_NAME_ARTICLE + save_scope_as = new_patrician_title + } + scope:new_patrician_title ?= { + add_title_law = noble_family_succession_law + } + } + } # if = { # limit = { @@ -4582,6 +4511,7 @@ on_game_start_after_lobby = { limit = { has_game_rule = sexuality_distribution_default } if = { limit = { + has_sexuality = none is_adult = no age >= 10 } @@ -4591,6 +4521,7 @@ on_game_start_after_lobby = { every_courtier_or_guest = { if = { limit = { + has_sexuality = none is_adult = no age >= 10 } @@ -4622,6 +4553,7 @@ on_game_start_after_lobby = { list = pool_characters if = { limit = { + has_sexuality = none is_adult = no age >= 10 } @@ -4862,7 +4794,11 @@ on_game_start_after_lobby = { is_landed = no } } - convert_to_administrative_from_feudalism_game_start_effect = yes + if = { + limit = { government_has_flag = government_is_tribal } + convert_to_administrative_from_tribalism_game_start_effect = yes + } + else = { convert_to_administrative_from_feudalism_game_start_effect = yes } } } else_if = { @@ -4876,7 +4812,11 @@ on_game_start_after_lobby = { } has_trait = august } - convert_to_administrative_from_feudalism_game_start_effect = yes + if = { + limit = { government_has_flag = government_is_tribal } + convert_to_administrative_from_tribalism_game_start_effect = yes + } + else = { convert_to_administrative_from_feudalism_game_start_effect = yes } } } } @@ -5819,7 +5759,7 @@ on_game_start_after_lobby = { value = 10 desc = cultural_acceptance_historical_relations } - character:906 = { + character:906 ?= { every_held_title = { title_tier = county change_county_control = 100 @@ -7306,11 +7246,6 @@ on_game_start_after_lobby = { } culture:extremeno = { - change_cultural_acceptance = { - target = culture:extremeno - value = 30 - desc = cultural_acceptance_historical_relations - } change_cultural_acceptance = { target = culture:galician value = 30 @@ -7339,11 +7274,6 @@ on_game_start_after_lobby = { } culture:galician = { - change_cultural_acceptance = { - target = culture:galician - value = 30 - desc = cultural_acceptance_historical_relations - } change_cultural_acceptance = { target = culture:llanito value = 30 @@ -7367,11 +7297,6 @@ on_game_start_after_lobby = { } culture:llanito = { - change_cultural_acceptance = { - target = culture:llanito - value = 30 - desc = cultural_acceptance_historical_relations - } change_cultural_acceptance = { target = culture:NEOW_andalusian value = 30 @@ -7559,14 +7484,6 @@ on_game_start_after_lobby = { ##### heritage_arab ##### - culture:NEOW_syrian = { - change_cultural_acceptance = { - target = culture:NEOW_egyptian - value = 30 - desc = cultural_acceptance_historical_relations - } - } - ##### heritage_baltic ##### culture:latvian = { @@ -7636,11 +7553,6 @@ on_game_start_after_lobby = { value = 30 desc = cultural_acceptance_historical_relations } - change_cultural_acceptance = { - target = culture:NEOW_permian - value = 30 - desc = cultural_acceptance_historical_relations - } change_cultural_acceptance = { target = culture:NEOW_mari_el value = 30 @@ -7694,11 +7606,6 @@ on_game_start_after_lobby = { value = 30 desc = cultural_acceptance_historical_relations } - change_cultural_acceptance = { - target = culture:NEOW_permian - value = 30 - desc = cultural_acceptance_historical_relations - } change_cultural_acceptance = { target = culture:NEOW_mari_el value = 30 @@ -7747,11 +7654,6 @@ on_game_start_after_lobby = { value = 30 desc = cultural_acceptance_historical_relations } - change_cultural_acceptance = { - target = culture:NEOW_permian - value = 30 - desc = cultural_acceptance_historical_relations - } change_cultural_acceptance = { target = culture:NEOW_mari_el value = 30 @@ -7795,11 +7697,6 @@ on_game_start_after_lobby = { value = 30 desc = cultural_acceptance_historical_relations } - change_cultural_acceptance = { - target = culture:NEOW_permian - value = 30 - desc = cultural_acceptance_historical_relations - } change_cultural_acceptance = { target = culture:NEOW_mari_el value = 30 @@ -7838,11 +7735,6 @@ on_game_start_after_lobby = { value = 30 desc = cultural_acceptance_historical_relations } - change_cultural_acceptance = { - target = culture:NEOW_permian - value = 30 - desc = cultural_acceptance_historical_relations - } change_cultural_acceptance = { target = culture:NEOW_mari_el value = 30 @@ -7876,44 +7768,6 @@ on_game_start_after_lobby = { } culture:NEOW_udmurt = { - change_cultural_acceptance = { - target = culture:NEOW_permian - value = 30 - desc = cultural_acceptance_historical_relations - } - change_cultural_acceptance = { - target = culture:NEOW_mari_el - value = 30 - desc = cultural_acceptance_historical_relations - } - change_cultural_acceptance = { - target = culture:livonian - value = 30 - desc = cultural_acceptance_historical_relations - } - change_cultural_acceptance = { - target = culture:voroseto - value = 30 - desc = cultural_acceptance_historical_relations - } - change_cultural_acceptance = { - target = culture:estonian - value = 30 - desc = cultural_acceptance_historical_relations - } - change_cultural_acceptance = { - target = culture:kven - value = 30 - desc = cultural_acceptance_historical_relations - } - change_cultural_acceptance = { - target = culture:tornedalian - value = 30 - desc = cultural_acceptance_historical_relations - } - } - - culture:NEOW_permian = { change_cultural_acceptance = { target = culture:NEOW_mari_el value = 30 @@ -15031,28 +14885,6 @@ on_game_start_after_lobby = { ##### VANILLA CULTURES ##### - culture:vlach = { - change_cultural_acceptance = { - target = culture:serbian - value = 40 - desc = cultural_acceptance_historical_relations - } - change_cultural_acceptance = { - target = culture:croatian - value = 40 - desc = cultural_acceptance_historical_relations - } - change_cultural_acceptance = { - target = culture:bosnian - value = 40 - desc = cultural_acceptance_historical_relations - } - change_cultural_acceptance = { - target = culture:bulgarian - value = 40 - desc = cultural_acceptance_historical_relations - } - } culture:norse = { change_cultural_acceptance = { target = culture:sami @@ -15168,14 +15000,14 @@ on_game_start_after_lobby = { limit = { OR = { has_cultural_pillar = heritage_arabic - this = culture:yemeni } + NOT = { has_innovation = innovation_ghilman } } add_innovation = innovation_ghilman } } - ### EP3 SETUP ### + ### ADVENTURER STARTING CAMP PURPOSES ### if = { limit = { has_ep3_dlc_trigger = yes } ### EP3 LAAMP SETUP ### @@ -15610,10 +15442,11 @@ on_game_start_after_lobby = { # } # } every_independent_ruler = { + limit = { is_landless_adventurer = yes } if = { limit = { is_landless_adventurer = yes } # C... food. - domicile = { change_provisions = starting_provisions_value } + domicile ?= { change_provisions = starting_provisions_value } # Contracts if = { limit = { is_ai = no } @@ -15629,37 +15462,112 @@ on_game_start_after_lobby = { days = { 10 30 } } } - # Sort our starting flavourisation. + } + save_temporary_scope_as = adventurer_scope + # Set CoA + primary_title = { + set_coa = scope:adventurer_scope.house + set_variable = { name = adventurer_creation_reason value = flag:historical } + } + # Cleanup characters + every_councillor = { if = { - limit = { has_realm_law = camp_purpose_mercenaries } - set_variable = flavourise_camp_purpose_mercenaries + limit = { + NOR = { + has_council_position = councillor_court_chaplain + has_council_position = councillor_spouse + } + } + scope:adventurer_scope = { + fire_councillor = prev + } + remove_opinion = { + modifier = fired_from_council_opinion + target = scope:adventurer_scope + } } else_if = { - limit = { has_realm_law = camp_purpose_wanderers } - set_variable = flavourise_camp_purpose_wanderers - } - else_if = { - limit = { has_realm_law = camp_purpose_scholars } - set_variable = flavourise_camp_purpose_scholars - } - else_if = { - limit = { has_realm_law = camp_purpose_explorers } - set_variable = flavourise_camp_purpose_explorers - } - else_if = { - limit = { has_realm_law = camp_purpose_brigands } - set_variable = flavourise_camp_purpose_brigands - } - else_if = { - limit = { has_realm_law = camp_purpose_legitimists } - set_variable = flavourise_camp_purpose_legitimists - } - # And tally our numbers for performance purposes. - add_to_global_variable_list = { - name = laamps_tally - target = this.primary_title + limit = { + NOR = { + is_close_or_extended_family_of = prev + has_relation_lover = prev + has_relation_friend = prev + is_consort_of = prev + has_council_position = councillor_spouse + } + } + death = { + death_reason = death_vanished + } } } + # Evict everyone who isn't your family from your camp. + every_courtier = { + limit = { + prev = { save_temporary_scope_as = char_temp } + NOR = { + dynasty ?= scope:char_temp.dynasty + is_imprisoned_by = scope:char_temp + # Plus any relations, who are presumably meant to be here. + has_important_relationship_with_character_trigger = { CHARACTER = scope:char_temp } + # Catch bastards and such that may be left over. + is_close_or_extended_family_of = scope:char_temp + } + } + move_to_pool = yes + } + # Courtiers. + trigger_event = ep3_laamps.1001 + # C... food. + domicile ?= { change_provisions = starting_provisions_value } + # Contracts + if = { + limit = { is_ai = no } + # Set up additional firing contracts. + player_adventurer_contract_generation_on_wait_in_place_effect = yes + #generate contracts if you are far away from your previous location + player_adventurer_contract_generation_on_domicile_moved_effect = yes + } + else = { + create_story = { type = story_adventurer_ai } + trigger_event = { + on_action = on_adventurer_ai_new_employer_arrival + days = { 10 30 } + } + } + # Sort our starting flavourisation. + if = { + limit = { has_realm_law = camp_purpose_mercenaries } + set_variable = flavourise_camp_purpose_mercenaries + } + else_if = { + limit = { has_realm_law = camp_purpose_wanderers } + set_variable = flavourise_camp_purpose_wanderers + } + else_if = { + limit = { has_realm_law = camp_purpose_scholars } + set_variable = flavourise_camp_purpose_scholars + } + else_if = { + limit = { has_realm_law = camp_purpose_explorers } + set_variable = flavourise_camp_purpose_explorers + } + else_if = { + limit = { has_realm_law = camp_purpose_brigands } + set_variable = flavourise_camp_purpose_brigands + } + else_if = { + limit = { has_realm_law = camp_purpose_legitimists } + set_variable = flavourise_camp_purpose_legitimists + } + # And tally our numbers for performance purposes. + add_to_global_variable_list = { + name = laamps_tally + target = this.primary_title + } + } + if = { + limit = { has_ep3_dlc_trigger = yes } ### EP3 ADMIN SETUP ### if = { limit = { government_has_mechanic = administrative } @@ -15687,6 +15595,169 @@ on_game_start_after_lobby = { } } } + # Treasury setup for any government using treasury + if = { + limit = { government_allows = treasury } + tgp_treasury_setup_effect = yes + } + } + } + ### TGP MANDALA SETUP ### + if = { + limit = { + has_tgp_dlc_trigger = yes + government_has_flag = government_is_mandala + } + if = { + limit = { + is_ai = yes + highest_held_title_tier >= tier_kingdom + has_mandala_capital_trigger = yes + trigger_if = { + limit = { has_ruined_mandala_capital_trigger = yes } + less_than_max_amount_of_mandala_capitals_trigger = yes + } + } + create_story = story_mandala + } + } + if = { + limit = { has_gdp_dlc_trigger = yes } + ### GDP MERCHANT SETUP ### + if = { + limit = { government_has_flag = government_is_merchant } + # add_gold cannot be negative, so wipe then grant instead of (50 - gold). + if = { + limit = { gold > 0 } + remove_short_term_gold = gold + } + add_gold = 50 + if = { + limit = { prestige > 25 } + add_prestige = { + value = 25 + subtract = prestige + } + } + save_temporary_scope_as = merchant_scope + # Set CoA + primary_title = { + set_coa = scope:merchant_scope.house + set_variable = { name = merchant_creation_reason value = flag:historical } + set_variable = gdp_starting_merchant_company + } + random_held_title = { + limit = { is_noble_family_title = yes } + set_coa = holder.top_liege.house + } + # And tally our numbers for performance purposes. + add_to_global_variable_list = { + name = merchants_tally + target = this.primary_title + } + # Ruler-designer merchants spawn on the selected county; snap them to that market's capital. + if = { + limit = { + is_from_ruler_designer = yes + exists = location.barony.trade_market.trade_market_owner.title_province + } + location.barony.trade_market.trade_market_owner.title_province = { save_temporary_scope_as = merchant_market_capital } + random_held_title = { + limit = { is_noble_family_title = yes } + set_capital_county = scope:merchant_market_capital.county + } + domicile ?= { move_domicile = scope:merchant_market_capital } + set_location = scope:merchant_market_capital + } + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = domicile.domicile_location.county.holder # county holder + } + # Players start with a clean slate and build their company from the ground up. + if = { + limit = { + is_ai = no + } + add_character_flag = free_starting_merchant_purpose_change + if = { + limit = { + OR = { + has_realm_law = company_purpose_artisan + has_realm_law = company_purpose_caravaneer + has_realm_law = company_purpose_creditor + } + } + add_realm_law_skip_effects = company_purpose_family + merchant_company_law_remove_purpose_effect = yes + } + if = { + limit = { + OR = { + has_realm_law = company_size_medium + has_realm_law = company_size_large + has_realm_law = company_size_huge + } + } + add_realm_law_skip_effects = company_size_small + } + } + # Starting company purposes. + if = { + limit = { + is_ai = yes + NOR = { + has_realm_law = company_purpose_artisan + has_realm_law = company_purpose_caravaneer + has_realm_law = company_purpose_creditor + } + } + # Set some starting Company purposes + switch = { + trigger = highest_skill + learning = { add_realm_law_skip_effects = company_purpose_artisan } + diplomacy = { add_realm_law_skip_effects = company_purpose_caravaneer } + martial = { add_realm_law_skip_effects = company_purpose_creditor } + intrigue = { add_realm_law_skip_effects = company_purpose_creditor } + } + # Courtiers. + trigger_event = gdp_merchant.1001 + } + gdp_update_usury_reputation_effect = yes + trigger_event = gdp_merchant.1003 + + if = { + limit = { is_ai = yes } + set_starting_company_size_effect = yes + set_starting_company_acumen_effect = yes + } + } + ### GDP REPUBLIC SETUP ### + else_if = { + limit = { government_has_flag = government_is_republic } + every_noble_family = { + # Ensure Noble Family CoA match House + set_coa = holder.house + holder ?= { + # Consistent starting cash + if = { + limit = { gold > 0 } + remove_short_term_gold = gold + } + add_gold = 50 + save_scope_as = nf_holder + if = { + limit = { is_landed = yes } + capital_province = { save_scope_as = domicile_location } + } + # Ensure holders of historical noble family titles are the default house heads + house ?= { + if = { + limit = { house_head != scope:nf_holder } + set_house_head = scope:nf_holder + } + } + } + } } } } @@ -15786,7 +15857,6 @@ on_game_start_after_lobby = { ### DYNASTY TRACKING SETUP # NEOW 2555: inactive; corresponding historical scripted effect was disabled. japan_dynasty_tracker_setup_effect = yes - ### TGP NOBLE FAMILIES & DOMICILE SETUP ### # Required due to landless top liege title:e_britannia.holder ?= { @@ -16188,9 +16258,62 @@ on_game_start_after_lobby = { } fill_external_east_asian_estate_building_effect = yes } - ecclesiastical_domicile = { - fill_ecclesiastical_domicile_building_effect = yes + merchant_company = { + if = { + limit = { + owner = { government_has_flag = government_is_republic } + } + if = { + limit = { + has_domicile_building_or_higher = merchant_company_main_01 + NOT = { has_domicile_building_or_higher = merchant_company_main_02 } + } + add_domicile_building = merchant_company_main_02 + add_random_internal_main_company_building = yes + } + if = { + limit = { + has_domicile_building_or_higher = merchant_company_building_trade_01 + NOT = { has_domicile_building_or_higher = merchant_company_building_trade_02 } + } + add_domicile_building = merchant_company_building_trade_02 + add_random_internal_trade_company_building = yes + } + if = { + limit = { + has_domicile_building_or_higher = merchant_company_building_warehouse_01 + NOT = { has_domicile_building_or_higher = merchant_company_building_warehouse_02 } + } + add_domicile_building = merchant_company_building_warehouse_02 + add_random_internal_warehouse_company_building = yes + } + if = { + limit = { + has_domicile_building_or_higher = merchant_company_building_civic_01 + NOT = { has_domicile_building_or_higher = merchant_company_building_civic_02 } + } + add_domicile_building = merchant_company_building_civic_02 + add_random_internal_civic_company_building = yes + } + if = { + limit = { + has_domicile_building_or_higher = merchant_company_building_production_01 + NOT = { has_domicile_building_or_higher = merchant_company_building_production_02 } + } + add_domicile_building = merchant_company_building_production_02 + add_random_internal_production_company_building = yes + } + } } + ecclesiastical_domicile = { + if = { + limit = { owner ?= title:k_papal_state.holder } + add_domicile_building = episcopal_palace_01 + add_domicile_building = episcopal_palace_02 + add_domicile_building = church_treasury_01 + } + fill_ecclesiastical_domicile_building_effect = yes + } } } } @@ -16264,205 +16387,161 @@ on_game_start_after_lobby = { # NEOW 2555: inactive; corresponding historical scripted effect was disabled. brewery_counter_start_effect = yes } every_domicile = { - #if = { # Left in if we want adventurers to spawn with stuff - # limit = { - # is_domicile_type = camp - # } - # add_domicile_building = camp_main_02 - # add_domicile_building = camp_main_03 - # random_list = { - # 10 = { - # add_domicile_building = supply_tent_01 - # add_domicile_building = supply_tent_02 - # random_list = { - # 10 = { - # add_domicile_building = supply_tent_sutler - # } - # 10 = { - # add_domicile_building = supply_tent_mender - # } - # 10 = { - # add_domicile_building = supply_tent_smithy - # } - # 10 = { - # add_domicile_building = supply_tent_arsenal - # } - # } - # } - # 10 = { - # add_domicile_building = barber_tent_01 - # add_domicile_building = barber_tent_02 - # random_list = { - # 10 = { - # add_domicile_building = barber_tent_surgeons_tools - # } - # 10 = { - # add_domicile_building = barber_tent_dentists_tools - # } - # 10 = { - # add_domicile_building = barber_tent_torturers_tools - # } - # } - # } - # 10 = { - # add_domicile_building = baggage_train_01 - # add_domicile_building = baggage_train_02 - # random_list = { - # 10 = { - # add_domicile_building = baggage_train_ample_steeds - # } - # 10 = { - # add_domicile_building = baggage_train_porters - # } - # 10 = { - # add_domicile_building = baggage_train_trackers - # } - # 10 = { - # add_domicile_building = baggage_train_kennel - # } - # } - # } - # } - # random_list = { - # 10 = { - # add_domicile_building = mess_tent_01 - # add_domicile_building = mess_tent_02 - # random_list = { - # 10 = { - # add_domicile_building = mess_tent_herbalists - # } - # 10 = { - # add_domicile_building = mess_tent_brewers - # } - # 10 = { - # add_domicile_building = mess_tent_curers - # } - # 10 = { - # add_domicile_building = mess_tent_bakers - # } - # 10 = { - # add_domicile_building = mess_tent_cooks - # } - # } - # } - # 10 = { - # add_domicile_building = camp_fire_01 - # add_domicile_building = camp_fire_02 - # random_list = { - # 10 = { - # add_domicile_building = camp_fire_trailing_musicians - # } - # 10 = { - # add_domicile_building = camp_fire_wandering_poets - # } - # 10 = { - # add_domicile_building = camp_fire_capering_fools - # } - # 10 = { - # add_domicile_building = camp_fire_libations_for_the_lost - # } - # } - # } - # } - # random_list = { - # 10 = { - # add_domicile_building = camp_perimeter_01 - # add_domicile_building = camp_perimeter_02 - # random_list = { - # 10 = { - # add_domicile_building = camp_perimeter_good_siting - # } - # 10 = { - # add_domicile_building = camp_perimeter_fixed_layout - # } - # } - # } - # 10 = { - # add_domicile_building = proving_grounds_01 - # add_domicile_building = proving_grounds_02 - # } - # } - #} - every_domicile = { - limit = { exists = owner } - switch = { - trigger = is_domicile_type - estate = { - if = { - limit = { - NOT = { has_domicile_building_or_higher = estate_main_02 } - owner.culture ?= { has_innovation = innovation_city_planning } - } - add_domicile_building = estate_main_02 + limit = { exists = owner } + switch = { + trigger = is_domicile_type + estate = { + if = { + limit = { + NOT = { has_domicile_building_or_higher = estate_main_02 } + owner.culture ?= { has_innovation = innovation_city_planning } + } + add_domicile_building = estate_main_02 + add_random_internal_estate_building = yes + } + 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 + while = { + count = 2 add_random_internal_estate_building = yes } - 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 - while = { - count = 2 - add_random_internal_estate_building = yes - } - } - fill_external_estate_building_effect = yes } - japanese_manor = { - 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 + fill_external_estate_building_effect = yes + } + japanese_manor = { + 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 + add_random_internal_japanese_manor_building = yes + } + 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 + while = { + count = 2 add_random_internal_japanese_manor_building = yes } - 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 - while = { - count = 2 - add_random_internal_japanese_manor_building = yes - } - } - fill_external_japanese_manor_building_effect = yes } - east_asian_estate = { - 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 + fill_external_japanese_manor_building_effect = yes + } + east_asian_estate = { + 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 + add_random_internal_east_asian_estate_building = yes + } + 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 + while = { + count = 2 add_random_internal_east_asian_estate_building = yes } - 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 - while = { - count = 2 - add_random_internal_east_asian_estate_building = yes - } - } - fill_external_east_asian_estate_building_effect = yes } - ecclesiastical_domicile = { - fill_ecclesiastical_domicile_building_effect = yes + fill_external_east_asian_estate_building_effect = yes + } + merchant_company = { + # Set up internal buildings and other upgrades. Initial external buildings come from the domicile type + if = { + limit = { + has_domicile_building_or_higher = merchant_company_main_01 + NOT = { has_domicile_building_or_higher = merchant_company_main_02 } + } + add_domicile_building = merchant_company_main_02 + add_random_internal_main_company_building = yes + } + if = { + limit = { + has_domicile_building_or_higher = merchant_company_building_trade_01 + NOT = { has_domicile_building_or_higher = merchant_company_building_trade_02 } + } + add_domicile_building = merchant_company_building_trade_02 + add_random_internal_trade_company_building = yes + } + if = { + limit = { + has_domicile_building_or_higher = merchant_company_building_warehouse_01 + NOT = { has_domicile_building_or_higher = merchant_company_building_warehouse_02 } + } + add_domicile_building = merchant_company_building_warehouse_02 + add_random_internal_warehouse_company_building = yes + } + if = { + limit = { + has_domicile_building_or_higher = merchant_company_building_civic_01 + NOT = { has_domicile_building_or_higher = merchant_company_building_civic_02 } + } + add_domicile_building = merchant_company_building_civic_02 + add_random_internal_civic_company_building = yes + } + if = { + limit = { + has_domicile_building_or_higher = merchant_company_building_production_01 + NOT = { has_domicile_building_or_higher = merchant_company_building_production_02 } + } + add_domicile_building = merchant_company_building_production_02 + add_random_internal_production_company_building = yes } } + ecclesiastical_domicile = { + if = { + limit = { owner ?= title:k_papal_state.holder } + add_domicile_building = episcopal_palace_01 + add_domicile_building = episcopal_palace_02 + add_domicile_building = church_treasury_01 + add_domicile_building = church_archives_01 + } + fill_ecclesiastical_domicile_building_effect = yes + } } } } + else = { + every_province = { + limit = { + has_holding = yes + } + generate_building = yes + } + } + # Companies that start Large or Huge get main and external buildings one level below their size + every_domicile = { + limit = { + is_domicile_type = merchant_company + owner ?= { + OR = { + has_realm_law = company_size_large + has_realm_law = company_size_huge + } + } + } + gdp_raise_starting_company_buildings_effect = { FROM = 01 TO = 02 } + if = { + limit = { + owner = { has_realm_law = company_size_huge } + } + gdp_raise_starting_company_buildings_effect = { FROM = 02 TO = 03 } + } + } # Purge family titles if Admin isn't enabled if = { limit = { @@ -16610,6 +16689,14 @@ on_game_start_after_lobby = { } } + every_player = { + limit = { + government_has_flag = government_is_republic + is_landed = no + } + trigger_event = gdp_merchant.1004 + } + every_independent_ruler = { # Treasury setup for any government using treasury tgp_treasury_setup_effect = yes @@ -16625,47 +16712,6 @@ on_game_start_after_lobby = { 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 = { @@ -16745,6 +16791,56 @@ on_game_start_after_lobby = { } } + every_player = { + if = { + limit = { + government_has_flag = government_is_republic + } + house = { + set_house_aspiration = { type = republic_no_ambition } + } + } + gdp_trade_envoys_resume_idle_traders_effect = yes + } + + # Routes are set up before this on-action, so expertise can follow a traded good + if = { + limit = { has_global_variable_list = merchants_tally } + every_in_global_list = { + variable = merchants_tally + limit = { + NOT = { + any_trade_good_category = { + has_trade_good_category_xp_track = yes + save_temporary_scope_as = existing_expertise_category + prev = { + trade_good_category_xp = { + target = scope:existing_expertise_category + value > 0 + } + } + } + } + } + set_starting_trade_expertise_effect = yes + } + } + + if = { + limit = { has_global_variable_list = merchants_tally } + set_global_variable = { + name = merchant_company_starting_count + value = { + value = 0 + every_in_global_list = { + variable = merchants_tally + add = 1 + } + } + } + } + + # Keep everything below at the end of this block, as it needs the finished setup # Sanity check the setup if in debug mode if = { limit = { diff --git a/common/on_action/inventory_on_actions.txt b/common/on_action/inventory_on_actions.txt index bb4c871ad..39a3f1e34 100644 --- a/common/on_action/inventory_on_actions.txt +++ b/common/on_action/inventory_on_actions.txt @@ -482,6 +482,7 @@ on_holy_site_artifact_removed = { custom = every_zealot_fellow_vassal vassal_stance = zealot limit = { + this != scope:actor faith = scope:actor.faith } add_opinion = { diff --git a/common/on_action/province_on_actions.txt b/common/on_action/province_on_actions.txt index dda3ec891..123363b12 100644 --- a/common/on_action/province_on_actions.txt +++ b/common/on_action/province_on_actions.txt @@ -373,6 +373,7 @@ on_building_completed = { scope:character = { every_character_struggle = { involvement = involved + limit = { phase_has_catalyst = catalyst_new_building_in_castle } activate_struggle_catalyst = { catalyst = catalyst_new_building_in_castle character = scope:character @@ -393,6 +394,7 @@ on_building_completed = { scope:character = { every_character_struggle = { involvement = involved + limit = { phase_has_catalyst = catalyst_new_building_in_city } activate_struggle_catalyst = { catalyst = catalyst_new_building_in_city character = scope:character @@ -413,6 +415,7 @@ on_building_completed = { scope:character = { every_character_struggle = { involvement = involved + limit = { phase_has_catalyst = catalyst_new_building_in_temple } activate_struggle_catalyst = { catalyst = catalyst_new_building_in_temple character = scope:character @@ -736,9 +739,6 @@ on_building_completed = { years = 30 } } - - # Brewery counter - brewery_counter_effect = yes # Coronation Promise if = { diff --git a/common/on_action/religion_on_actions.txt b/common/on_action/religion_on_actions.txt index 60bbf0078..ee9ec81f7 100644 --- a/common/on_action/religion_on_actions.txt +++ b/common/on_action/religion_on_actions.txt @@ -739,6 +739,7 @@ on_rite_edited = { # Root is the converted character # scope:old_faith is the faith they used to have # scope:old_rite is the rite they used to have +# scope:actor is the character instigating the conversion # scope:founder is the character instigating the conversion on_faith_conversion = { events = { @@ -901,6 +902,10 @@ on_faith_conversion = { SPONSOR = root FAITH = scope:old_faith } +# #Remove Pope-specific GG modifiers +# gg_clean_up_pope_modifiers_effect = yes +# # Christian Situation participation management +# pam_conversion_christian_church_participation_effect = yes } } @@ -1186,7 +1191,10 @@ on_rite_change = { } pam_destroy_cardinal_title_effect = { CARDINALATE = clerical_elector_title } } - +# #Remove Pope-specific GG modifiers +# gg_clean_up_pope_modifiers_effect = yes +# # Christian Situation participation management +# pam_conversion_christian_church_participation_effect = yes } events = { faith_conversion.0001 # convert capital @@ -1236,8 +1244,8 @@ on_faith_monthly = { chance = 4 # Roughly once every 2 years every_faith_rite = { limit = { - exists = var:converted_development - var:converted_development >= 1 + exists = var:converted_prosperity + var:converted_prosperity >= 1 NOT = { rite_has_parameter = unreformed } @@ -1245,7 +1253,7 @@ on_faith_monthly = { save_scope_as = target_rite # Save all suitable rulers random = { - chance = var:converted_development + chance = var:converted_prosperity save_scope_as = faith_target every_independent_ruler = { limit = { @@ -1315,7 +1323,7 @@ on_faith_monthly = { } add_to_list = migration_targets } - # If the rite is still large, they only want to move to same-rite rulers + # If the faith is still large, they only want to move to same-rite rulers if = { limit = { scope:target_rite = { @@ -1347,11 +1355,11 @@ on_faith_monthly = { highest_held_title_tier >= tier_kingdom } modifier = { - add = scope:target_rite.var:converted_development + add = scope:target_rite.var:converted_prosperity NOT = { government_has_flag = government_is_nomadic } any_sub_realm_county = { count >= { - value = scope:target_rite.var:converted_development + value = scope:target_rite.var:converted_prosperity divide = 2 } rite = scope:target_rite @@ -1440,11 +1448,12 @@ on_faith_monthly = { highest_held_title_tier >= tier_kingdom } modifier = { - add = scope:target_rite.var:converted_development + add = scope:target_rite.var:converted_prosperity NOT = { government_has_flag = government_is_nomadic } any_sub_realm_county = { count >= { - value = scope:target_rite.var:converted_development + value = scope:target_rite.var:converted_prosperity + divide = 2 } faith = prev.faith @@ -1485,6 +1494,7 @@ faith_holy_order_land_acquisition_pulse = { subtract = 5 } every_ruler = { + faith_filter = root limit = { holy_order_1000_request_target_trigger = yes } @@ -1567,6 +1577,7 @@ faith_heresy_events_pulse = { pagan_conversion_pulse = { trigger = { #Is the character ready to convert? is_ai = yes + government_has_flag = government_is_tribal OR = { top_liege = this AND = { # Steppe people convert a bit more often & freely @@ -1574,7 +1585,6 @@ pagan_conversion_pulse = { primary_title.tier >= tier_duchy } } - government_has_flag = government_is_tribal OR = { has_realm_law = tribal_authority_2 has_realm_law = tribal_authority_3 @@ -1624,7 +1634,7 @@ pagan_conversion_pulse = { has_innovation = innovation_casus_belli has_innovation = innovation_plenary_assemblies has_innovation = innovation_ledger - has_innovation = innovation_development_01 + has_innovation = innovation_prosperity_01 has_innovation = innovation_currency_01 } } @@ -1750,7 +1760,13 @@ on_personal_tenet_loss = { is_ai = no NOT = { has_fulfillment_parameter = default_sf_personal_tenet_change_no_stress } } - add_stress = major_stress_gain + if = { + limit = { culture = { has_cultural_parameter = civic_religion_reduced_tenet_change_stress } } + add_stress = medium_stress_gain + } + else = { + add_stress = major_stress_gain + } } hedonistic_obesity_modifier_sync_effect = yes if = { @@ -1821,11 +1837,11 @@ update_main_rite_action = { # Faith Rite Growth System # ############################ -# Faith scope. Once a month per faith. -# Slowly spawns new rites until the faith reaches its target rite count: floor(counties / X) - 1 -# branched rites besides the mainline, so the first branched rite arrives at 2 * X counties. -# Cooldown and target count live in game/common/script_values/02_religion_values.txt. +# Faith scope, once a month per faith +# Cooldown and target count are in 02_religion_values.txt +# Slowly spawns new rites until the faith reaches its target of floor(counties / X) - 1 branched rites besides the mainline +# So the first branched rite arrives at 2 * X counties faith_rite_growth_pulse = { trigger = { NOR = { @@ -1991,7 +2007,7 @@ on_character_holy_site_created = { effect = { # Same holy-site slot rules as game start scope:title.title_province = { - add_holy_site_fallback_special_building_slot_effect = { FAITH = scope:faith } + add_holy_site_fallback_special_district_slot_effect = { FAITH = scope:faith } } hidden_effect = { if = { diff --git a/common/on_action/title_on_actions.txt b/common/on_action/title_on_actions.txt index 67099d42f..3f199b2f3 100644 --- a/common/on_action/title_on_actions.txt +++ b/common/on_action/title_on_actions.txt @@ -21,6 +21,7 @@ # flag:faction_demand # flag:swear_fealty # flag:stepped_down +# flag:term_end # flag:appointment # flag:appointment_succession # flag:migration @@ -61,6 +62,7 @@ on_title_destroyed = { if = { limit = { + is_ruler = yes government_has_mechanic = administrative top_liege = this administrative_counts_can_be_independent = no @@ -88,6 +90,19 @@ on_title_destroyed = { target = scope:landed_title } } + # Adjust the size of the merchants tally. + else_if = { + limit = { + # Pre-filter out anything higher or lower. + scope:landed_title = { tier = tier_county } + has_global_variable_list = merchants_tally + } + # We don't need to check the list twice, since if they're not in it then removing them from it won't do anything. + remove_list_global_variable = { + name = merchants_tally + target = scope:landed_title + } + } # Empire Faith Gate: remove holder from empire-holders list when they lose their last empire. else_if = { limit = { @@ -232,6 +247,20 @@ on_title_destroyed = { } } + if = { + limit = { scope:landed_title = { is_noble_family_title = yes } } + hanseatic_sync_family_head_benefits_effect = { CHARACTER = root } + } + if = { + limit = { + scope:landed_title = { + tier = tier_county + is_noble_family_title = no + } + } + hanseatic_sync_county_benefits_effect = { COUNTY = scope:landed_title } + } + ######### # PAM # ######### @@ -249,6 +278,76 @@ on_title_destroyed = { } } +# A realm ruler's term has ended and the ruler for the next term has been decided (e.g. a republican election at term end) +# Fired from code later the same day. If the realm changed hands, on_title_gain has already fired with scope:transfer_type = flag:term_end +# root = the realm ruler for the next term +# scope:title = the primary title of the realm +# scope:previous_holder = the ruler whose term ended +# scope:new_holder = the realm ruler for the next term. Same as scope:previous_holder if they kept the realm (e.g. were re-elected) +# Does *not* provide scope:transfer_type +on_term_ended = { + on_actions = { on_term_ended_events } + effect = { + if = { + limit = { scope:previous_holder = scope:new_holder } + every_player = { + limit = { + OR = { + this = root + is_vassal_or_below_of = root + } + } + if = { + limit = { this = root } + send_interface_toast = { + type = event_toast_effect_good + title = term_ended_reelected_toast_self + left_icon = scope:title + custom_tooltip = term_ended_reelected_toast_self.desc + } + } + else = { + send_interface_toast = { + type = event_toast_effect_neutral + title = term_ended_reelected_toast + left_icon = scope:new_holder + right_icon = scope:title + custom_tooltip = term_ended_reelected_toast.desc + } + } + } + } + } +} + +on_term_ended_events = { + effect = { + if = { + limit = { scope:previous_holder = scope:new_holder } + # Re-elected (root) + scope:title ?= { + every_full_assembly_member = { + limit = { + is_ai = no + } + trigger_event = republic_event.0051 + } + } + } + else = { + # Elected (root = winner) + scope:title ?= { + every_full_assembly_member = { + limit = { + is_ai = no + } + trigger_event = republic_event.0050 + } + } + } + } +} + # A title is transferred to a new character # root = the new holder # scope:title = the title that changes hands @@ -310,19 +409,44 @@ on_title_gain = { if = { limit = { clerical_elector_title ?= scope:title } pam_strip_illegal_cardinalate_effect = yes + if = { + limit = { clerical_elector_title ?= scope:title } + add_character_flag = cardinal_flag + situation:the_christian_church ?= { + add_manual_participant = prev + } + } + # Also catches a sitting Head of Faith who is handed a cardinalate + pam_vacate_head_of_faith_cardinalate_effect = yes + } + # A cardinal handed the Church seat must vacate the cardinalate + else_if = { + limit = { + scope:title = { + OR = { + is_head_of_faith = yes + this = title:k_papal_state + } + } + } + pam_vacate_head_of_faith_cardinalate_effect = yes } if = { - limit = { - exists = clerical_elector_title - scope:title = clerical_elector_title - } - add_character_flag = cardinal_flag - situation:the_christian_church ?= { - add_manual_participant = prev - } - } - # Unconditional: also catches a sitting Head of Faith who is handed a cardinalate - pam_vacate_head_of_faith_cardinalate_effect = yes + limit = { + scope:transfer_type = flag:election + government_has_flag = government_is_republic + } + scope:title = { + every_full_assembly_member = { + if = { + limit = { + has_character_modifier = gdp_popular_mandate_modifier + } + remove_character_modifier = gdp_popular_mandate_modifier + } + } + } + } if = { limit = { scope:transfer_type = flag:election @@ -402,10 +526,19 @@ on_title_gain = { add_realm_law_skip_effects = theocratic_elective_succession_law } } + if = { + limit = { + scope:title = { is_head_of_faith = yes } + should_use_theocratic_elective_succession_law_trigger = yes + NOT = { has_realm_law = theocratic_elective_succession_law } + } + add_realm_law_skip_effects = theocratic_elective_succession_law + } # Move a county+ Realm Priest Puppet to Clerical Ruler while the puppeteer slot is still free if = { limit = { is_clergy = yes + government_has_flag = government_is_theocracy scope:title.tier >= tier_county highest_held_title_tier = scope:title.tier exists = puppeteer @@ -416,27 +549,32 @@ on_title_gain = { scope:previous_holder ?= { if = { limit = { - NOT = { exists = clerical_elector_title } is_alive = yes } - remove_character_flag = cardinal_flag - } - if = { - limit = { - is_alive = yes - OR = { - scope:title = { has_clerical_region = yes } - root.clerical_elector_title ?= scope:title - } - NOR = { - exists = clerical_elector_title - any_held_title = { has_clerical_region = yes } + if = { + limit = { + NOT = { + exists = clerical_elector_title + } } + remove_character_flag = cardinal_flag } - situation:the_christian_church ?= { - if = { - limit = { is_manual_participant = prev } - remove_manual_participant = prev + if = { + limit = { + OR = { + scope:title = { has_clerical_region = yes } + root.clerical_elector_title ?= scope:title + } + NOR = { + exists = clerical_elector_title + any_held_title = { has_clerical_region = yes } + } + } + situation:the_christian_church ?= { + if = { + limit = { is_manual_participant = prev } + remove_manual_participant = prev + } } } } @@ -488,7 +626,6 @@ on_title_gain = { KIND = flag:archbishop } } - # PAM - a Christian prelate takes a landed title outside the clerical regions pam_the_christian_church_clergy_gained_landed_title_catalyst_effect = yes #if = { @@ -1092,6 +1229,7 @@ on_title_gain = { if = { limit = { scope:title = { is_landless_type_title = no } + highest_held_title_tier >= tier_duchy any_held_title = { title_tier = duchy has_variable = adventurer_creation_reason @@ -1152,6 +1290,16 @@ on_title_gain = { change_government = top_liege.government_type } } + + if = { + limit = { + is_landed = no + exists = scope:title.title_domicile + location != default_location + should_in_default_location_trigger = yes + } + set_location_to_default = yes + } } ##################### # DUCHY-TIER TITLES # @@ -1191,53 +1339,41 @@ on_title_gain = { } # Transfer title-bound artifacts with the title it's associated with (This is present in two places in this on_action) - if = { - limit = { - scope:previous_holder ?= { - any_character_artifact = { - has_variable = artifact_succession_title #Is this an artifact that should follow a title? - var:artifact_succession_title = { is_title_created = yes } #Does the title the artifact should follow exist? - var:artifact_succession_title = scope:title #Scope title is the artifact title + scope:previous_holder ?= { + every_character_artifact = { + limit = { + var:artifact_succession_title ?= scope:title + scope:title = { is_title_created = yes } + } + if = { + limit = { + OR = { + scope:transfer_type = flag:conquest + scope:transfer_type = flag:conquest_holy_war + scope:transfer_type = flag:conquest_claim + scope:transfer_type = flag:conquest_populist + scope:transfer_type = flag:abdication + scope:transfer_type = flag:usurped + scope:transfer_type = flag:revoked + scope:transfer_type = flag:faction_demand + } + } + set_owner = { + target = root + history = { + type = conquest + actor = scope:previous_holder + recipient = root + location = scope:previous_holder.location + } } } - } - scope:previous_holder = { - every_character_artifact = { - limit = { - has_variable = artifact_succession_title #Is this an artifact that should follow a title? - var:artifact_succession_title = { is_title_created = yes } #Does the title the artifact should follow exist? - var:artifact_succession_title = scope:title #Scope title is the artifact title - } - if = { - limit = { - OR = { - scope:transfer_type = flag:conquest - scope:transfer_type = flag:conquest_holy_war - scope:transfer_type = flag:conquest_claim - scope:transfer_type = flag:conquest_populist - scope:transfer_type = flag:abdication - scope:transfer_type = flag:usurped - scope:transfer_type = flag:revoked - scope:transfer_type = flag:faction_demand - } - } - set_owner = { - target = root - history = { - type = conquest - actor = scope:previous_holder - recipient = root - location = scope:previous_holder.location - } - } - } - else = { - set_owner = { - target = root - history = { - type = inherited - recipient = root - } + else = { + set_owner = { + target = root + history = { + type = inherited + recipient = root } } } @@ -1416,7 +1552,10 @@ on_title_gain = { ##################### # KING+ TIER TITLES # ##################### - else = { + else_if = { + limit = { + scope:title.tier >= tier_kingdom + } # Newly formed Hegemon of China should spruce up their council # if = { # limit = { @@ -1448,7 +1587,7 @@ on_title_gain = { limit = { OR = { exists = scope:title.var:ceremonial_title - top_liege.primary_title.var:administrative_ui_special_title ?= scope:title + ceremonial_liege_title ?= scope:title } } if = { @@ -1513,53 +1652,41 @@ on_title_gain = { } } # Transfer title-bound artifacts with the title it's associated with (This is present in two places in this on_action) - if = { - limit = { - scope:previous_holder ?= { - any_character_artifact = { - has_variable = artifact_succession_title #Is this an artifact that should follow a title? - var:artifact_succession_title = { is_title_created = yes } #Does the title the artifact should follow exist? - var:artifact_succession_title = scope:title #Scope title is the artifact title + scope:previous_holder ?= { + every_character_artifact = { + limit = { + var:artifact_succession_title ?= scope:title + scope:title = { is_title_created = yes } + } + if = { + limit = { + OR = { + scope:transfer_type = flag:conquest + scope:transfer_type = flag:conquest_holy_war + scope:transfer_type = flag:conquest_claim + scope:transfer_type = flag:conquest_populist + scope:transfer_type = flag:abdication + scope:transfer_type = flag:usurped + scope:transfer_type = flag:revoked + scope:transfer_type = flag:faction_demand + } + } + set_owner = { + target = root + history = { + type = conquest + actor = scope:previous_holder + recipient = root + location = scope:previous_holder.location + } } } - } - scope:previous_holder = { - every_character_artifact = { - limit = { - has_variable = artifact_succession_title #Is this an artifact that should follow a title? - var:artifact_succession_title = { is_title_created = yes } #Does the title the artifact should follow exist? - var:artifact_succession_title = scope:title #Scope title is the artifact title - } - if = { - limit = { - OR = { - scope:transfer_type = flag:conquest - scope:transfer_type = flag:conquest_holy_war - scope:transfer_type = flag:conquest_claim - scope:transfer_type = flag:conquest_populist - scope:transfer_type = flag:abdication - scope:transfer_type = flag:usurped - scope:transfer_type = flag:revoked - scope:transfer_type = flag:faction_demand - } - } - set_owner = { - target = root - history = { - type = conquest - actor = scope:previous_holder - recipient = root - location = scope:previous_holder.location - } - } - } - else = { - set_owner = { - target = root - history = { - type = inherited - recipient = root - } + else = { + set_owner = { + target = root + history = { + type = inherited + recipient = root } } } @@ -2033,14 +2160,14 @@ on_title_gain = { remove_character_flag = ceremonial_liege_flag remove_character_flag = ceremonial_regent_flag } - top_liege.primary_title.var:administrative_ui_special_title.holder ?= { + ceremonial_liege ?= { remove_character_flag = ceremonial_liege_flag remove_character_flag = ceremonial_regent_flag } if = { limit = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler add_character_flag = ceremonial_regent_flag - top_liege.primary_title.var:administrative_ui_special_title.holder ?= { add_character_flag = ceremonial_liege_flag } + ceremonial_liege ?= { add_character_flag = ceremonial_liege_flag } } } # West Francia becomes France when no longer controlled by a Karling @@ -2380,6 +2507,7 @@ on_title_gain = { is_house_head = no NOT = { exists = confederation } exists = house.house_head.confederation + house.house_head.confederation = { is_house_based = no } liege = house.house_head.liege is_at_war = no } @@ -2391,6 +2519,7 @@ on_title_gain = { limit = { government_is_japanese_trigger = yes is_house_head = yes + scope:title = primary_title } trigger_event = { weeks = { 2 4 } @@ -2456,6 +2585,11 @@ on_title_gain = { if = { limit = { government_allows = noble_families + NOT = { scope:title.tier = tier_barony } + trigger_if = { + limit = { government_has_mechanic = administrative } + scope:title.tier >= min_appointment_tier + } } government_type = { save_scope_as = nf_gov_type } # Note: anything that should be run after creation can go in on_noble_family_title_created @@ -2559,13 +2693,24 @@ on_title_gain = { } every_vassal_or_below = { limit = { - is_playable_character = yes - OR = { - highest_held_title_tier >= main_administrative_tier # All governors - liege = root + exists = root.house + } + #normal triggering + every_vassal_or_below = { + limit = { + is_playable_character = yes + exists = scope:previous_holder + government_has_mechanic = administrative + OR = { + highest_held_title_tier >= main_administrative_tier # All governors + liege = root + } + } + trigger_event = { + id = ep3_governor_yearly.3060 + days = 1 } } - trigger_event = ep3_governor_yearly.3060 } } } @@ -2769,41 +2914,22 @@ on_title_gain = { } # Did I conquer a place with holy order leases not of my faith? - if = { - limit = { - scope:title = { - any_in_de_jure_hierarchy = { - tier = tier_barony - is_under_holy_order_lease = yes - county.holder = { - any_liege_or_above = { this = root } - } - lessee = { - NAND = { # Only for leases of people who are not of your faith or the holder's faith - faith = root.faith - faith = prev.county.holder.faith - } + scope:title = { + every_in_de_jure_hierarchy = { + limit = { + tier = tier_barony + is_under_holy_order_lease = yes + county.holder = { + any_liege_or_above = { this = root } + } + lessee = { + NAND = { # Only for leases of people who are not of your faith or the holder's faith + faith = root.faith + faith = prev.county.holder.faith } } } - } - scope:title = { - every_in_de_jure_hierarchy = { - limit = { - tier = tier_barony - is_under_holy_order_lease = yes - county.holder = { - any_liege_or_above = { this = root } - } - lessee = { - NAND = { # Only for leases of people who are not of your faith or the holder's faith - faith = root.faith - faith = prev.county.holder.faith - } - } - } - revoke_lease = yes - } + revoke_lease = yes } } @@ -2894,7 +3020,12 @@ on_title_gain = { } # Natural Disaster Recovery project invalidation - great_projects_ensure_unique_disaster_recovery_projects_effect = yes + if = { + limit = { + this = top_liege + } + great_projects_ensure_unique_disaster_recovery_projects_effect = yes + } ########### # Nomads/Tribals leaving confederacies @@ -2904,6 +3035,7 @@ on_title_gain = { is_confederation_member = yes scope:title.tier >= tier_kingdom government_is_japanese_trigger = no + confederation ?= { is_title_based = no } } confederation = { remove_confederation_member = root @@ -2985,6 +3117,7 @@ on_title_gain = { is_ruler = no highest_held_title_tier <= scope:title.tier government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_merchant government_has_mechanic = administrative } } @@ -3289,13 +3422,7 @@ on_title_gain = { every_courtier = { limit = { location != root.capital_province - is_imprisoned = no - is_travelling = no - is_commanding_army = no - NOR = { - exists = involved_activity - exists = knight_army - } + should_in_default_location_trigger = yes } set_location_to_default = yes } @@ -3307,13 +3434,7 @@ on_title_gain = { 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 - } + should_in_default_location_trigger = yes } set_location_to_default = yes } @@ -3769,6 +3890,10 @@ on_title_lost = { gdp_league_focus_on_title_lost } + on_actions = { + gdp_league_focus_on_title_lost + } + effect = { ################ N3OW Dynamic Titles ################## @@ -4201,13 +4326,7 @@ on_title_lost = { owner = { if = { limit = { - is_alive = yes - is_imprisoned = no - is_travelling = no - NOT = { - exists = involved_activity - } - is_commanding_army = no + should_in_default_location_trigger = yes } set_location_to_default = yes } @@ -4457,13 +4576,7 @@ on_title_lost = { every_courtier = { limit = { location != root.capital_province - is_imprisoned = no - is_travelling = no - is_commanding_army = no - NOR = { - exists = involved_activity - exists = knight_army - } + should_in_default_location_trigger = yes } set_location_to_default = yes } @@ -4476,13 +4589,7 @@ on_title_lost = { 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 - } + should_in_default_location_trigger = yes } set_location_to_default = yes } @@ -4504,6 +4611,16 @@ on_title_lost = { # Move or destroy estates without a liege if = { limit = { + trigger_if = { + limit = { + government_has_flag = government_is_republic + liege != root + } + # ...only do this if your liege is not ~also~ a republic, else vassal republics may fall into this + NOT = { + has_same_government = liege + } + } # Has an NF title any_held_title = { NOT = { this = scope:title } @@ -4518,6 +4635,10 @@ on_title_lost = { } if = { limit = { + NOR = { + government_has_flag = government_is_republic + government_has_flag = government_is_merchant + } OR = { exists = scope:new_holder.var:laamp_invasion_flag trigger_if = { @@ -4597,8 +4718,7 @@ on_title_lost = { limit = { is_house_head = no # Has an NF title - exists = house - house.house_head = { + house.house_head ?= { any_held_title = { is_noble_family_title = yes } } # Only remaining title is NF title @@ -5226,7 +5346,10 @@ on_vassal_gained = { limit = { scope:vassal = { is_confederation_member = yes - scope:vassal.confederation = { has_leading_house = no } + scope:vassal.confederation ?= { + has_leading_house = no + is_title_based = no + } } } scope:vassal.confederation = { @@ -5315,6 +5438,28 @@ on_vassal_gained = { } } } + + ### If a republic family becomes independent or part of a non-republic... + if = { + limit = { + scope:vassal = { + government_has_flag = government_is_republic + is_landed = no + any_held_title = { is_noble_family_title = yes } + } + NOT = { government_has_flag = government_is_republic } + } + # Create Merchant - this will trigger on_vassal_change and make them a Merchant + scope:vassal = { + 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 + } + } } } @@ -5329,14 +5474,11 @@ on_vassal_change = { ### If a admin duke-tier character becomes the top-liege's direct vassal, ensure that they have a noble family title if = { limit = { + # This trigger is intentionally different from the similar effect in on_title_gain up above. We want all direct vassals of the top liege to have a family title if they can + government_has_mechanic = administrative government_allows = noble_families is_house_head = yes - trigger_if = { - # This trigger is intentionally different from the similar effect 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 } + highest_held_title_tier >= min_appointment_tier liege = { top_liege = this government_allows = noble_families @@ -5355,19 +5497,13 @@ on_vassal_change = { } ### If an admin ruler becomes independent... if = { - limit = { - government_has_mechanic = administrative - } + limit = { government_has_mechanic = administrative } if = { - limit = { - liege = root # I.e. root is independent - } + limit = { liege = root } # I.e. root is independent if = { limit = { is_landed = no - any_held_title = { - is_noble_family_title = yes - } + any_held_title = { is_noble_family_title = yes } } if = { limit = { @@ -5403,19 +5539,19 @@ on_vassal_change = { limit = { government_allows = noble_families NOT = { - exists = house.noble_family + any_held_title = { is_noble_family_title = yes } } } create_noble_family_effect = { GOVERNMENT_GIVER = this } domicile ?= { set_up_domicile_estate_effect = yes } } } - # Byz admin landless NF should always be direct vassal of top liege + # Admin landless NF should always be direct vassal of top liege else_if = { limit = { - government_has_flag = government_is_administrative + government_allows = noble_families liege != top_liege - primary_title = { + primary_title ?= { is_noble_family_title = yes } is_landed = no @@ -5602,6 +5738,7 @@ on_vassal_change = { liege != root primary_title ?= { has_custom_title_name = yes + is_landless_type_title = no } } primary_title = { @@ -5825,7 +5962,6 @@ on_realm_capital_change = { domicile ?= { move_domicile = scope:capital_province } - # don't move them in such cases if = { limit = { is_landed = no diff --git a/common/on_action/travel_on_actions.txt b/common/on_action/travel_on_actions.txt index 343c70030..5baae1b4d 100644 --- a/common/on_action/travel_on_actions.txt +++ b/common/on_action/travel_on_actions.txt @@ -82,10 +82,10 @@ on_travel_plan_movement = { # We change your Legend if you travel through somewhere relevant if = { limit = { + has_legend_chapter_trigger = { CHAPTER = conclusion } current_travel_plan.current_location = { has_any_point_of_interest_flag = yes } - has_legend_chapter_trigger = { CHAPTER = conclusion } NOT = { promoted_legend ?= { has_legend_chapter = { @@ -344,11 +344,16 @@ on_travel_plan_movement = { } root.current_travel_plan.current_location.available_loot > 0 } + set_variable = { + name = local_deals_last_haggle_gold + value = adventurers_make_local_deals_option_value + } add_gold = adventurers_make_local_deals_option_value add_to_variable_list = { name = haggle_provinces target = root.current_travel_plan.current_location } + make_local_deals_haggle_risk_effect = yes } if = { limit = { @@ -479,7 +484,15 @@ on_travel_plan_movement = { NOT = { exists = inspiration } } save_scope_as = inspired_follower - grant_inspiration_to_character_no_court_artifacts_effect = { CHARACTER = this } + if = { + limit = { + root = { government_has_flag = government_is_merchant } + } + grant_merchant_inspiration_to_character_effect = { CHARACTER = this } + } + else = { + grant_inspiration_to_character_no_court_artifacts_effect = { CHARACTER = this } + } } send_interface_message = { type = send_interface_message_good @@ -558,7 +571,6 @@ on_travel_plan_movement = { location.county.holder = { NOR = { has_relation_friend = root - has_relation_best_friend = root root = { is_tributary_of = prev } @@ -978,9 +990,8 @@ travel_events_on_action = { 150 = travel_events_bp3.60 # A Small Deal 150 = travel_events_bp3.65 # Purse Pursuit 25 = travel_events_bp3.70 # Festival - 150 = travel_events_bp3.75 # Dreams Brewing + #150 = travel_events_bp3.75 # Dreams Brewing 100 = travel_events_bp3.80 # A Life of Service - 150 = travel_events_bp3.85 # Brewers of Fame 150 = travel_events_bp3.90 # Patron of 150 = travel_events_bp3.95 # A Pilgrim's Tale 150 = travel_events_bp3.100 # Land of Milk and... Fish? @@ -1308,15 +1319,19 @@ on_travel_plan_start = { } any_court_position_holder = { type = court_physician_court_position + is_ai = yes is_available = yes is_travel_entourage_character = no + bannable_serving_diarch_trigger = no } } random_court_position_holder = { type = court_physician_court_position limit = { + is_ai = yes is_available = yes is_travel_entourage_character = no + bannable_serving_diarch_trigger = no } save_scope_as = court_phys } @@ -1334,14 +1349,19 @@ on_travel_plan_start = { } any_court_position_holder = { type = bodyguard_court_position + is_ai = yes is_available = yes + is_travel_entourage_character = no + bannable_serving_diarch_trigger = no } } random_court_position_holder = { type = bodyguard_court_position limit = { + is_ai = yes is_available = yes is_travel_entourage_character = no + bannable_serving_diarch_trigger = no } save_scope_as = bodyguard } @@ -1359,15 +1379,19 @@ on_travel_plan_start = { } any_court_position_holder = { type = akolouthos_court_position + is_ai = yes is_available = yes is_travel_entourage_character = no + bannable_serving_diarch_trigger = no } } random_court_position_holder = { type = akolouthos_court_position limit = { + is_ai = yes is_available = yes is_travel_entourage_character = no + bannable_serving_diarch_trigger = no } save_scope_as = akolouthos } @@ -1519,9 +1543,9 @@ on_travel_plan_start = { # Commented-out events are removed due to spam concerns # The ones who are left have mechanical impacts; Tours give prestige/stress loss, pilgrimages add additional pilgrims, wanderer activities give boons based ona ctivity options for Monument Explorations, etc. # Chinese debates/examinations give necessary context effects, such as choosing movement if you have none, or resigning from your alnds if you need to take the exam - + travel_start_event.1130 # Generic 'travel started' toast, also plays mx_cue_travel_start - + #travel_start_event.1000 #Generic start (no activity) #travel_start_event.1010 #Travelling to a Tournament travel_start_event.1020 #Setting off on a Tour @@ -1618,6 +1642,7 @@ on_travel_plan_complete = { current_travel_plan = { has_travel_option = leisurely_option } + exists = current_travel_plan.var:travel_plan_provinces_traversed } send_interface_toast = { type = event_generic_good @@ -1640,6 +1665,7 @@ on_travel_plan_complete = { limit = { has_perk = travel_logs_perk has_trait = lifestyle_traveler + exists = current_travel_plan.var:travel_plan_provinces_traversed } send_interface_toast = { type = event_generic_good @@ -2271,6 +2297,7 @@ on_travel_relocation_end = { travel_laamps_provisions_on_action = { trigger = { exists = domicile + domicile = { domicile_uses_provisions = yes } domicile.provisions <= provisions_privation_threshold_start NOT = { government_has_flag = government_is_nomadic } # Yurts don't have provisions } diff --git a/common/on_action/war_on_actions.txt b/common/on_action/war_on_actions.txt index 22815299d..3090ad5e8 100644 --- a/common/on_action/war_on_actions.txt +++ b/common/on_action/war_on_actions.txt @@ -325,7 +325,27 @@ on_war_started = { debug_log = "Declared a border war" debug_log_scopes = yes } +# gg_triggered_catalyst_effect = { +# ACTOR = scope:attacker +# RECIPIENT = scope:defender +# CATALYST = catalyst_gg_war_declared_on_opposite_party +# } scope:attacker = { + if = { + limit = { + government_has_flag = government_has_merit + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } + } + scope:war = { + set_variable = { + name = military_province_war_defender_tier + value = scope:defender.highest_held_title_tier + } + } + } if = { # Confession modifier limit = { var:pam_confession_penalty_var ?= flag:no_war @@ -648,6 +668,21 @@ on_war_started = { } scope:defender = { + if = { + limit = { + government_has_flag = government_has_merit + OR = { + vassal_contract_has_flag = celestial_military_appointment + vassal_contract_has_flag = meritocratic_military_appointment + } + } + scope:war = { + set_variable = { + name = military_province_war_attacker_tier + value = scope:attacker.highest_held_title_tier + } + } + } if = { limit = { any_vassal_or_below = { is_ai = no } @@ -1263,6 +1298,12 @@ on_war_won_attacker = { # As in, won BY attacker. Only one of the two on_actions # Save scopes for localization. scope:attacker = { save_scope_as = winner } scope:defender = { save_scope_as = loser } +# gg_triggered_catalyst_effect = { +# ACTOR = scope:winner +# RECIPIENT = scope:loser +# CATALYST = catalyst_gg_war_won_against_opposite_party +# } + scope:winner = { military_career_war_victory_merit_effect = yes } # Special rewards for Temüjin vs Jamukha if = { limit = { @@ -1774,7 +1815,7 @@ on_war_won_attacker = { # As in, won BY attacker. Only one of the two on_actions if = { limit = { scope:winner = { - has_dlc_feature = roads_to_power + has_playable_adventurer_dlc_trigger = yes has_variable_list = separatist_uprising_decision_target_var is_target_in_variable_list = { name = separatist_uprising_decision_target_var @@ -1984,6 +2025,13 @@ on_war_won_defender = { scope:attacker = { save_scope_as = loser } scope:defender = { save_scope_as = winner } +# gg_triggered_catalyst_effect = { +# ACTOR = scope:winner +# RECIPIENT = scope:loser +# CATALYST = catalyst_gg_war_won_against_opposite_party +# } + scope:winner = { military_career_war_victory_merit_effect = yes } + # Give a humiliating memory to nomadic attackers for losing a war they started if = { limit = { diff --git a/common/on_action/yearly_on_actions.txt b/common/on_action/yearly_on_actions.txt index 4e55a3fe9..bfec1aefc 100644 --- a/common/on_action/yearly_on_actions.txt +++ b/common/on_action/yearly_on_actions.txt @@ -148,14 +148,6 @@ yearly_global_pulse = { } } } - #Yearly Imperial Grace Reduction for Hegemonic Tributaries - if = { - limit = { - exists = suzerain - suzerain = { highest_held_title_tier = tier_hegemony } - NOT = { exists = suzerain.top_participant_group:dynastic_cycle } - } - } # Empire Faith Gate: multi-empire-same-faith legitimacy (iterate list, not every_independent_ruler). if = { limit = { empire_faith_gate_enabled_trigger = yes } @@ -226,16 +218,15 @@ yearly_global_pulse = { NOT = { this = scope:efg_ruler } efg_same_faith_empire_holder_trigger = yes scope:efg_ruler = { - NOR = { + NOT = { has_relation_rival = prev - has_relation_nemesis = prev } } } scope:efg_ruler = { - set_relation_rival = { - target = prev - reason = efg_contested_empire_rivalry + set_relation_rival_effect = { + TARGET = prev + REASON = efg_contested_empire_rivalry } } } @@ -606,23 +597,35 @@ yearly_playable_pulse = { # Yearly house head opinion update: to change into only one log maybe? if = { limit = { - government_has_flag = government_is_clan + OR = { + government_has_flag = government_uses_house_unity + government_has_flag = government_uses_company_sentiment + } exists = house is_house_head = yes } save_scope_as = unity_target if = { limit = { - has_variable = { - name = steer_unity_towards_harmonious_passive_gain - name = steer_unity_towards_antagonistic_passive_loss + OR = { + has_character_flag = steer_unity_towards_harmonious_passive_gain + has_character_flag = steer_unity_towards_ennobled_passive_gain + has_character_flag = steer_unity_towards_antagonistic_passive_loss + has_character_flag = steer_unity_towards_rapacious_passive_loss } } house = { add_unity_value = { value = { if = { - limit = { root = { has_character_flag = steer_unity_towards_harmonious_passive_gain } } + limit = { + root = { + OR = { + has_character_flag = steer_unity_towards_harmonious_passive_gain + has_character_flag = steer_unity_towards_ennobled_passive_gain + } + } + } add = medium_unity_gain } else = { @@ -816,6 +819,7 @@ yearly_playable_pulse = { if = { limit = { + NOT = { government_has_flag = government_has_merchant_company } OR = { NOT = { government_allows = noble_families } AND = { @@ -847,7 +851,7 @@ yearly_playable_pulse = { } admin_change_government_effect = yes } - # Failsafe to ensure we don't have a noble family holding land without other titles - Give any held land to liege + # Failsafe so a noble family is not left holding only barony or lower landed titles. Any land they hold goes to the liege else_if = { limit = { # They are a Vassal @@ -858,23 +862,11 @@ yearly_playable_pulse = { save_temporary_scope_as = nf_title_temp } # And no other high tier Titles - trigger_if = { - limit = { government_has_flag = government_has_county_tier_noble_families } - NOT = { - any_held_title = { - tier >= tier_county - is_noble_family_title = no - is_landless_type_title = no - } - } - } - trigger_else = { - NOT = { - any_held_title = { - tier >= tier_duchy - is_noble_family_title = no - is_landless_type_title = no - } + NOT = { + any_held_title = { + tier >= tier_county + is_noble_family_title = no + is_landless_type_title = no } } } @@ -887,6 +879,7 @@ yearly_playable_pulse = { limit = { is_landless_type_title = no is_noble_family_title = no + is_capital_barony = no } add_to_list = revoked_titles } @@ -1114,13 +1107,8 @@ yearly_playable_pulse = { is_ai = no has_government = landless_adventurer_government location != domicile.domicile_location - is_imprisoned = no - is_travelling = no - NOT = { - exists = involved_activity - } + should_in_default_location_trigger = yes num_taken_task_contracts <= 0 - is_commanding_army = no } set_location_to_default = yes } @@ -1128,6 +1116,7 @@ yearly_playable_pulse = { limit = { government_allows = merit } + military_service_yearly_merit_effect = yes if = { limit = { is_landed = yes @@ -1139,13 +1128,7 @@ yearly_playable_pulse = { location != root.capital_province } trigger_else = { always = yes } - is_imprisoned = no - is_travelling = no - is_commanding_army = no - NOR = { - exists = involved_activity - exists = knight_army - } + should_in_default_location_trigger = yes } set_location_to_default = yes } @@ -1161,13 +1144,7 @@ yearly_playable_pulse = { location != root.domicile.domicile_location } trigger_else = { always = yes } - is_imprisoned = no - is_travelling = no - is_commanding_army = no - NOR = { - exists = involved_activity - exists = knight_army - } + should_in_default_location_trigger = yes } set_location_to_default = yes } @@ -1184,11 +1161,14 @@ yearly_playable_pulse = { } remove_character_modifier = mpo_confederation_member_modifier } - # Stray player Herders get turned into Nomads + # Stray player Herders get turned into Nomads, as do Herders that have grown past a single county if = { limit = { - is_ai = no government_has_flag = government_is_herder + OR = { + is_ai = no + highest_held_title_tier > tier_county + } } every_held_title = { limit = { @@ -1203,6 +1183,11 @@ yearly_playable_pulse = { } change_government = nomad_government } + #Estate office governor efficiency for house members + if = { + limit = { is_house_head = yes } + house = { refresh_estate_household_clerks_house_modifier_effect = yes } + } ###################### # Various safeguarding against realm setups with landless participants @@ -1822,7 +1807,7 @@ yearly_playable_pulse = { rite = { rite_has_parameter = tenet_love_thy_neighbour_county_bonus } any_held_county = { faith = prev.faith - county_opinion >= 60 + popular_opinion >= 60 NOT = { has_county_modifier = tenet_love_thy_neighbour_modifier } @@ -1831,7 +1816,7 @@ yearly_playable_pulse = { random_held_county = { limit = { faith = prev.faith - county_opinion >= 60 + popular_opinion >= 60 NOT = { has_county_modifier = tenet_love_thy_neighbour_modifier } @@ -2005,6 +1990,27 @@ yearly_playable_pulse = { trigger_event = accolade.0110 } } + + # GDP Trade Opportunities + if = { + limit = { + is_landless_merchant = yes + trigger_if = { + limit = { is_ai = yes } + is_available = yes + } + } + random = { + chance = { + value = 70 + if = { + limit = { has_character_flag = trade_opportunity_frequency_cooldown } + subtract = 50 + } + } + trigger_event = { on_action = spawn_trade_opportunity_contract_on_action } + } + } if = { limit = { NOT = { exists = puppeteer } @@ -2683,12 +2689,7 @@ quarterly_playable_pulse = { realm_maintenance_quarterly_pulse # Event pools - stewardship_lifestyle_progress_pulse - intrigue_lifestyle_progress_pulse - diplomacy_lifestyle_progress_pulse - martial_lifestyle_progress_pulse - learning_lifestyle_progress_pulse - wanderer_lifestyle_progress_pulse + lifestyle_progress_pulse # Relation pulses are spread out across the four quarterly pulses a year lover_quarterly_pulse @@ -2724,6 +2725,18 @@ quarterly_playable_pulse = { } } +# A character only has one lifestyle, so at most one of these pulses can be valid +lifestyle_progress_pulse = { + first_valid_on_action = { + stewardship_lifestyle_progress_pulse + intrigue_lifestyle_progress_pulse + diplomacy_lifestyle_progress_pulse + martial_lifestyle_progress_pulse + learning_lifestyle_progress_pulse + wanderer_lifestyle_progress_pulse + } +} + # Called from code once a year for all "playable" characters, at a random point that year (individually for each character). Different time from the random_yearly_everyone_pulse (coincides by random 1 time out of 365) # Root is the character random_yearly_playable_pulse = { @@ -2900,7 +2913,6 @@ random_yearly_everyone_pulse = { } on_actions = { yearly_health_pulse - stress_pulse prison_maintenance_pulse house_feud_ai_scheme_pulse } @@ -3007,6 +3019,8 @@ five_year_everyone_pulse = { move_budget_gold = { gold = long_term_gold from = budget_long_term to = budget_short_term } } + purge_excess_baron_gold_effect = yes # keep barons from hoarding gold they won't spend in their lifetime + # FP2 - Checks to start El Cid's Travels # if = { # limit = { # Am I El Cid? @@ -3391,7 +3405,6 @@ on_yearly_events = { 100 = vassal.2001 # Vassal wants liege to educate their child 100 = vassal.2101 # No feast in a while, vassal requests it 200 = vassal.2201 # You lend money from a vassal - 400 = vassal.2205 # Vassal reminds you of the money you owe them 100 = vassal.2301 # Highly skilled vassal progresses development in province 100 = vassal.2401 # Vassal wants gold, offers territory/better Vassal Contract 100 = vassal.2451 # Vassal wants better contract, offers territory/gold @@ -4131,8 +4144,12 @@ on_yearly_events = { 100 = pam_theocratic_ruler_events.0010 # Theocratic ruler: proven warrior and pilgrim; marshal and chaplain counsel sword or crozier 100 = pam_theocratic_ruler_events.0011 # Theocratic ruler: landed subject seeks church burial for fallen crusader kinsman 100 = pam_theocratic_ruler_events.0013 # Theocratic ruler: angelic voice at mass; recruit for choir, seduce, or reject worldly song - 50 = pam_theocratic_ruler_events.0014 # Theocratic ruler: neighbouring convert urges adopting foreign core tenets at sermon + 50 = pam_theocratic_ruler_events.0014 # Theocratic ruler: neighboring convert urges adopting foreign core tenets at sermon 50 = pam_theocratic_ruler_events.0015 # Theocratic ruler: prayer hearing with top two succession candidates + 50 = pam_theocratic_ruler_events.0016 # Theocratic ruler: two religious subordinates discuss faith over bread + 50 = pam_theocratic_ruler_events.0017 # Theocratic ruler: head of faith or rite notices ambitious church guidance + 50 = pam_theocratic_ruler_events.0018 # Theocratic ruler: bishop spends more time with mayors and merchants than at Mass + 50 = pam_theocratic_ruler_events.0019 # Theocratic ruler: liege and religious superior despise each other # PAM Flavor Events 50 = pam_generic_events.0001 # Gain Religious Scholar diff --git a/common/religion/faith_types/00_faith_types.txt b/common/religion/faith_types/00_faith_types.txt index a5f629746..1a4005106 100644 --- a/common/religion/faith_types/00_faith_types.txt +++ b/common/religion/faith_types/00_faith_types.txt @@ -205,7 +205,7 @@ pulugaism = { # Later developed faith that believed Biliku was a male god named HighGodName2 = pulugaism_high_god_name_2 HighGodNamePossessive = pulugaism_high_god_name_possessive HighGodNameSheHe = CHARACTER_SHEHE_HE - HighGodHerselfHimself = CHARACTER_HERSELFHIMSELF_HIMSELF + HighGodHerselfHimself = CHARACTER_HIMSELF HighGodHerHis = CHARACTER_HERHIS_HIS #Creator @@ -283,6 +283,31 @@ bon_faith = { } } +old_bon = { + main_rite = old_bon + faith_details = { + religion = bon_religion + color = { 0.03 0.45 0.42 } + icon = spirit_bon + reformed_icon = spirit_bon + } + + eminent_holy_sites = { + lhasa + purang + } + + holy_sites = { + khotan + balkh + gilgit + } + + doctrines = { + unreformed_faith_doctrine + } +} + theravada_faith = { # Scripted main Rite: theravada (all start dates). Its core tenets and Rite-specific doctrines are defined on the Rite; faith-intrinsic doctrines remain inline. main_rite = theravada @@ -2022,6 +2047,10 @@ vaishnava_faith = { khao_khlang_nai } + doctrines = { + special_doctrine_meat_forbidden_temples + } + localization = { HighGodName = vaishnavism_high_god_name HighGodName2 = vaishnavism_high_god_name_2 @@ -2098,6 +2127,10 @@ shaiva_faith = { #preah_vihear } + doctrines = { + special_doctrine_meat_forbidden_temples + } + localization = { HighGodName = shaivism_high_god_name HighGodName2 = shaivism_high_god_name_2 @@ -2236,6 +2269,7 @@ smartism = { doctrines = { doctrine_liturgical_language_none doctrine_monasticism_accepted + special_doctrine_meat_forbidden } localization = { @@ -3391,7 +3425,7 @@ zhengyi = { doctrine_adultery_women_crime doctrine_deviancy_crime doctrine_clerical_function_taxation - doctrine_clerical_marriage_disallowed + doctrine_clerical_marriage_allowed doctrine_clerical_succession_spiritual_fixed_appointment } } diff --git a/common/religion/holy_site_types/00_holy_site_types.txt b/common/religion/holy_site_types/00_holy_site_types.txt index 8b1e7080a..eb154ad0c 100644 --- a/common/religion/holy_site_types/00_holy_site_types.txt +++ b/common/religion/holy_site_types/00_holy_site_types.txt @@ -42,18 +42,24 @@ rome = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - development_growth_factor = 0.01 - county_opinion_add = 1 + prosperity_growth_factor = 0.01 + popular_opinion_add = 1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_rome_effect_name stewardship = 1 church_holding_build_gold_cost = -0.1 + monthly_piety_gain_mult = 0.2 } faith_character_modifier_scaled = { scale = holy_site_total_artifact_rarity - development_growth_factor = 0.01 + prosperity_growth_factor = 0.01 character_travel_speed_mult = 0.01 } } @@ -63,23 +69,29 @@ cologne = { county_holder_character_modifier = { learning = 1 - monthly_county_control_growth_factor = 0.05 + monthly_control_change_when_below_baseline_mult = 0.05 } county_modifier_scaled = { scale = holy_site_total_artifact_rarity - tax_mult = 0.01 - county_opinion_add = 1 + all_tax_mult = 0.01 + popular_opinion_add = 1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_cologne_effect_name cultural_head_fascination_mult = 0.05 + monthly_control_change_when_below_baseline_mult = 0.05 } faith_character_modifier_scaled = { scale = holy_site_total_artifact_rarity cultural_head_fascination_mult = 0.01 - monthly_county_control_growth_factor = 0.01 + monthly_control_change_when_below_baseline_mult = 0.01 } } @@ -94,8 +106,12 @@ santiago = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - development_growth_factor = 0.01 + prosperity_growth_factor = 0.01 travel_danger = -1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { @@ -121,11 +137,16 @@ kent = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - tax_mult = 0.01 - monthly_county_control_growth_factor = 0.01 + all_tax_mult = 0.01 + monthly_control_change_when_below_baseline_mult = 0.01 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_kent_effect_name religious_vassal_opinion = 5 sway_scheme_phase_duration_add = minor_scheme_phase_duration_bonus_value } @@ -152,6 +173,7 @@ constantinople = { } faith_character_modifier = { + name = holy_site_constantinople_effect_name cultural_head_fascination_mult = 0.05 clergy_opinion = 5 } @@ -259,9 +281,14 @@ iasi = { scale = holy_site_total_artifact_rarity travel_danger = -1 epidemic_resistance = 1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_alexandria_effect_name learning_per_piety_level = 1 monthly_piety_gain_mult = 0.05 } @@ -446,11 +473,16 @@ suenik = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - development_growth_factor = 0.01 + prosperity_growth_factor = 0.01 travel_danger = -1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_dwin_effect_name learning = 1 monthly_piety_gain_mult = 0.05 } @@ -470,11 +502,16 @@ dvin = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - development_growth_factor = 0.01 + prosperity_growth_factor = 0.01 travel_danger = -1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_dwin_effect_name learning = 1 monthly_piety_gain_mult = 0.05 } @@ -652,8 +689,12 @@ iona = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - development_growth_factor = 0.01 + prosperity_growth_factor = 0.01 travel_danger = -1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { @@ -850,6 +891,7 @@ iona = { # } #} + # Muhakkima #siffa = { # Location of the Battle of Siffa, where the Muhakkimas branched off from the other Islamic schools. @@ -1476,6 +1518,7 @@ iona = { # } #} + ############# # Eastern # ############# @@ -3111,11 +3154,16 @@ ani = { #Great temple site in Zoroastrian Armenia county_modifier_scaled = { scale = holy_site_total_artifact_rarity - development_growth_factor = 0.01 - county_opinion_add = 1 + prosperity_growth_factor = 0.01 + popular_opinion_add = 1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_ani_effect_name direct_vassal_opinion = 5 } @@ -3262,11 +3310,16 @@ preslav = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - tax_mult = 0.01 + all_tax_mult = 0.01 county_fertility_growth_mult = 0.01 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_preslav_effect_name levy_size = 0.1 } @@ -3288,11 +3341,16 @@ athens = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - tax_mult = 0.01 + all_tax_mult = 0.01 supply_limit_mult = 0.02 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_athens_effect_name diplomacy = 1 stewardship = 1 } @@ -3313,11 +3371,16 @@ olympus = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - development_growth_factor = 0.01 + prosperity_growth_factor = 0.01 travel_danger = -1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_olympus_effect_name learning = 2 } @@ -3645,11 +3708,16 @@ aneto = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - mountains_development_growth_factor = 0.01 + mountains_prosperity_growth_factor = 0.01 supply_limit_mult = 0.02 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_aneto_effect_name monthly_prestige_gain_per_knight_add = 0.03 } @@ -3664,22 +3732,27 @@ bordeaux = { county = c_bordeaux county_holder_character_modifier = { - monthly_county_control_growth_factor = 0.1 + monthly_control_change_when_below_baseline_mult = 0.1 } county_modifier_scaled = { scale = holy_site_total_artifact_rarity - tax_mult = 0.01 - monthly_county_control_growth_factor = 0.01 + all_tax_mult = 0.01 + monthly_control_change_when_below_baseline_mult = 0.01 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { - monthly_county_control_growth_factor = 0.5 + name = holy_site_bordeaux_effect_name + monthly_control_change_when_below_baseline_mult = 0.5 } faith_character_modifier_scaled = { scale = holy_site_total_artifact_rarity - monthly_county_control_growth_factor = 0.02 + monthly_control_change_when_below_baseline_mult = 0.02 monthly_income_mult = 0.005 } } @@ -4280,23 +4353,28 @@ tenerife = { barony = b_tenerife county_holder_character_modifier = { - hills_development_growth_factor = 0.1 + hills_prosperity_growth_factor = 0.1 } county_modifier_scaled = { scale = holy_site_total_artifact_rarity - hills_development_growth_factor = 0.01 + hills_prosperity_growth_factor = 0.01 supply_limit_mult = 0.02 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { - hills_development_growth_factor = 0.25 + name = holy_site_tenerife_effect_name + hills_prosperity_growth_factor = 0.25 monthly_piety_gain_per_dread_add = 0.03 } faith_character_modifier_scaled = { scale = holy_site_total_artifact_rarity - hills_development_growth_factor = 0.015 + hills_prosperity_growth_factor = 0.015 dread_gain_mult = 0.01 } } @@ -4313,9 +4391,14 @@ cartagena = { scale = holy_site_total_artifact_rarity build_speed = -0.01 levy_size = 0.02 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_cartagena_effect_name title_creation_cost_mult = -0.15 men_at_arms_maintenance_per_dread_mult = -0.002 } @@ -4336,11 +4419,16 @@ madiera = { county_modifier_scaled = { scale = holy_site_total_artifact_rarity - hills_development_growth_factor = 0.01 + hills_prosperity_growth_factor = 0.01 supply_limit_mult = 0.02 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { + name = holy_site_madeira_effect_name naval_movement_speed_mult = 0.2 coastal_advantage = 5 } @@ -7963,6 +8051,7 @@ caravaca_de_la_cruz = { } faith_character_modifier = { + name = holy_site_nanning_effect_name title_creation_cost_mult = -0.15 men_at_arms_maintenance_per_dread_mult = -0.002 } @@ -8010,6 +8099,10 @@ cefalu = { scale = holy_site_total_artifact_rarity county_opinion_add = 1 travel_danger = -1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { @@ -8292,6 +8385,7 @@ fortingall_yew = { faith_character_modifier = { stewardship_per_piety_level = 1 fertility = 0.1 + monthly_lifestyle_xp_gain_mult = 0.15 } faith_character_modifier_scaled = { @@ -8390,6 +8484,10 @@ gietrzwald = { scale = holy_site_total_artifact_rarity epidemic_resistance = 2 travel_danger = -1 + religious_tax_mult = holy_site_relic_tax_bonus + trade_good_incense_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_copper_sell_price_mult = holy_site_relic_sell_price_bonus + trade_good_books_paper_sell_price_mult = holy_site_relic_sell_price_bonus } faith_character_modifier = { @@ -8435,7 +8533,7 @@ gornja_stubica = { # site of the legendary peasant uprising against habsburgs barony = b_zagreb county_holder_character_modifier = { - monthly_county_control_growth_factor = 0.05 + monthly_control_change_when_below_baseline_mult = 0.05 } county_modifier_scaled = { diff --git a/common/schemes/scheme_types/learn_language_scheme.txt b/common/schemes/scheme_types/learn_language_scheme.txt index 8c554f658..587459186 100644 --- a/common/schemes/scheme_types/learn_language_scheme.txt +++ b/common/schemes/scheme_types/learn_language_scheme.txt @@ -647,6 +647,7 @@ desc = BEFRIEND_THICKER_THAN_WATER_PERK_DESC scope:owner = { has_perk = thicker_than_water_perk + NOT = { government_has_flag = government_is_merchant } } scope:target = { is_close_or_extended_family_of = scope:owner @@ -809,6 +810,7 @@ name = language_progress value = prev.scheme_progress } + root = { save_scheme_modifiers = yes } trigger_event = learn_language_outcome.3000 } } diff --git a/common/script_values/00_basic_values.txt b/common/script_values/00_basic_values.txt index 70933c7e5..934012f48 100644 --- a/common/script_values/00_basic_values.txt +++ b/common/script_values/00_basic_values.txt @@ -1786,9 +1786,9 @@ send_gift_opinion = { } if = { limit = { - scope:actor = { + scope:puppet_or_actor = { any_sub_realm_barony = { - county.holder = scope:actor + county.holder = scope:puppet_or_actor title_province = { has_building_or_higher = edenic_garden_01 } diff --git a/common/script_values/00_building_values.txt b/common/script_values/00_building_values.txt index 128e1ce21..2c7ce844b 100644 --- a/common/script_values/00_building_values.txt +++ b/common/script_values/00_building_values.txt @@ -680,6 +680,8 @@ building_disable_inefficient_value_add = 5 @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] +@expensive_cost_tier_9 = @[expensive_cost_tier_8 + 9*9*expensive_cost_scale_addition_per_tier*building_cost_scaling_modifier_expensive + 0] +@expensive_cost_tier_10 = @[expensive_cost_tier_9 + 10*10*expensive_cost_scale_addition_per_tier*building_cost_scaling_modifier_expensive + 0] @very_expensive_cost_tier_1 = @[very_expensive_cost_base] #values progress quadratically for tiers from T3 onwards. The addition at the end is to have nice, round numbers displayed @@ -1654,6 +1656,8 @@ 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] +expensive_building_tier_9_cost = @[expensive_cost_tier_9] +expensive_building_tier_10_cost = @[expensive_cost_tier_10] # Expensive Buildings very_expensive_building_tier_1_cost = @[very_expensive_cost_tier_1] diff --git a/common/script_values/00_travel_values.txt b/common/script_values/00_travel_values.txt index 5aef0d3a3..cdcc10b3e 100644 --- a/common/script_values/00_travel_values.txt +++ b/common/script_values/00_travel_values.txt @@ -104,9 +104,9 @@ epidemic_medium_danger_reduction = @[epidemic_danger_value * medium_reduction_co 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 +low_travel_option_base_cost = 1 +medium_travel_option_base_cost = 3 +high_travel_option_base_cost = 5 tier_multiplier = { value = primary_title.tier @@ -117,36 +117,47 @@ tier_multiplier = { very_low_travel_option_cost = { value = low_travel_option_cost multiply = 0.5 + round = yes + min = 1 } low_travel_option_cost = { value = low_travel_option_base_cost multiply = tier_multiplier + multiply = activity_cost_scale_by_era if = { limit = { has_perk = well_prepared_perk } multiply = 0.75 } + round = yes + min = 1 } medium_travel_option_cost = { value = medium_travel_option_base_cost multiply = tier_multiplier + multiply = activity_cost_scale_by_era if = { limit = { has_perk = well_prepared_perk } multiply = 0.75 } + round = yes + min = 1 } high_travel_option_cost = { value = high_travel_option_base_cost multiply = tier_multiplier + multiply = activity_cost_scale_by_era if = { limit = { has_perk = well_prepared_perk } multiply = 0.75 } + round = yes + min = 1 } struggle_low_danger_impact = { diff --git a/common/script_values/00_war_values.txt b/common/script_values/00_war_values.txt index 1fcb0822e..18219f56a 100644 --- a/common/script_values/00_war_values.txt +++ b/common/script_values/00_war_values.txt @@ -10,7 +10,12 @@ standard_truce_duration_days = { ## Flexible truces perk. if = { limit = { - scope:attacker = { has_perk = flexible_truces_perk } + scope:attacker = { + has_perk = flexible_truces_perk + NOT = { + government_has_flag = government_is_republic + } + } } add = -450 } @@ -88,7 +93,7 @@ determined_independence_defensive_advantage_value = 15 not_tribal_raid_prestige_multiplier = 1.5 raid_gold_value = { #How much cash does this settlement generate in a raid? - value = monthly_income + value = total_monthly_tax_income multiply = 10 #Sensible max-mins. @@ -100,7 +105,7 @@ raid_gold_value = { #How much cash does this settlement generate in a raid? } tour_tax_gold_value = { - value = monthly_income + value = total_monthly_tax_income multiply = 4 #Give a whole number. @@ -272,7 +277,7 @@ byzantium_conquests_ai_score_value = { ## Y'know, roughly. AND = { NOT = { - exists = title:e_byzantium + exists = title:e_byzantium.holder } primary_title = { tier <= tier_empire @@ -281,13 +286,13 @@ byzantium_conquests_ai_score_value = { empire = title:e_latin_empire } } - OR = { - culture = { has_cultural_pillar = heritage_byzantine } - culture = culture:greek - culture = { - any_parent_culture_or_above = { + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { this = culture:greek } + has_cultural_pillar = heritage_byzantine } } } @@ -387,25 +392,20 @@ muslim_invasions_prefer_nonmuslims_ai_score_value = { } every_in_list = { list = target_titles + limit = { + trigger_if = { + limit = { + tier >= tier_county + is_title_created = yes + } + holder.top_liege.religion != religion:islam_religion + } + } 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 - } - } + any_de_jure_county = { + title_province = { + geographical_region = ghw_region_holy_land } } } @@ -413,50 +413,18 @@ muslim_invasions_prefer_nonmuslims_ai_score_value = { } 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 - } - } + any_de_jure_county = { + title_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 } - } - } - } - } + else = { add = 2 } } @@ -484,6 +452,114 @@ pam_peace_of_god_coreligionist_war_ai_score_value = { } } +frankokratia_leader_protection_value = { + #Added at the end of every ai_score_mult in all CBs for now. + + #Fourth Crusade flavor: + #We protect the Frankokratia leader to avoid breaking the story cycle. + if = { + limit = { + scope:defender = { + any_owned_story = { + type = frankokratia_story + NOT = { has_variable = franko_war_complete } + } + } + } + value = 0 + } + else = { + value = 1 + } +} +# The AI Mongol invader only uses its dedicated invasion CBs, which skip common_cb_ai_score_mult +mongol_invader_regular_cb_ai_score_value = { + value = 1 + if = { + limit = { + scope:attacker = { + any_owned_story = { story_type = story_mongol_invasion } + } + } + value = 0 + } +} +# notice not all cbs have target_titles or scope:target. don't add those without protection +common_cb_ai_score_mult = { + value = 1 + multiply = frankokratia_leader_protection_value + multiply = mongol_invader_regular_cb_ai_score_value +} +# for any cb taking land +aggressive_cb_ai_score_mult = { + value = 1 + if = { + limit = { + # other govs are ignored intentionally: you might be able to hold tribal as merits but that is not a good idea + scope:attacker = { + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + government_has_flag = government_is_landless_adventurer # you change to those govs when you get land anyway + } + } + any_in_list = { + list = target_titles + feudal_clan_tribal_conquest_constraints = yes + } + } + multiply = 0 + } + multiply = zealous_war_on_head_of_faith_ai_score_value + multiply = struggle_wars_prioritise_struggle_targets_value + multiply = byzantium_conquests_ai_score_value + multiply = muslim_invasions_prefer_nonmuslims_ai_score_value + multiply = pam_peace_of_god_coreligionist_war_ai_score_value +} + +religious_cb_ai_score_mult = { + value = 1 + # Increase odds if the character is a vassal with Ghazi Contract + if = { + limit = { + scope:attacker = { + top_liege != this + vassal_contract_has_flag = vassal_contract_cheaper_religious_war + } + } + add = 1 + } + # Holy Wars are limited to connected neighbours to limit big empire expansions over weak realms. + if = { + limit = { religious_war_vassals_constraints = yes } + multiply = 0 + } +} + +vassalization_cb_ai_score_mult = { + if = { + limit = { + OR = { + AND = { + scope:attacker = { + NOT = { government_has_flag = government_is_tribal } + } + scope:defender = { + government_has_flag = government_is_tribal + } + } + scope:attacker = { + government_has_flag = government_is_mandala + vassal_limit_available < 1 + } + } + } + value = 0 + } + else = { + value = 1 + } +} zealous_war_on_head_of_faith_ai_score_value = { value = 1 if = { @@ -498,6 +574,9 @@ zealous_war_on_head_of_faith_ai_score_value = { } } +common_cb_ai_score_mult_additive = { + add = house_relation_ai_score_value +} # Raid for captives raid_for_captives_ai_score_value = { value = 10 @@ -723,9 +802,9 @@ siege_base_capture_chance = { 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 } + scope:barony.culture = { has_cultural_parameter = characters_more_likely_to_be_captured_in_sieges } # ... or you know your liege will pay your ransom. - scope:barony.holder.culture = { has_cultural_parameter = knights_die_less_but_are_captured_more } + scope:barony.holder.culture = { has_cultural_parameter = characters_more_likely_to_be_captured_in_sieges } } # Ransoms or no, the primary participants & their heirs know better than to surrender. character_is_potential_valuable_prisoner = no @@ -759,7 +838,7 @@ raid_base_capture_chance = { } county_control_loss_value = { - value = -40 + value = -30 # Dynasty Perk: No Quarter if = { @@ -773,7 +852,7 @@ county_control_loss_value = { } raid_county_control_loss_value = { - value = -10 + value = -5 # Dynasty Perk: No Quarter if = { @@ -782,7 +861,7 @@ raid_county_control_loss_value = { dynasty ?= { has_dynasty_perk = fp1_pillage_legacy_5 } } } - add = -20 + add = -10 } } @@ -831,7 +910,7 @@ root_military_strength_higher_than_military_target_value = { } 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!! + multiply = var:ai_strength_multiplier # 1.25 == 25% stronger than, remember to potty train your script and have it remove the variable after usage!! } } @@ -855,7 +934,7 @@ target_military_strength_root_value = { # 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" +# "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 @@ -997,7 +1076,7 @@ house_relation_ai_score_value = { if = { limit = { scope:defender.house ?= { - NOT = { this = scope:attacker.house } + this != scope:attacker.house has_house_relation_with = scope:attacker.house } } @@ -1017,28 +1096,85 @@ house_relation_ai_score_value = { } } } -house_relation_less_likely_war_target_value = -150 -house_relation_more_likely_war_target_value = 150 +house_relation_less_likely_war_target_value = -0.75 +house_relation_more_likely_war_target_value = 1.5 -frankokratia_leader_protection_value = { - #Multiplied at the end of every ai_score_mult in all CBs for now. +# Reparations take at most what the payer holds plus this many years of income +reparations_max_debt_years_value = 1 - #Fourth Crusade flavor: - #We protect the Frankokratia leader to avoid breaking the story cycle. +# EXPECTS: paying character scope +# 1 plus existing debt in years of income, and we divide the new debt allowance by this +reparations_gold_debt_divisor_value = { value = 1 if = { limit = { - scope:defender = { - any_owned_story = { - type = frankokratia_story - NOT = { has_variable = franko_war_complete } - } - } + gold < 0 + yearly_character_income > 0 + } + add = { + value = gold + multiply = -1 + divide = yearly_character_income } - multiply = 0 } } +reparations_treasury_debt_divisor_value = { + value = 1 + if = { + limit = { + treasury < 0 + yearly_character_income > 0 + } + add = { + value = treasury + multiply = -1 + divide = yearly_character_income + } + } +} + +# EXPECTS: paying character scope. Currency matches pay_treasury_or_gold. +reparations_max_payment_value = { + value = yearly_character_income + multiply = reparations_max_debt_years_value + if = { + limit = { + has_treasury = yes + government_allows = replace_gold_cost_by_treasury + } + if = { + limit = { treasury > 0 } + add = treasury + } + else = { + divide = reparations_treasury_debt_divisor_value + } + } + else_if = { + limit = { gold > 0 } + add = gold + } + else = { + divide = reparations_gold_debt_divisor_value + } + min = 1 +} + +# EXPECTS: paying character scope, for reparations paid in gold only +reparations_max_gold_payment_value = { + value = yearly_character_income + multiply = reparations_max_debt_years_value + if = { + limit = { gold > 0 } + add = gold + } + else = { + divide = reparations_gold_debt_divisor_value + } + min = 1 +} + ### Overlord join probability (fixed point between 0 and 1) # fallback value if the value is not defined in the selected casus belli. # Uses same logic and scope as the same field defined in casus_belli. diff --git a/common/script_values/99_court_chaplain_values.txt b/common/script_values/99_court_chaplain_values.txt index 17865f49c..92ebcac6b 100644 --- a/common/script_values/99_court_chaplain_values.txt +++ b/common/script_values/99_court_chaplain_values.txt @@ -408,16 +408,12 @@ court_chaplain_fabricate_claim_monthly_increase_nemesis_bonus = { } court_chaplain_fabricate_claim_county_base = 3 -court_chaplain_fabricate_claim_county_min_cost = { - value = { 40 60 } -} +court_chaplain_fabricate_claim_county_min_cost = 30 court_chaplain_fabricate_claim_duchy_base = 7 -court_chaplain_fabricate_claim_duchy_min_cost = { - value = { 80 100 } -} +court_chaplain_fabricate_claim_duchy_min_cost = 60 -court_chaplain_fabricate_claim_factor = 1 +court_chaplain_fabricate_claim_factor = 0.6 court_chaplain_fabricate_claim_struggle_penalty_multiplier_value = { if = { @@ -447,6 +443,9 @@ court_chaplain_fabricate_claim_county_cost = { # Struggle Factors multiply = court_chaplain_fabricate_claim_struggle_penalty_multiplier_value + divide = 5 + round = yes + multiply = 5 min = court_chaplain_fabricate_claim_county_min_cost } @@ -460,6 +459,9 @@ court_chaplain_fabricate_claim_duchy_cost = { # Struggle Factors multiply = court_chaplain_fabricate_claim_struggle_penalty_multiplier_value + divide = 5 + round = yes + multiply = 5 min = court_chaplain_fabricate_claim_duchy_min_cost } diff --git a/common/scripted_character_templates/00_peasants_template.txt b/common/scripted_character_templates/00_peasants_template.txt index 954436e31..8afd922d6 100644 --- a/common/scripted_character_templates/00_peasants_template.txt +++ b/common/scripted_character_templates/00_peasants_template.txt @@ -1315,9 +1315,10 @@ settlement_elder_character = { } } random_list = { - 1 = { add_trait = education_republican_knowledge_2 } - 1 = { add_trait = education_republican_knowledge_3 } - 1 = { add_trait = education_republican_knowledge_4 } + 3 = { add_trait = education_republican_knowledge_2 } + 4 = { add_trait = education_republican_knowledge_3 } + 2 = { add_trait = education_republican_knowledge_4 } + 1 = { add_trait = education_republican_knowledge_5 } } } } diff --git a/common/scripted_character_templates/00_pool_repopulation_character_templates.txt b/common/scripted_character_templates/00_pool_repopulation_character_templates.txt index 78cbc309a..81b1819b8 100644 --- a/common/scripted_character_templates/00_pool_repopulation_character_templates.txt +++ b/common/scripted_character_templates/00_pool_repopulation_character_templates.txt @@ -912,7 +912,7 @@ pool_repopulate_local_flavor = { } culture:cale = { trigger = { - root.capital_province = { + root.capital_province ?= { OR = { geographical_region = custom_cale_region } @@ -928,7 +928,7 @@ pool_repopulate_local_flavor = { } culture:beur = { trigger = { - root.capital_province = { + root.capital_province ?= { OR = { geographical_region = custom_beur_region } @@ -979,7 +979,7 @@ pool_repopulate_local_flavor = { } culture:lipka = { trigger = { - root.capital_province = { + root.capital_province ?= { OR = { geographical_region = custom_west_slavia geographical_region = ghw_region_southern_russia @@ -990,7 +990,7 @@ pool_repopulate_local_flavor = { } culture:sami = { trigger = { - root.capital_province = { + root.capital_province ?= { OR = { geographical_region = sami_nomad_area geographical_region = karelia_nomad_area @@ -1000,7 +1000,7 @@ pool_repopulate_local_flavor = { } culture:NEOW_esperantisto = { trigger = { - root.capital_province = { + root.capital_province ?= { OR = { geographical_region = entire_world } @@ -1137,6 +1137,7 @@ pool_repopulate_local_flavor = { } if = { limit = { + exists = root.capital_province NOT = { knows_language_of_culture = root.capital_province.culture } diff --git a/common/scripted_effects/00_mongol_invasion_effects.txt b/common/scripted_effects/00_mongol_invasion_effects.txt index 582edce6a..88bd55b0d 100644 --- a/common/scripted_effects/00_mongol_invasion_effects.txt +++ b/common/scripted_effects/00_mongol_invasion_effects.txt @@ -2136,8 +2136,8 @@ #} # #mongols_devastate_county_effect = { -# change_development_level = { -# subtract = scope:county.development_level +# change_prosperity_level = { +# subtract = scope:county.prosperity_level # multiply = 0.5 # floor = yes # } diff --git a/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt b/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt index d6e3c3154..061cfd417 100644 --- a/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt +++ b/common/scripted_effects/10_dlc_tgp_japan_scripted_effects.txt @@ -427,71 +427,70 @@ #} # #add_random_internal_japanese_manor_building = { -# random_list = { -# 10 = { -# trigger = { -# NOT = { has_domicile_building_or_higher = japanese_main_tax_collectors_01 } -# domicile_building_has_free_internal_slot = japanese_manor_main_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 -# } +# if = { +# limit = { +# domicile_building_has_free_internal_slot = japanese_manor_main_01 # } -# 10 = { -# trigger = { -# NOT = { has_domicile_building_or_higher = japanese_main_carpenter_01 } -# domicile_building_has_free_internal_slot = japanese_manor_main_01 +# 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 +# } # } -# 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 = 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 } -# domicile_building_has_free_internal_slot = japanese_manor_main_01 +# 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 +# } # } -# 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_office_01 } -# domicile_building_has_free_internal_slot = japanese_manor_main_01 +# 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 +# } # } -# 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 } -# domicile_building_has_free_internal_slot = japanese_manor_main_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 } -# domicile_building_has_free_internal_slot = japanese_manor_main_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 +# 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 +# } # } # } # } @@ -2898,7 +2897,7 @@ # } # every_held_title = { # limit = { exists = var:administrative_ui_special_title } -# holder ?= { tgp_destroy_ceremonial_liege_title_effect = yes } +# var:administrative_ui_special_title.holder ?= { tgp_destroy_ceremonial_liege_title_effect = yes } # } # } #} @@ -3386,7 +3385,7 @@ # } # } # start_war = { -# #lets make sure this is appropriate for Japan +# #lets make sure this is appropriate for Japan # cb = domination_cb # target = scope:main_defender # target_title = scope:title_scope @@ -3721,6 +3720,33 @@ # } #} # +#tgp_japan_internal_soryo_war_crime_effect = { +# if = { +# limit = { tgp_japan_internal_soryo_war_is_crime_trigger = yes } +# scope:attacker = { +# # Message for attacker +# send_interface_toast = { +# type = event_war_bad +# title = tgp_japan_soryo_war_is_crime_title +# left_icon = scope:defender +# right_icon = top_liege +# top_liege = { +# send_interface_toast = { +# type = event_war_bad +# title = tgp_japan_soryo_war_is_crime_kampaku_title +# left_icon = scope:attacker +# right_icon = scope:defender +# add_opinion = { +# target = scope:attacker +# modifier = admin_soryo_conquest_crime +# } +# } +# } +# } +# } +# } +#} +# #tgp_learn_chinese_effect_game_start = { # if = { # limit = { @@ -3833,7 +3859,13 @@ # } # } # } -# add_character_modifier = { modifier = ep3_renounced_estate } +# if = { +# limit = { tgp_retires_to_eastern_estate_trigger = yes } +# add_character_modifier = { modifier = ep3_renounced_estate } +# } +# else = { +# add_character_modifier = { modifier = tgp_western_renounced_estate } +# } # custom_tooltip = { # text = renounce_noble_family_title_decision_tt # send_interface_toast = { @@ -3847,6 +3879,7 @@ # if = { # limit = { # NOT = { has_trait = devoted } +# rite = { rite_has_doctrine = doctrine_monasticism_encouraged } # } # add_trait = devoted # } @@ -3886,15 +3919,64 @@ # } # primary_title.current_heir = { save_scope_as = heir_temp } # create_title_and_vassal_change = { -# type = appointment +# type = granted # save_scope_as = title_change # add_claim_on_loss = no # } -# every_held_title = { -# limit = { tier > tier_barony } -# change_title_holder_include_vassals = { -# holder = scope:heir_temp -# change = scope:title_change +# if = { +# limit = { is_governor = no } +# every_held_title = { +# limit = { tier > tier_barony } +# change_title_holder_include_vassals = { +# holder = scope:new_player +# change = scope:title_change +# } +# } +# # pass all artifacts away +# every_character_artifact = { +# if = { +# limit = { is_equipped = yes } +# add_to_list = equipped +# } +# set_owner = { +# target = scope:new_player +# history = { +# type = inherited +# recipient = scope:new_player +# } +# } +# } +# } +# else = { +# # pass the artifact if it's binded to NF (should not happen in vanilla tho), take from others title or not binded to a title +# every_character_artifact = { +# limit = { +# trigger_if = { +# limit = { has_variable = artifact_succession_title } +# OR = { +# var:artifact_succession_title.holder ?= { this != scope:retired } +# var:artifact_succession_title ?= { is_noble_family_title = yes } +# } +# } +# } +# if = { +# limit = { is_equipped = yes } +# add_to_list = equipped +# } +# set_owner = { +# target = scope:new_player +# history = { +# type = inherited +# recipient = scope:new_player +# } +# } +# } +# every_held_title = { +# limit = { is_noble_family_title = yes } +# change_title_holder = { +# holder = scope:new_player +# change = scope:title_change +# } # } # } # resolve_title_and_vassal_change = scope:title_change diff --git a/common/scripted_triggers/00_law_triggers.txt b/common/scripted_triggers/00_law_triggers.txt index 3af77c4ce..231878fc9 100644 --- a/common/scripted_triggers/00_law_triggers.txt +++ b/common/scripted_triggers/00_law_triggers.txt @@ -300,7 +300,7 @@ can_keep_partition_succession_law_trigger = { can_have_partition_succession_law_trigger = { culture = { - has_innovation = innovation_hereditary_rule + has_innovation = innovation_royal_prerogative } custom_description = { text = succession_laws_must_have_organised_government_tooltip diff --git a/common/scripted_triggers/03_fp2_scripted_triggers.txt b/common/scripted_triggers/03_fp2_scripted_triggers.txt index 9443a8d36..c033bca0e 100644 --- a/common/scripted_triggers/03_fp2_scripted_triggers.txt +++ b/common/scripted_triggers/03_fp2_scripted_triggers.txt @@ -43,6 +43,26 @@ eligible_for_fp2_urbanism_legacy_trigger = { } } +eligible_for_fp2_urbanism_legacy_trigger = { + has_fp2_dlc_trigger = yes + dynasty.dynast = { + OR = { + game_rule_unrestricted_dynasty_legacies_trigger = yes + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + culture = { + has_cultural_pillar = heritage_iberian + } + capital_province ?= { + geographical_region = world_europe_west_iberia + } + government_has_flag = government_is_republic # Republics also gain access to this legacy + } + } +} + eligible_for_fp2_dynasty_legacies_trigger = { has_fp2_dlc_trigger = yes dynasty.dynast = { diff --git a/common/scripted_triggers/07_frankokratia_triggers.txt b/common/scripted_triggers/07_frankokratia_triggers.txt index e6cddce7f..d1e651fa9 100644 --- a/common/scripted_triggers/07_frankokratia_triggers.txt +++ b/common/scripted_triggers/07_frankokratia_triggers.txt @@ -387,6 +387,71 @@ # #} # +##Byzantine vassal who swears to the new king of their de jure kingdom when Byzantium shatters +#ep3_frankokratia_byz_vassal_joins_new_kingdom_trigger = { +# is_in_list = byz_vassals +# highest_held_title_tier <= tier_duchy +# #Only the openly disloyal refuse +# OR = { +# has_trait = loyal +# NOR = { +# has_trait = disloyal +# has_trait = ambitious +# AND = { +# ai_boldness >= medium_positive_ai_value +# ai_honor <= medium_negative_ai_value +# } +# } +# } +# capital_county = { +# save_temporary_scope_as = prime_title +# kingdom.holder ?= { +# is_in_list = byz_vassals +# } +# } +# has_same_government = scope:prime_title.kingdom.holder +# #One of their counties borders the king's realm +# any_sub_realm_county = { +# any_neighboring_county = { +# holder = { +# target_is_same_character_or_above = scope:prime_title.kingdom.holder +# } +# } +# } +#} +# +##Byzantine vassal who swears to the new king of their de jure kingdom when Byzantium shatters +#ep3_frankokratia_byz_vassal_joins_new_kingdom_trigger = { +# is_in_list = byz_vassals +# highest_held_title_tier <= tier_duchy +# #Only the openly disloyal refuse +# OR = { +# has_trait = loyal +# NOR = { +# has_trait = disloyal +# has_trait = ambitious +# AND = { +# ai_boldness >= medium_positive_ai_value +# ai_honor <= medium_negative_ai_value +# } +# } +# } +# capital_county = { +# save_temporary_scope_as = prime_title +# kingdom.holder ?= { +# is_in_list = byz_vassals +# } +# } +# has_same_government = scope:prime_title.kingdom.holder +# #One of their counties borders the king's realm +# any_sub_realm_county = { +# any_neighboring_county = { +# holder = { +# target_is_same_character_or_above = scope:prime_title.kingdom.holder +# } +# } +# } +#} ep3_frankokratia_financier_trigger = { always = no } ep3_frankokratia_financier_sub_trigger = { always = no } ep3_frankokratia_financier_exists_trigger = { always = no } @@ -403,36 +468,3 @@ ep3_orthodox_faith_trigger = { religion = religion:oriental_orthodox_religion } } - -#Byzantine vassal who swears to the new king of their de jure kingdom when Byzantium shatters -ep3_frankokratia_byz_vassal_joins_new_kingdom_trigger = { - is_in_list = byz_vassals - highest_held_title_tier <= tier_duchy - #Only the openly disloyal refuse - OR = { - has_trait = loyal - NOR = { - has_trait = disloyal - has_trait = ambitious - AND = { - ai_boldness >= medium_positive_ai_value - ai_honor <= medium_negative_ai_value - } - } - } - capital_county = { - save_temporary_scope_as = prime_title - kingdom.holder ?= { - is_in_list = byz_vassals - } - } - has_same_government = scope:prime_title.kingdom.holder - #One of their counties borders the king's realm - any_sub_realm_county = { - any_neighboring_county = { - holder = { - target_is_same_character_or_above = scope:prime_title.kingdom.holder - } - } - } -} diff --git a/common/scripted_triggers/pam_secular_faith_triggers.txt b/common/scripted_triggers/pam_secular_faith_triggers.txt index ce4a17727..b3176925b 100644 --- a/common/scripted_triggers/pam_secular_faith_triggers.txt +++ b/common/scripted_triggers/pam_secular_faith_triggers.txt @@ -39,6 +39,17 @@ pam_sf_monastic_brewery_province_trigger = { } } +# Province scope: a church holding that also brews, whatever the local resource allows. +pam_sf_monastic_brewery_province_trigger = { + has_holding_type = church_holding + OR = { + has_building_or_higher = beer_brewery_1 + has_building_or_higher = mead_brewery_1 + has_building_or_higher = cider_brewery_1 + has_building_or_higher = brewers_guild_1 + } +} + pam_can_adopt_forbidden_personal_tenet_trigger = { any_desired_tenet = { only_positive = yes diff --git a/common/situation/situations/_situations.info b/common/situation/situations/_situations.info index 785cd825c..7210910c4 100644 --- a/common/situation/situations/_situations.info +++ b/common/situation/situations/_situations.info @@ -56,6 +56,11 @@ situation_type = { # Defaults to the 'minor' group. situation_group_type = + # Religion type the situation is focused on. + # While the situation window is open, the religion map mode greys out counties of other religions. + # Optional, defaults to none. + religion = + # 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. @@ -209,6 +214,12 @@ situation_type = { # Default: yes use_situation_phase_flat_icons = yes + # Should the situation allow phase progress to go into the negatives? + # Should be true if phases use negative takeover values + # Default: no + # + allow_negative_progress = no + # Which phases can this Situation Type be in? (at least one needs to exist) phases = { @@ -232,6 +243,7 @@ situation_type = { # scope:situation = situation # scope:situation_sub_region = situation sub region this phase belongs to on_start = { } + # Effect run when phase in a specific sub region is being ended (and next phase has been determined) # Root = situation # scope:situation = situation @@ -255,7 +267,8 @@ situation_type = { # (optional) Map province effect intensity (range 0.0-1.0, default 1.0) map_province_effect_intensity = 1.0 - # (optional) Maximum duration (days) this phase will run. + # (optional) Maximum duration (days) this phase will run + # Note: this does NOT get applied on start if used on a Situation's start_phase; this is applied when a phase is changed to # `max_duration_next_phase` will determine which phase will be next, if max_duration is met # [Scripted Duration] # root - situation @@ -305,6 +318,26 @@ situation_type = { catalyst_betrayed_alliance = 25 catalyst_something_something = 30 } + + ### (optional) As above, but each catalyst entry depends on a specific dlc being enabled + # dlc_feature - which DLC is required? If no valid DLC is provided, fallback will be used + # dlc_enabled_catalysts - which catalysts get added if DLC is active? + # fallback_catalysts - which catalysts get added if DLC is not active? Optional. + # + dlc_catalysts = { + dlc_feature = all_under_heaven + + dlc_enabled_catalysts = { + catalyst_silk_road_china_consolidation = silk_road_steppe_china_consolidation_value + catalyst_yellow_river_flood = yellow_river_catastrophe_value + catalyst_hegemon_exploded = sudden_loss_of_hegemon_value + } + + fallback_catalysts = { + catalyst_haesteinn_conquered_indonesia = fishy_catalyst_value + catalyst_khan_invaded_ireland = unexpected_island_invasion_value + } + } } # Another possible future phase @@ -320,6 +353,10 @@ situation_type = { # Apply modifiers / parameters to current situation phase & participants # Examples: "War Effects", "Diplomacy Effects" # Note: The arbitrary name you set will be used as it's localization key + # Note: The character and county modifiers of each participant group are named by the + # localization key __ if it exists, + # otherwise by _ + # Use $PARTICIPANT_GROUP$ in that localization for the group's name with a tooltip link to the group # war_effects_and_stuff_set = { diff --git a/common/story_cycles/ep3_story_cycle_harrying_of_the_north.txt b/common/story_cycles/ep3_story_cycle_harrying_of_the_north.txt index 0eebb70c5..122570a95 100644 --- a/common/story_cycles/ep3_story_cycle_harrying_of_the_north.txt +++ b/common/story_cycles/ep3_story_cycle_harrying_of_the_north.txt @@ -583,8 +583,13 @@ # culture = culture:anglo_saxon # } # } +# OR = { +# culture = culture:anglo_saxon +# culture = culture:english +# target_is_de_jure_liege_or_above = title:k_england +# } # } -# change_county_control = medium_discontent_loss +# change_county_control = miniscule_county_control_loss # } # } # } @@ -603,8 +608,13 @@ # culture = culture:anglo_saxon # } # } +# OR = { +# culture = culture:anglo_saxon +# culture = culture:english +# target_is_de_jure_liege_or_above = title:k_england +# } # } -# change_county_control = minor_discontent_loss +# change_county_control = -2 # } # } # } @@ -631,8 +641,14 @@ # culture = culture:anglo_saxon # } # } +# OR = { +# culture = culture:anglo_saxon +# culture = culture:english +# target_is_de_jure_liege_or_above = title:k_england +# } +# county_control < county_control_baseline # } -# change_county_control = medium_discontent_gain +# change_county_control = miniscule_county_control_gain # } # } # } @@ -651,8 +667,14 @@ # culture = culture:anglo_saxon # } # } +# OR = { +# culture = culture:anglo_saxon +# culture = culture:english +# target_is_de_jure_liege_or_above = title:k_england +# } +# county_control < county_control_baseline # } -# change_county_control = minor_discontent_gain +# change_county_control = 2 # } # } # } diff --git a/common/subject_contracts/contracts/administrative.txt b/common/subject_contracts/contracts/administrative.txt index 5e3e3adb6..d092a198a 100644 --- a/common/subject_contracts/contracts/administrative.txt +++ b/common/subject_contracts/contracts/administrative.txt @@ -2,13 +2,11 @@ obligation_levels = { default = { levies = { - value = 0.3 - #multiply = governor_efficiency + value = 0.2 } tax = { - value = 0.75 - #multiply = governor_efficiency + value = 0.5 } } } @@ -97,7 +95,7 @@ administrative_themes = { men_at_arms_maintenance = -0.05 } subject_modifier = { - development_growth_factor = 0.2 + prosperity_growth_factor = 0.2 build_gold_cost = -0.1 build_speed = -0.1 men_at_arms_title_limit = -2 @@ -158,8 +156,8 @@ administrative_themes = { men_at_arms_maintenance = 0.05 } subject_modifier = { - development_growth_factor = -0.25 - monthly_county_control_growth_factor = 0.1 + prosperity_growth_factor = -0.25 + monthly_control_change_when_above_baseline_mult = -0.1 maa_damage_mult = 0.1 men_at_arms_title_cap = 2 men_at_arms_title_limit = 2 @@ -408,7 +406,7 @@ administrative_themes = { naval_movement_speed_mult = 0.25 no_disembark_penalty = yes coastal_advantage = 10 - development_growth_factor = 0.1 + prosperity_growth_factor = 0.1 monthly_treasury_from_military_budget_base = 1 men_at_arms_title_limit = 2 men_at_arms_title_cap = 2 @@ -418,7 +416,6 @@ administrative_themes = { flag = vassal_contract_war_override flag = admin_naval_duchy_expansion_unlocked - flag = admin_tradeport_obligation_bonus flag = admin_theme_naval flag = province_military } diff --git a/common/subject_contracts/contracts/japan_administrative.txt b/common/subject_contracts/contracts/japan_administrative.txt index a162472eb..c4db22531 100644 --- a/common/subject_contracts/contracts/japan_administrative.txt +++ b/common/subject_contracts/contracts/japan_administrative.txt @@ -257,8 +257,8 @@ japan_administrative_salary = { subject_salary_income_gold_mult = -0.5 } - ai_liege_desire = 1 - ai_subject_desire = 5 + ai_liege_desire = 5 + ai_subject_desire = 1 subject_opinion = -25 @@ -273,12 +273,12 @@ japan_administrative_salary = { } - ai_liege_desire = 2 - ai_subject_desire = 4 + ai_liege_desire = 4 + ai_subject_desire = 2 subject_opinion = -15 - score = 1 + score = -1 } salary_medium = { parent = salary_low @@ -302,8 +302,8 @@ japan_administrative_salary = { subject_salary_income_gold_mult = 0.25 } - ai_liege_desire = 4 - ai_subject_desire = 2 + ai_liege_desire = 2 + ai_subject_desire = 4 subject_opinion = 5 @@ -317,8 +317,8 @@ japan_administrative_salary = { subject_salary_income_gold_mult = 0.5 } - ai_liege_desire = 5 - ai_subject_desire = 1 + ai_liege_desire = 1 + ai_subject_desire = 5 subject_opinion = 10 diff --git a/common/subject_contracts/groups/subject_contract_groups.txt b/common/subject_contracts/groups/subject_contract_groups.txt index 927b69dad..8ed94140c 100644 --- a/common/subject_contracts/groups/subject_contract_groups.txt +++ b/common/subject_contracts/groups/subject_contract_groups.txt @@ -18,6 +18,11 @@ republic_vassal = { contracts = { republic_government_obligations + republic_government_salaries + republic_government_treasury_conversion + republic_government_free_city + republic_government_defensive_obligation + republic_government_war_aids } } diff --git a/common/succession_appointment/admin_emperor.txt b/common/succession_appointment/admin_emperor.txt index 7cedcaf3a..20911e59a 100644 --- a/common/succession_appointment/admin_emperor.txt +++ b/common/succession_appointment/admin_emperor.txt @@ -302,14 +302,15 @@ desc = evil_faith_sucession_desc } } - + if = { # Score for house members of the emperor is affected by the capital's popular opinion limit = { exists = top_liege.house house ?= top_liege.house + exists = top_liege.capital_county } add = { - value = top_liege.capital_county.county_holder_opinion + value = top_liege.capital_county.popular_opinion desc = popular_opinion_in_capital_desc } } diff --git a/common/succession_appointment/admin_governor.txt b/common/succession_appointment/admin_governor.txt index 9a269e40e..2f359875c 100644 --- a/common/succession_appointment/admin_governor.txt +++ b/common/succession_appointment/admin_governor.txt @@ -14,6 +14,7 @@ desc = sum_of_skills_desc } + add = appointment_score_base add = appointment_score_non_military add = appointment_score_non_merit diff --git a/common/succession_election/NEOW_succession_elections.txt b/common/succession_election/NEOW_succession_elections.txt index 8d3038539..bb07b70b1 100644 --- a/common/succession_election/NEOW_succession_elections.txt +++ b/common/succession_election/NEOW_succession_elections.txt @@ -69,7 +69,6 @@ } AND = { highest_held_title_tier >= scope:title.holder.highest_held_title_tier_minus_two_landed - target_is_de_facto_liege_or_above = scope:character } } rite = scope:title.holder.rite @@ -86,7 +85,6 @@ } AND = { highest_held_title_tier >= scope:title.holder.highest_held_title_tier_minus_two_landed - target_is_de_facto_liege_or_above = scope:character } } faith = scope:title.holder.faith diff --git a/common/travel/point_of_interest_types/travel_point_of_interest_types.txt b/common/travel/point_of_interest_types/travel_point_of_interest_types.txt index 75079673d..2c0b8f642 100644 --- a/common/travel/point_of_interest_types/travel_point_of_interest_types.txt +++ b/common/travel/point_of_interest_types/travel_point_of_interest_types.txt @@ -188,7 +188,7 @@ poi_capitals = { # Walls and Forts poi_special_buildings_martial = { build_province_list = { - every_special_building_province = { + every_special_district_province = { limit = { OR = { has_building_with_flag = { flag = travel_point_of_interest_martial } @@ -264,7 +264,7 @@ poi_special_buildings_martial = { # Universities & places of general learning poi_special_buildings_learning = { build_province_list = { - every_special_building_province = { + every_special_district_province = { limit = { has_building_with_flag = { flag = travel_point_of_interest_learning } } @@ -327,7 +327,7 @@ poi_special_buildings_learning = { # Religious sites poi_special_buildings_religious = { build_province_list = { - every_special_building_province = { + every_special_district_province = { limit = { has_building_with_flag = { flag = travel_point_of_interest_religious } } @@ -559,7 +559,7 @@ poi_standalone_holy_site = { # Palaces & Political places poi_special_buildings_diplomatic = { build_province_list = { - every_special_building_province = { + every_special_district_province = { limit = { has_building_with_flag = { flag = travel_point_of_interest_diplomatic } } @@ -664,7 +664,7 @@ poi_grand_city = { # Ancient / New wonders poi_special_buildings_wonder = { build_province_list = { - every_special_building_province = { + every_special_district_province = { limit = { has_building_with_flag = { flag = travel_point_of_interest_wonder } } @@ -710,9 +710,10 @@ poi_special_buildings_wonder = { # Economic Buildings (mines, ports) poi_special_buildings_economic = { build_province_list = { - every_special_building_province = { + every_special_district_province = { limit = { has_building_with_flag = { flag = travel_point_of_interest_economic } + NOT = { has_building_with_flag = { flag = silk_road_node } } } add_to_list = provinces } @@ -800,7 +801,7 @@ poi_lighthouse_of_alexandria = { # Natural features, e.g. Mount X, Lake X poi_natural_feature = { build_province_list = { - every_special_building_province = { + every_special_district_province = { limit = { has_building_with_flag = { flag = travel_point_of_interest_natural_feature } } @@ -1367,7 +1368,7 @@ poi_battles_historical = { # Stress relief poi_special_buildings_stress_relief = { build_province_list = { - every_special_building_province = { + every_special_district_province = { limit = { has_building_with_flag = { flag = travel_point_of_interest_stress_relief } } @@ -1411,7 +1412,7 @@ poi_special_buildings_stress_relief = { poi_silk_road_node = { build_province_list = { - every_special_building_province = { + every_special_district_province = { limit = { has_building_with_flag = { flag = silk_road_node } } @@ -1475,7 +1476,7 @@ poi_mandala_capital = { } root.overlord ?= { government_has_flag = government_is_mandala } this = root.overlord.capital_province - has_ruined_great_building = no + has_ruined_great_district = no } save_temporary_scope_value_as = { name = piety_gain_amount @@ -1508,7 +1509,7 @@ poi_mandala_capital = { limit = { this.county.holder.capital_province = this NOT = { root = this.county.holder } - has_ruined_great_building = no + has_ruined_great_district = no root = { #Only Tribals, Mandalas, or those of the same religion care OR = { government_has_flag = government_is_mandala @@ -1547,7 +1548,7 @@ poi_mandala_capital = { else_if = { #Visiting Mandala Capital - Ruined limit = { NOT = { root = this.county.holder } - has_ruined_great_building = yes + has_ruined_great_district = yes root = { #Only Tribals, Mandalas, or those of the same religion care OR = { government_has_flag = government_is_mandala diff --git a/common/vassal_stances/00_vassal_stances.txt b/common/vassal_stances/00_vassal_stances.txt index c6ffaa270..da021693c 100644 --- a/common/vassal_stances/00_vassal_stances.txt +++ b/common/vassal_stances/00_vassal_stances.txt @@ -403,7 +403,7 @@ parochial = { if = { limit = { culture = { - has_innovation = innovation_development_04 + has_innovation = innovation_prosperity_04 } } multiply = 1.2 diff --git a/history/cultures/translyvanian.txt b/history/cultures/translyvanian.txt index ef5337c48..41652a98c 100644 --- a/history/cultures/translyvanian.txt +++ b/history/cultures/translyvanian.txt @@ -29,7 +29,7 @@ discover_innovation = innovation_mangonel discover_innovation = innovation_house_soldiers # - discover_innovation = innovation_hereditary_rule + discover_innovation = innovation_royal_prerogative discover_innovation = innovation_manorialism discover_innovation = innovation_currency_02 discover_innovation = innovation_baliffs