From 0b475e796b3970709036015943244f9070118bf5 Mon Sep 17 00:00:00 2001 From: peterson2137 Date: Tue, 11 Feb 2025 22:46:15 +0100 Subject: [PATCH 1/2] Parthia work --- .../00_parthia_march_effect.txt | 227 +++--------------- .../00_parthia_march_rename.txt | 26 ++ events/mission_events/me_parthia.txt | 120 +++++---- 3 files changed, 135 insertions(+), 238 deletions(-) create mode 100644 common/scripted_triggers/00_parthia_march_rename.txt diff --git a/common/scripted_effects/00_parthia_march_effect.txt b/common/scripted_effects/00_parthia_march_effect.txt index 8c34ffeea..7222b6c65 100644 --- a/common/scripted_effects/00_parthia_march_effect.txt +++ b/common/scripted_effects/00_parthia_march_effect.txt @@ -40,208 +40,51 @@ subtract_allowed_region_effect = { } } -parthia_march_main_effect_default = { - capital_scope = { - switch = { - trigger = is_in_region - africa_region = { - root = { - parthia_march_main_effect_default_b = { - CAPITAL = africa_region -# LEVEL = $LEVEL$ - } - } - } - albania_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = albania_region LEVEL = $LEVEL$ } } } - arabia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = arabia_region LEVEL = $LEVEL$ } } } - arabia_felix_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = arabia_felix_region LEVEL = $LEVEL$ } } } - ariana_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = ariana_region LEVEL = $LEVEL$ } } } - armenia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = armenia_region LEVEL = $LEVEL$ } } } - armorica_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = armorica_region LEVEL = $LEVEL$ } } } - asia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = asia_region LEVEL = $LEVEL$ } } } - assyria_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = assyria_region LEVEL = $LEVEL$ } } } - atlas_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = atlas_region LEVEL = $LEVEL$ } } } - aparanta_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = aparanta_region LEVEL = $LEVEL$ } } } - aquitania_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = aquitania_region LEVEL = $LEVEL$ } } } - avanti_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = avanti_region LEVEL = $LEVEL$ } } } - bactriana_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = bactriana_region LEVEL = $LEVEL$ } } } - baetica_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = baetica_region LEVEL = $LEVEL$ } } } - belgica_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = belgica_region LEVEL = $LEVEL$ } } } - bithynia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = bithynia_region LEVEL = $LEVEL$ } } } - bohemia_area = { root = { parthia_march_main_effect_default_b = { CAPITAL = bohemia_area LEVEL = $LEVEL$ } } } - borysthenia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = borysthenia_region LEVEL = $LEVEL$ } } } - britain_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = britain_region LEVEL = $LEVEL$ } } } - burma_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = burma_region LEVEL = $LEVEL$ } } } # Invictus only - caledonia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = caledonia_region LEVEL = $LEVEL$ } } } - cappadocia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = cappadocia_region LEVEL = $LEVEL$ } } } - cappadocia_pontica_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = cappadocia_pontica_region LEVEL = $LEVEL$ } } } - central_asian_steppes_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = central_asian_steppes_region LEVEL = $LEVEL$ } } } - central_gaul_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = central_gaul_region LEVEL = $LEVEL$ } } } - central_italy_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = central_italy_region LEVEL = $LEVEL$ } } } - cilicia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = cilicia_region LEVEL = $LEVEL$ } } } - cisalpine_gaul_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = cisalpine_gaul_region LEVEL = $LEVEL$ } } } - colchis_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = colchis_region LEVEL = $LEVEL$ } } } - contestania_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = contestania_region LEVEL = $LEVEL$ } } } - cyrenaica_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = cyrenaica_region LEVEL = $LEVEL$ } } } - dacia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = dacia_region LEVEL = $LEVEL$ } } } - dravida_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = dravida_region LEVEL = $LEVEL$ } } } - fezzan_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = fezzan_region LEVEL = $LEVEL$ } } } - galatia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = galatia_region LEVEL = $LEVEL$ } } } - gallaecia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = gallaecia_region LEVEL = $LEVEL$ } } } - gandhara_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = gandhara_region LEVEL = $LEVEL$ } } } - germania_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = germania_region LEVEL = $LEVEL$ } } } - germania_superior_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = germania_superior_region LEVEL = $LEVEL$ } } } - greece_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = greece_region LEVEL = $LEVEL$ } } } - himalayan_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = himalayan_region LEVEL = $LEVEL$ } } } - hyperborea_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = hyperborea_region LEVEL = $LEVEL$ } } } - illyria_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = illyria_region LEVEL = $LEVEL$ } } } - karnata_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = karnata_region LEVEL = $LEVEL$ } } } - lower_egypt_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = lower_egypt_region LEVEL = $LEVEL$ } } } - lower_nubia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = lower_nubia_region LEVEL = $LEVEL$ } } } - lusitania_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = lusitania_region LEVEL = $LEVEL$ } } } - macedonia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = macedonia_region LEVEL = $LEVEL$ } } } - madhyadesa_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = madhyadesa_region LEVEL = $LEVEL$ } } } - magna_graecia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = magna_graecia_region LEVEL = $LEVEL$ } } } - maru_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = maru_region LEVEL = $LEVEL$ } } } - mauretainia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = mauretainia_region LEVEL = $LEVEL$ } } } - media_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = media_region LEVEL = $LEVEL$ } } } - mesopotamia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = mesopotamia_region LEVEL = $LEVEL$ } } } - moesia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = moesia_region LEVEL = $LEVEL$ } } } - moesia_s_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = moesia_s_region LEVEL = $LEVEL$ } } } # Invictus only - nubia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = nubia_region LEVEL = $LEVEL$ } } } - numidia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = numidia_region LEVEL = $LEVEL$ } } } - palestine_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = palestine_region LEVEL = $LEVEL$ } } } - pannonia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = pannonia_region LEVEL = $LEVEL$ } } } - parthia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = parthia_region LEVEL = $LEVEL$ } } } - persis_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = persis_region LEVEL = $LEVEL$ } } } - pracya_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = pracya_region LEVEL = $LEVEL$ } } } - punt_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = punt_region LEVEL = $LEVEL$ } } } - rhaetia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = rhaetia_region LEVEL = $LEVEL$ } } } - sakia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = sakia_region LEVEL = $LEVEL$ } } } # Invictus only - sarmatia_asiatica_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = sarmatia_asiatica_region LEVEL = $LEVEL$ } } } - scandinavia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = scandinavia_region LEVEL = $LEVEL$ } } } - scythia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = scythia_region LEVEL = $LEVEL$ } } } - sogdiana_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = sogdiana_region LEVEL = $LEVEL$ } } } - syria_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = syria_region LEVEL = $LEVEL$ } } } - tarraconensis_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = tarraconensis_region LEVEL = $LEVEL$ } } } - taurica_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = taurica_region LEVEL = $LEVEL$ } } } - thrace_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = thrace_region LEVEL = $LEVEL$ } } } - tibet_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = tibet_region LEVEL = $LEVEL$ } } } - transalpine_gaul_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = transalpine_gaul_region LEVEL = $LEVEL$ } } } - upper_egypt_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = upper_egypt_region LEVEL = $LEVEL$ } } } - venedia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = venedia_region LEVEL = $LEVEL$ } } } - vindhyaprstha_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = vindhyaprstha_region LEVEL = $LEVEL$ } } } - vistulia_region = { root = { parthia_march_main_effect_default_b = { CAPITAL = vistulia_region LEVEL = $LEVEL$ } } } - } - } -} - -parthia_march_main_effect_default_b = { - while = { +parthian_change_culture_march_effect = { #TODO whole world + if = { limit = { - any_owned_province = { - parthia_$CAPITAL$_trigger = yes - z_limes_$CAPITAL$_trigger_$LEVEL$ = no - this.area = { - trigger_if = { - limit = { - root = { government = tribal_chiefdom } - } - any_area_province = { - count >= z_limes_defines_min_mm_size_tribal - owner = root - } - } - trigger_else = { - any_area_province = { - count >= z_limes_defines_min_mm_size - owner = root - } - } - } - } - } - ordered_owned_province = { - limit = { - z_limes_$CAPITAL$_trigger_$LEVEL$ = no - this.area = { - trigger_if = { - limit = { - root = { government = tribal_chiefdom } - } - any_area_province = { - count >= z_limes_defines_min_mm_size_tribal - owner = root - } - } - trigger_else = { - any_area_province = { - count >= z_limes_defines_min_mm_size - owner = root - } - } - } + capital_scope = { + is_in_region = mesopotamia_region } - order_by = total_population - save_scope_as = z_limes_mm_capital } - if = { - limit = { num_of_cities < 200 } - z_limes_make_mm_effect = { ZONE = area } - } - else = { - z_limes_make_mm_effect = { ZONE = region } + set_primary_culture_cleanup_effect = { + NEW_PRIMARY_CULTURE = babylonian + MAKE_OLD_CULTURE_INTEGRATED = yes } } + if ={limit ={capital_scope = {is_in_region = mesopotamia_region}} set_primary_culture_cleanup_effect = {NEW_PRIMARY_CULTURE = carmanian MAKE_OLD_CULTURE_INTEGRATED = yes}} +} + +parthia_rename_march_effect = { #TODO whole world + save_scope_as = march_namable + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = media_region } #Media + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = mesopotamia_region } #Mesopotamia + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = assyria_region } #Assyria + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = persis_region } #Persis + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = ariana_region } #Ariana + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = bactriana_region } #Bactriana + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = sakia_region } #Sakia + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = sogdiana_region } #Sogdiana + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = maru_region } #Maru + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = gandhara_region } #Gandhara + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = himalayan_region } #Himalayan + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = albania_region } #Albania + parthia_rename_march_effect_2 = { OWNER = scope:march_namable WHAT = region WHICH = armenia_region } #Armenia } -z_limes_merge_effect = { +parthia_rename_march_effect_2 = { if = { - limit = { z_limes_rules_merge = 1 } - if = { - limit = { - z_has_limes = yes - war = no - num_of_cities >= 300 - any_subject = { - is_ai = yes - z_limes_is_mm_trigger = yes - any_neighbour_country = { - is_ai = yes - is_subject = yes - z_limes_is_mm_trigger = yes - overlord = prev.overlord - capital_scope.region = prev.capital_scope.region - } - } - } - random_subject = { - limit = { - is_ai = yes - z_limes_is_mm_trigger = yes - any_neighbour_country = { - is_ai = yes - is_subject = yes - z_limes_is_mm_trigger = yes - overlord = prev.overlord - capital_scope.region = prev.capital_scope.region - } - } - save_scope_as = z_limes_mm - random_neighbour_country = { - limit = { - is_ai = yes - is_subject = yes - z_limes_is_mm_trigger = yes - overlord = prev.overlord - capital_scope.region = prev.capital_scope.region - } - every_owned_province = { - set_owned_by = scope:z_limes_mm - } - } + limit = { + NOT = { has_variable = march_name_$WHAT$ } + march_namable_$WHAT$_trigger = { + OWNER = $OWNER$ + WHICH = $WHICH$ } } + change_country_name = $WHICH$_march_N + change_country_adjective = $WHICH$_march_A + set_variable = { name = march_name_$WHAT$ } + set_variable = { name = march_name_$WHICH$ } } } diff --git a/common/scripted_triggers/00_parthia_march_rename.txt b/common/scripted_triggers/00_parthia_march_rename.txt new file mode 100644 index 000000000..8710de47c --- /dev/null +++ b/common/scripted_triggers/00_parthia_march_rename.txt @@ -0,0 +1,26 @@ +march_namable_trigger = { +# is_ai = yes +# has_variable = z_limes_mm_from + NOT = { + any_country = { + has_land = yes + has_variable = march_name_$WHICH$ + } + } + NOR = { + is_tier_1_formable_trigger = yes + is_tier_2_formable_trigger = yes + is_endgame_tag_trigger = yes + } +} + +march_namable_region_trigger = { + capital_scope = { is_in_region = $WHICH$ } + z_limes_namable_trigger = { WHICH = $WHICH$ } + region:$WHICH$ = { + any_region_province = { + percent >= 0.01 + owner = $OWNER$ + } + } +} diff --git a/events/mission_events/me_parthia.txt b/events/mission_events/me_parthia.txt index e9732cd0d..6cf4fdf72 100644 --- a/events/mission_events/me_parthia.txt +++ b/events/mission_events/me_parthia.txt @@ -1990,16 +1990,16 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 1 + NOT = { this = region:parthia_region } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } } ordered_region = { limit = { + NOT = { this = region:parthia_region } any_area_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } @@ -2010,17 +2010,19 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 2 + NOT = { this = region:parthia_region } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } } ordered_region = { limit = { - NOT = { this = scope:parthia_region_1 } + NOR = { + this = region:parthia_region + this = scope:parthia_region_1 + } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } @@ -2031,20 +2033,20 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 3 + NOT = { this = region:parthia_region } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } } ordered_region = { limit = { - NOR = { + NOR = { + this = region:parthia_region this = scope:parthia_region_1 this = scope:parthia_region_2 } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } @@ -2055,21 +2057,21 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 4 + NOT = { this = region:parthia_region } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } } ordered_region = { limit = { - NOR = { + NOR = { + this = region:parthia_region this = scope:parthia_region_1 this = scope:parthia_region_2 this = scope:parthia_region_3 } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } @@ -2080,22 +2082,22 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 5 + NOT = { this = region:parthia_region } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } } ordered_region = { limit = { - NOR = { + NOR = { + this = region:parthia_region this = scope:parthia_region_1 this = scope:parthia_region_2 this = scope:parthia_region_3 this = scope:parthia_region_4 } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } @@ -2106,15 +2108,16 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 6 + NOT = { this = region:parthia_region } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } owner = ROOT } } } ordered_region = { limit = { - NOR = { + NOR = { + this = region:parthia_region this = scope:parthia_region_1 this = scope:parthia_region_2 this = scope:parthia_region_3 @@ -2122,13 +2125,12 @@ me_parthia.9900 = { #Choose what region to hold directly this = scope:parthia_region_5 } any_region_province = { - NOT = { is_in_area = ROOT.capital_scope } - NOT = { - is_target_in_variable_list = { - name = allowed_provinces - target = THIS - } - } +# NOT = { +# is_target_in_variable_list = { +# name = allowed_provinces +# target = THIS +# } +# } owner = ROOT } } @@ -2138,7 +2140,7 @@ me_parthia.9900 = { #Choose what region to hold directly } option = { #1 - name = cyr_magas_01.34.a + name = me_parthia.9900.a trigger = { exists = scope:parthia_region_1 } @@ -2157,11 +2159,10 @@ me_parthia.9900 = { #Choose what region to hold directly } subtract_allowed_region_effect = yes } - trigger_event = me_parthia.9900 } option = { #2 - name = cyr_magas_01.34.a + name = me_parthia.9900.b trigger = { exists = scope:parthia_region_2 } @@ -2180,11 +2181,10 @@ me_parthia.9900 = { #Choose what region to hold directly } subtract_allowed_region_effect = yes } - trigger_event = me_parthia.9900 } option = { #3 - name = cyr_magas_01.34.a + name = me_parthia.9900.c trigger = { exists = scope:parthia_region_3 } @@ -2203,11 +2203,10 @@ me_parthia.9900 = { #Choose what region to hold directly } subtract_allowed_region_effect = yes } - trigger_event = me_parthia.9900 } option = { #4 - name = cyr_magas_01.34.a + name = me_parthia.9900.d trigger = { exists = scope:parthia_region_4 } @@ -2226,11 +2225,10 @@ me_parthia.9900 = { #Choose what region to hold directly } subtract_allowed_region_effect = yes } - trigger_event = me_parthia.9900 } option = { #5 - name = cyr_magas_01.34.a + name = me_parthia.9900.e trigger = { exists = scope:parthia_region_5 } @@ -2249,11 +2247,10 @@ me_parthia.9900 = { #Choose what region to hold directly } subtract_allowed_region_effect = yes } - trigger_event = me_parthia.9900 } option = { #6 - name = cyr_magas_01.34.a + name = me_parthia.9900.f trigger = { exists = scope:parthia_region_6 } @@ -2272,18 +2269,16 @@ me_parthia.9900 = { #Choose what region to hold directly } subtract_allowed_region_effect = yes } + } + + after = { trigger_event = me_parthia.9900 } } me_parthia.9901 = { #spawn a march in an illegal region type = country_event -# hidden = yes - - title = "me_parthia.1901.t" #TODO change to hidden - desc = "me_parthia.1901.desc" - picture = event_horses_escaping - left_portrait = current_ruler + hidden = yes trigger = { any_owned_province = { @@ -2302,7 +2297,28 @@ me_parthia.9901 = { #spawn a march in an illegal region } } - option = { #TODO change to immediate + immediate = { + if = { + limit = { + any_owned_province = { + province_id = 4955 + } + any_subject = { + is_subject_type = march + capital_scope.region = region:persis_region + } + } + random_subject = { + limit = { + is_subject_type = march + capital_scope.region = region:persis_region + } + save_scope_as = persis_march + } + p:4955 = { + set_owned_by = scope:persis_march + } + } ordered_owned_province = { order_by = total_population limit = { @@ -2347,38 +2363,50 @@ me_parthia.9901 = { #spawn a march in an illegal region set_owned_by = scope:spawn_scope } } - scope:spawn_scope = { - new_march_colour_effect = yes + hidden_effect = { + scope:spawn_scope = { + new_march_colour_effect = yes + parthia_rename_march_effect = yes + parthian_change_culture_march_effect = yes + } } if = { #TODO make this shit work limit = { any_subject = { is_subject_type = march + capital_scope.region = scope:spawn_scope.capital_scope.region any_neighbour_country = { + is_ai = yes is_subject = yes is_subject_type = march overlord = ROOT - capital_scope.region = c:CAM.capital_scope.region } } } - add_treasury = 1000 random_subject = { limit = { is_subject_type = march + capital_scope.region = scope:spawn_scope.capital_scope.region any_neighbour_country = { + is_ai = yes is_subject = yes is_subject_type = march overlord = ROOT - capital_scope.region = c:CAM.capital_scope.region } } save_scope_as = previous_march + parthia_rename_march_effect = yes + parthian_change_culture_march_effect = yes } scope:spawn_scope = { every_owned_province = { set_owned_by = scope:previous_march } + every_character = { + death = { + death_reason = death_obscurity + } + } } } trigger_event = { From a8c158c8ddcb0794a30a0b10cd9184b2080e58e8 Mon Sep 17 00:00:00 2001 From: peterson2137 Date: Fri, 14 Feb 2025 17:47:47 +0100 Subject: [PATCH 2/2] Parthia work --- common/script_values/00_mission_parthia.txt | 17 + .../00_parthia_march_effect.txt | 623 ++++-------------- decisions/parthia_decisions.txt | 40 ++ events/mission_events/me_parthia.txt | 441 +++++++++---- .../english/missions/parthia_l_english.yml | 46 +- 5 files changed, 520 insertions(+), 647 deletions(-) diff --git a/common/script_values/00_mission_parthia.txt b/common/script_values/00_mission_parthia.txt index ff3062c54..0b91f02e0 100644 --- a/common/script_values/00_mission_parthia.txt +++ b/common/script_values/00_mission_parthia.txt @@ -15,3 +15,20 @@ dahae_apothecary_finesse_skill = { add = root.job_holder:office_apothecary.finesse multiply = 1.5 } + +parthia_region_pop_svalue = { + value = 0 + every_region_province = { + limit = { + OR = { + owner = root + owner = { + is_subject_type = march + } + } + } + every_pops_in_province = { + add = 1 + } + } +} diff --git a/common/scripted_effects/00_parthia_march_effect.txt b/common/scripted_effects/00_parthia_march_effect.txt index 7222b6c65..7eea850a9 100644 --- a/common/scripted_effects/00_parthia_march_effect.txt +++ b/common/scripted_effects/00_parthia_march_effect.txt @@ -24,12 +24,12 @@ subtract_allowed_region_effect = { if = { limit = { NOT = { - has_variable = parthia_allowed_region_var + has_variable = parthia_allowed_region_var } } set_variable = { name = parthia_allowed_region_var - value = -1 + value = 0 } } else = { @@ -40,6 +40,141 @@ subtract_allowed_region_effect = { } } +parthia_march_border_cleanup_eff = { + custom_tooltip = "dahae_peaceful_weight_up_tt" + if = { + limit = { + any_owned_province = { + province_id = 6720 + NOT = { has_variable = allowed_province } + } + any_subject = { + is_subject_type = march + capital_scope.region = region:sogdiana_region + } + } + random_subject = { + limit = { + is_subject_type = march + capital_scope.region = region:sogdiana_region + } + save_scope_as = sogdiana_march + } + p:6720 = { + set_owned_by = scope:sogdiana_march + } + } + if = { + limit = { + any_owned_province = { + province_id = 944 + NOT = { has_variable = allowed_province } + } + any_subject = { + is_subject_type = march + capital_scope.area = area:meshan_area + } + } + random_subject = { + limit = { + is_subject_type = march + capital_scope.area = area:meshan_area + } + save_scope_as = characene_scope + } + p:944 = { + set_owned_by = scope:characene_scope + } + } + if = { + limit = { + any_owned_province = { + OR = { + province_id = 6531 + province_id = 6532 + province_id = 6536 + } + NOT = { has_variable = allowed_province } + } + any_subject = { + is_subject_type = march + capital_scope.region = region:ariana_region + } + } + every_owned_province = { + limit = { + OR = { + province_id = 6531 + province_id = 6532 + province_id = 6536 + } + NOT = { has_variable = allowed_province } + } + add_to_list = ariana_cleanup + } + random_subject = { + limit = { + is_subject_type = march + capital_scope.region = region:ariana_region + } + save_scope_as = ariana_march + } + every_in_list = { + list = ariana_cleanup + set_owned_by = scope:ariana_march + } + } + if = { + limit = { + any_owned_province = { + OR = { + province_id = 6683 + province_id = 7231 + province_id = 7240 + province_id = 7241 + province_id = 7242 + } + NOT = { has_variable = allowed_province } + } + any_subject = { + is_subject_type = march + capital_scope.region = region:bactriana_region + } + } + every_owned_province = { + limit = { + OR = { + province_id = 6683 + province_id = 7231 + province_id = 7240 + province_id = 7241 + province_id = 7242 + } + } + add_to_list = bactriana_cleanup + } + random_subject = { + limit = { + is_subject_type = march + capital_scope.region = region:bactriana_region + } + save_scope_as = bactriana_march + } + every_in_list = { + list = bactriana_cleanup + set_owned_by = scope:bactriana_march + } + } +} + +parthia_march_move_capital_eff = { + ordered_owned_province = { + order_by = total_population + save_scope_as = new_capital + } + set_capital = scope:new_capital +} + parthian_change_culture_march_effect = { #TODO whole world if = { limit = { @@ -108,7 +243,7 @@ new_march_colour_effect = { has_variable = parthian_march2_hsv } } - } + } change_country_color = parthian_march2 set_variable = parthian_march2_hsv } @@ -141,7 +276,7 @@ new_march_colour_effect = { has_variable = parthian_march5_hsv } } - } + } change_country_color = parthian_march5 set_variable = parthian_march5_hsv } @@ -163,7 +298,7 @@ new_march_colour_effect = { has_variable = parthian_march7_hsv } } - } + } change_country_color = parthian_march7 set_variable = parthian_march7_hsv } @@ -174,7 +309,7 @@ new_march_colour_effect = { has_variable = parthian_march8_hsv } } - } + } change_country_color = parthian_march8 set_variable = parthian_march8_hsv } @@ -185,481 +320,9 @@ new_march_colour_effect = { has_variable = parthian_march9_hsv } } - } + } change_country_color = parthian_march9 set_variable = parthian_march9_hsv } } -} - -new_march_name_effect = { - if = { - limit = { - capital_scope = { - is_in_region = persis_region - } - NOT = { - any_country = { - tag = PES - } - } - } - change_country_name = "PERSIS_SATRAPY" - hidden_effect = { change_country_adjective = "PERSIS_SATRAPY_ADJ" } - change_country_tag = PES - change_country_flag = PES - change_country_color = achaemenid_mauve - } - else_if = { - limit = { - capital_scope = { - OR = { - is_in_area = aeolia_area - is_in_area = mysia_abrettene_area - is_in_area = mysia_area - is_in_area = bithynia_area - is_in_area = bithynia_superior_area - is_in_area = heracleotis_area - } - } - NOT = { - any_country = { - tag = HPP - } - } - } - change_country_name = "HELLESPONTINE_NAME" - change_country_adjective = "HELLESPONTINE_ADJECTIVE" - change_country_color = "hellespontine_phrygia_color" - change_country_flag = HELLESPONTINE_PHRYGIA_FLAG - change_country_tag = HPP - } - - else_if = { - limit = { - capital_scope = { - OR = { - is_in_area = coastal_caria_area - is_in_area = inland_caria_area - is_in_area = lycia_area - is_in_area = milyas_area - } - } - NOT = { - any_country = { - tag = CIA - } - } - } - change_country_name = "CIA" - change_country_adjective = "CIA_ADJ" - change_country_tag = CIA - change_country_color = carian_blue - change_country_flag = CARIA_SATRAPY_FLAG - } - else_if = { - limit = { - capital_scope = { - OR = { - is_in_area = coastal_caria_area - is_in_area = inland_caria_area - is_in_area = lycia_area - is_in_area = milyas_area - } - } - NOT = { - any_country = { - tag = CHY - } - } - } - change_country_name = CHRYSAORIC_NAME - change_country_adjective = CHRYSAORIC_ADJ - change_country_tag = CHY - change_country_color = chrysaoric_color - change_country_flag = CHRYSAORIC_FLAG - } - else_if = { - limit = { - capital_scope = { - OR = { - is_in_area = ionia_area - is_in_area = lydia_area - } - } - NOT = { - any_country = { - tag = LYD - } - } - } - change_country_name = "LYD" - change_country_adjective = "LYD_ADJ" - change_country_tag = LYD - change_country_color = "lighter_dark_orange" - change_country_flag = SARDIS_FLAG - } - else_if = { - limit = { - capital_scope = { - OR = { - is_in_area = arachosia_area - is_in_area = pactya_area - } - } - NOT = { - any_country = { - tag = ARS - } - } - } - change_country_name = "ARS" - change_country_adjective = "ARS_ADJ" - change_country_tag = ARS - change_country_color = "archosia_color" - change_country_flag = ARS - } - else_if = { - limit = { - capital_scope = { - OR = { - is_in_area = parecania_area - is_in_area = patalene_area - is_in_area = gedrosia_area - is_in_area = harmozeia_area - } - } - NOT = { - any_country = { - tag = GED - } - } - } - change_country_name = "GED" - change_country_adjective = "GED_ADJ" - change_country_tag = GED - change_country_color = "gedrosia_color" - # change_country_flag = GED # Flag not defined. - } - - else_if = { - limit = { - capital_scope = { - OR = { - is_in_area = media_atropatene_area - is_in_area = amardioi_area - is_in_area = kadousioi_area - is_in_area = media_area - } - } - NOT = { - any_country = { - tag = MAP - } - } - } - change_country_name = "MAP" - change_country_adjective = "MAP_ADJ" - change_country_tag = MAP - change_country_color = "media_atropatene_color" - change_country_flag = MAP - } - - else_if = { - limit = { - capital_scope = { - is_in_region = parthia_region - } - NOR = { - any_country = { - tag = PTH - } - any_country = { - tag = PAR - } - } - } - change_country_name = "PAR" - change_country_adjective = "PAR_ADJ" - change_country_tag = PAR - change_country_color = "parthia_satrap_color" - change_country_flag = PAR - } - else_if = { - limit = { - capital_scope = { - is_in_region = bactriana_region - } - NOT = { - any_country = { - tag = BAC - } - } - } - change_country_name = "BAC" - change_country_adjective = "BAC_ADJ" - change_country_tag = BAC - change_country_color = "bactria_color" - change_country_flag = BAC - } -# else_if = { -# limit = { -# capital_scope = { -# is_in_region = persis_region -# } -# NOR = { -# any_country = { -# tag = PER -# } -# any_country = { -# tag = PRC -# } -# } -# } -# change_country_name = "PERSIAN_SATRAPY" -# hidden_effect = { change_country_adjective = "PERSIAN_SATRAPY_ADJ" } -# change_country_tag = PES -# change_country_flag = PERSIA_FLAG -# change_country_color = achaemenid_purple -# } - else_if = { - limit = { - capital_scope = { - is_in_region = mesopotamia_region - } - NOT = { - any_country = { - tag = MPS - } - } - } - change_country_name = "MESOPOTAMIAN_SATRAPY" - change_country_adjective = "MESOPOTAMIAN_SATRAPY_ADJ" - change_country_tag = MPS - change_country_flag = MPS_FLAG - change_country_color = light_gold - } - else_if = { - limit = { - capital_scope = { - OR = { - is_in_region = syria_region - is_in_region = palestine_region - } - } - NOT = { - any_country = { - tag = SYA - } - } - } - change_country_name = "SYRIAN_SATRAPY" - change_country_adjective = "SYRIAN_SATRAPY_ADJ" - change_country_color = "syria_color" - change_country_tag = SYA - change_country_flag = SYRIA_FLAG - } - else_if = { - limit = { - capital_scope = { - OR = { - is_in_region = cyrenaica_region - } - } - NOT = { - any_country = { - tag = CYR - } - } - } - change_country_name = "CYR" - change_country_adjective = "CYR_ADJ" - change_country_color = "cyrenaica_color" - change_country_tag = CYR - change_country_flag = CYR - } - else_if = { - limit = { - capital_scope = { - OR = { - is_in_region = media_region - } - } - NOT = { - any_country = { - tag = MEE - } - } - } - change_country_name = "MEDIAN_SATRAPY" - change_country_adjective = "MEDIAN_SATRAPY_ADJ" - change_country_color = "media_color" - change_country_tag = MEE - if = { - limit = { - NOT = { - any_country = { - tag = MEE - } - } - } - # change_country_flag = MEE # Flag not defined. - } - } - else_if = { - limit = { - capital_scope = { - OR = { - is_in_region = cappadocia_region - } - } - } - change_country_name = "CAPPADOCIAN_SATRAPY" - change_country_adjective = "CAPPADOCIAN_SATRAPY_ADJ" - if = { - limit = { - NOT = { - any_country = { - tag = ARI - } - } - } - change_country_color = "ariarathid_color" - change_country_flag = ARI_FLAG - } - else_if = { - limit = { - NOT = { - any_country = { - tag = UMI - } - } - } - change_country_color = "eumenid_blue" - change_country_flag = EUMENID_FLAG - } - else = { change_country_flag = CAPPADOCIA_NATIVE_FLAG } - } - else_if = { - limit = { - capital_scope = { - is_in_region = assyria_region - } - NOT = { - any_country = { - tag = ASR - } - } - } - change_country_name = "ASSYRIAN_SATRAPY" - change_country_adjective = "ASSYRIAN_SATRAPY_ADJ" - change_country_tag = ASR - change_country_flag = ASSYRIA_FLAG - change_country_color = assyria_color - } - else_if = { - limit = { - capital_scope = { - is_in_region = galatia_region - } - NOT = { - any_country = { - tag = PRG - } - } - } - change_country_name = "PHRYGIAN_SATRAPY" - change_country_adjective = "PHRYGIAN_SATRAPY_ADJ" - change_country_color = dark_green - change_country_flag = PHRYGIA_SATRAPY_FLAG - change_country_tag = PRG - } - else_if = { - limit = { - capital_scope = { - is_in_region = cilicia_region - } - NOT = { - any_country = { - tag = CCI - } - } - } - change_country_name = "CILICIAN_SATRAPY" - change_country_adjective = "CILICIAN_SATRAPY_ADJ" - change_country_color = "cilicia_color" - change_country_tag = CCI - change_country_flag = CILICIA_FLAG - } - else_if = { - limit = { - capital_scope = { - is_in_region = thrace_region - } - NOT = { - any_country = { - tag = OYK - } - } - } - change_country_name = "THRACIAN_SATRAPY" - change_country_adjective = "THRACE_SATRAPY_ADJ" - change_country_color = "odryssian_kingdom_color" - change_country_flag = THRACIA_FLAG - change_country_tag = OYK - } - else_if = { - limit = { - capital_scope = { - is_in_region = lower_egypt_region - } - NOR= { - any_country = { - tag = EGT - } - any_country = { - tag = EGS - } - } - } - change_country_name = "EGYPT_SATRAPY_NAME" - change_country_adjective = "EGYPT_SATRAPY_ADJECTIVE" - change_country_flag = KUSHITE_EGYPT_FLAG - change_country_color = "egypt_color" - change_country_tag = EGT - } - else_if = { - limit = { - capital_scope = { - is_in_region = macedonia_region - } - NOR= { - any_country = { - tag = SMC - } - } - } - change_country_name = "MACEDONIAN_SATRAPY_NAME" - change_country_adjective = "MACEDONIAN_SATRAPY_ADJECTIVE" - change_country_flag = SMC - change_country_color = "dark_rust" - change_country_tag = SMC - } - else_if = { - limit = { - capital_scope = { - is_in_region = macedonia_region - } - NOR= { - any_country = { - tag = SMC - } - } - } - change_country_name = "MACEDONIAN_SATRAPY_NAME" - change_country_adjective = "MACEDONIAN_SATRAPY_ADJECTIVE" - change_country_flag = SMC - change_country_color = "dark_rust" - change_country_tag = SMC - } - } \ No newline at end of file +} \ No newline at end of file diff --git a/decisions/parthia_decisions.txt b/decisions/parthia_decisions.txt index 89ee9a913..2de25bdbb 100644 --- a/decisions/parthia_decisions.txt +++ b/decisions/parthia_decisions.txt @@ -62,6 +62,46 @@ } } + parthia_request_march = { + potential = { + NOT = { has_variable = pth_excepted_var } + OR = { + tag = ELY + tag = OSR + tag = CHA + } + any_neighbour_country = { + tag = PTH + } + } + + allow = { + any_owned_province = { + any_neighbor_province = { + count >= 3 + owner = { tag = PTH } + } + } + } + + effect = { + custom_tooltip = "dahae_investment.tt" + save_scope_as = defecting_subject + random_country = { + limit = { + tag = PTH + } + trigger_event = { + id = me_parthia.1903 + } + } + } + + ai_will_do = { + base = 4000 + } + } + parthia_debug_leftside = { #TODO DELETE potential = { diff --git a/events/mission_events/me_parthia.txt b/events/mission_events/me_parthia.txt index 6cf4fdf72..145ffd29b 100644 --- a/events/mission_events/me_parthia.txt +++ b/events/mission_events/me_parthia.txt @@ -1080,7 +1080,7 @@ me_parthia.9 = { set_variable = parthia_decentralized_wg set_variable = parthia_chosen_tree set_variable = { - name = parthia_allowed_region_effect + name = parthia_allowed_region_var value = 2 } declare_war_with_wargoal = { @@ -1959,6 +1959,36 @@ me_parthia.1902 = { #SEL information } } +me_parthia.1903 = { #Osroene, Characene and Elymais + type = country_event + + title = "me_parthia.1903.t" + desc = "me_parthia.1903.desc" + picture = event_horses_escaping + left_portrait = current_ruler + + option = { #Yes + name = "me_parthia.1903.a" + make_subject = { + target = scope:defecting_subject + type = march + } + hidden_effect = { + scope:defecting_subject = { + new_march_colour_effect = yes + set_variable = pth_excepted_var + } + } + } + + option = { #No + name = "me_parthia.1901.b" + ai_chance = { + factor = 0 + } + } +} + me_parthia.9900 = { #Choose what region to hold directly type = country_event title = "me_parthia.9900.t" @@ -1973,36 +2003,50 @@ me_parthia.9900 = { #Choose what region to hold directly } } - immediate = { - region:parthia_region = { - add_to_variable_list = { - name = allowed_region - target = this - } - every_region_province = { - add_to_variable_list = { - name = allowed_provinces - target = this - } + immediate = { + every_province = { + limit = { + OR = { + is_in_region = parthia_region + is_in_area = namek_area + is_in_area = aria_area + is_in_area = sagartia_area + is_in_area = media_felix_area + is_in_area = ardashir_area + } } + set_variable = allowed_province } if = { limit = { any_region = { count >= 1 - NOT = { this = region:parthia_region } + NOT = { + OR = { + this = region:parthia_region + has_variable = reroll_var + } + } any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } } ordered_region = { limit = { - NOT = { this = region:parthia_region } - any_area_province = { + NOT = { + OR = { + this = region:parthia_region + has_variable = reroll_var + } + } + any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } + order_by = parthia_region_pop_svalue save_scope_as = parthia_region_1 } } @@ -2010,9 +2054,15 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 2 - NOT = { this = region:parthia_region } + NOT = { + OR = { + this = region:parthia_region + has_variable = reroll_var + } + } any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } } @@ -2020,12 +2070,15 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { NOR = { this = region:parthia_region - this = scope:parthia_region_1 + this = scope:parthia_region_1 + has_variable = reroll_var } any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } + order_by = parthia_region_pop_svalue save_scope_as = parthia_region_2 } } @@ -2033,23 +2086,32 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 3 - NOT = { this = region:parthia_region } + NOT = { + OR = { + this = region:parthia_region + has_variable = reroll_var + } + } any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } } ordered_region = { limit = { - NOR = { + NOR = { this = region:parthia_region this = scope:parthia_region_1 this = scope:parthia_region_2 + has_variable = reroll_var } any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } + order_by = parthia_region_pop_svalue save_scope_as = parthia_region_3 } } @@ -2057,24 +2119,33 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 4 - NOT = { this = region:parthia_region } + NOT = { + OR = { + this = region:parthia_region + has_variable = reroll_var + } + } any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } } ordered_region = { limit = { - NOR = { + NOR = { this = region:parthia_region this = scope:parthia_region_1 this = scope:parthia_region_2 this = scope:parthia_region_3 + has_variable = reroll_var } any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } + order_by = parthia_region_pop_svalue save_scope_as = parthia_region_4 } } @@ -2082,25 +2153,34 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 5 - NOT = { this = region:parthia_region } + NOT = { + OR = { + this = region:parthia_region + has_variable = reroll_var + } + } any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } } ordered_region = { limit = { - NOR = { + NOR = { this = region:parthia_region this = scope:parthia_region_1 this = scope:parthia_region_2 this = scope:parthia_region_3 this = scope:parthia_region_4 + has_variable = reroll_var } any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } + order_by = parthia_region_pop_svalue save_scope_as = parthia_region_5 } } @@ -2108,32 +2188,35 @@ me_parthia.9900 = { #Choose what region to hold directly limit = { any_region = { count >= 6 - NOT = { this = region:parthia_region } + NOT = { + OR = { + this = region:parthia_region + has_variable = reroll_var + } + } any_region_province = { owner = ROOT + NOT = { has_variable = allowed_province } } } } ordered_region = { limit = { - NOR = { + NOR = { this = region:parthia_region this = scope:parthia_region_1 this = scope:parthia_region_2 this = scope:parthia_region_3 this = scope:parthia_region_4 this = scope:parthia_region_5 + has_variable = reroll_var } any_region_province = { -# NOT = { -# is_target_in_variable_list = { -# name = allowed_provinces -# target = THIS -# } -# } owner = ROOT + NOT = { has_variable = allowed_province } } } + order_by = parthia_region_pop_svalue save_scope_as = parthia_region_6 } } @@ -2146,17 +2229,27 @@ me_parthia.9900 = { #Choose what region to hold directly } hidden_effect = { scope:parthia_region_1 = { - add_to_variable_list = { - name = allowed_region - target = this - } + set_variable = allowed_region every_region_province = { - add_to_variable_list = { - name = allowed_provinces - target = this - } + set_variable = allowed_province } } + every_subject = { + limit = { + is_subject_type = march + capital_scope.region = scope:parthia_region_1 + NOT = { has_variable = march_protected_var } + } + every_owned_province = { + set_owned_by = ROOT + } + every_character = { + death = { + death_reason = death_obscurity + } + } + every_country_treasure = { transfer_treasure_to_country = ROOT } + } subtract_allowed_region_effect = yes } } @@ -2168,17 +2261,27 @@ me_parthia.9900 = { #Choose what region to hold directly } hidden_effect = { scope:parthia_region_2 = { - add_to_variable_list = { - name = allowed_region - target = this - } + set_variable = allowed_region every_region_province = { - add_to_variable_list = { - name = allowed_provinces - target = this - } + set_variable = allowed_province } } + every_subject = { + limit = { + is_subject_type = march + capital_scope.region = scope:parthia_region_2 + NOT = { has_variable = march_protected_var } + } + every_owned_province = { + set_owned_by = ROOT + } + every_character = { + death = { + death_reason = death_obscurity + } + } + every_country_treasure = { transfer_treasure_to_country = ROOT } + } subtract_allowed_region_effect = yes } } @@ -2190,16 +2293,26 @@ me_parthia.9900 = { #Choose what region to hold directly } hidden_effect = { scope:parthia_region_3 = { - add_to_variable_list = { - name = allowed_region - target = this - } + set_variable = allowed_region every_region_province = { - add_to_variable_list = { - name = allowed_provinces - target = this - } + set_variable = allowed_province + } + } + every_subject = { + limit = { + is_subject_type = march + capital_scope.region = scope:parthia_region_3 + NOT = { has_variable = march_protected_var } + } + every_owned_province = { + set_owned_by = ROOT + } + every_character = { + death = { + death_reason = death_obscurity + } } + every_country_treasure = { transfer_treasure_to_country = ROOT } } subtract_allowed_region_effect = yes } @@ -2212,16 +2325,26 @@ me_parthia.9900 = { #Choose what region to hold directly } hidden_effect = { scope:parthia_region_4 = { - add_to_variable_list = { - name = allowed_region - target = this - } + set_variable = allowed_region every_region_province = { - add_to_variable_list = { - name = allowed_provinces - target = this - } + set_variable = allowed_province + } + } + every_subject = { + limit = { + is_subject_type = march + capital_scope.region = scope:parthia_region_4 + NOT = { has_variable = march_protected_var } + } + every_owned_province = { + set_owned_by = ROOT + } + every_character = { + death = { + death_reason = death_obscurity + } } + every_country_treasure = { transfer_treasure_to_country = ROOT } } subtract_allowed_region_effect = yes } @@ -2234,16 +2357,26 @@ me_parthia.9900 = { #Choose what region to hold directly } hidden_effect = { scope:parthia_region_5 = { - add_to_variable_list = { - name = allowed_region - target = this - } + set_variable = allowed_region every_region_province = { - add_to_variable_list = { - name = allowed_provinces - target = this - } + set_variable = allowed_province + } + } + every_subject = { + limit = { + is_subject_type = march + capital_scope.region = scope:parthia_region_5 + NOT = { has_variable = march_protected_var } + } + every_owned_province = { + set_owned_by = ROOT + } + every_character = { + death = { + death_reason = death_obscurity + } } + every_country_treasure = { transfer_treasure_to_country = ROOT } } subtract_allowed_region_effect = yes } @@ -2256,23 +2389,68 @@ me_parthia.9900 = { #Choose what region to hold directly } hidden_effect = { scope:parthia_region_6 = { - add_to_variable_list = { - name = allowed_region - target = this - } + set_variable = allowed_region every_region_province = { - add_to_variable_list = { - name = allowed_provinces - target = this - } + set_variable = allowed_province + } + } + every_subject = { + limit = { + is_subject_type = march + capital_scope.region = scope:parthia_region_6 + NOT = { has_variable = march_protected_var } + } + every_owned_province = { + set_owned_by = ROOT + } + every_character = { + death = { + death_reason = death_obscurity + } } + every_country_treasure = { transfer_treasure_to_country = ROOT } } subtract_allowed_region_effect = yes } } +# option = { #Reroll #TODO make it work? +# name = me_parthia.9900.g +# hidden_effect = { +# scope:parthia_region_1 = { +# set_variable = reroll_var +# clear_saved_scope = parthia_region_1 +# } +# scope:parthia_region_2 = { +# set_variable = reroll_var +# clear_saved_scope = parthia_region_2 +# } +# scope:parthia_region_3 = { +# set_variable = reroll_var +# clear_saved_scope = parthia_region_3 +# } +# scope:parthia_region_4 = { +# set_variable = reroll_var +# clear_saved_scope = parthia_region_4 +# } +# scope:parthia_region_5 = { +# set_variable = reroll_var +# clear_saved_scope = parthia_region_5 +# } +# scope:parthia_region_6 = { +# set_variable = reroll_var +# clear_saved_scope = parthia_region_6 +# } +# } +# } + after = { - trigger_event = me_parthia.9900 + if = { + limit = { + var:parthia_allowed_region_var >= 1 + } + trigger_event = me_parthia.9900 + } } } @@ -2283,56 +2461,18 @@ me_parthia.9901 = { #spawn a march in an illegal region trigger = { any_owned_province = { NOT = { - OR = { - is_in_region = parthia_region - is_in_area = namek_area - is_in_area = ardashir_area - is_in_area = media_felix_area - } -# is_target_in_variable_list = { -# name = allowed_provinces -# target = THIS -# } + has_variable = allowed_province } } } immediate = { - if = { - limit = { - any_owned_province = { - province_id = 4955 - } - any_subject = { - is_subject_type = march - capital_scope.region = region:persis_region - } - } - random_subject = { - limit = { - is_subject_type = march - capital_scope.region = region:persis_region - } - save_scope_as = persis_march - } - p:4955 = { - set_owned_by = scope:persis_march - } - } + parthia_march_border_cleanup_eff = yes ordered_owned_province = { order_by = total_population limit = { NOT = { - OR = { - is_in_region = parthia_region - is_in_area = namek_area - is_in_area = ardashir_area - is_in_area = media_felix_area - } -# is_target_in_variable_list = { -# name = allowed_provinces -# target = THIS -# } + has_variable = allowed_province } } save_scope_as = capital_scope @@ -2353,11 +2493,7 @@ me_parthia.9901 = { #spawn a march in an illegal region limit = { owner = ROOT NOT = { - OR = { - is_in_area = namek_area - is_in_area = ardashir_area - is_in_area = media_felix_area - } + has_variable = allowed_province } } set_owned_by = scope:spawn_scope @@ -2375,28 +2511,16 @@ me_parthia.9901 = { #spawn a march in an illegal region any_subject = { is_subject_type = march capital_scope.region = scope:spawn_scope.capital_scope.region - any_neighbour_country = { - is_ai = yes - is_subject = yes - is_subject_type = march - overlord = ROOT - } + NOT = { THIS = scope:spawn_scope } } } random_subject = { limit = { is_subject_type = march capital_scope.region = scope:spawn_scope.capital_scope.region - any_neighbour_country = { - is_ai = yes - is_subject = yes - is_subject_type = march - overlord = ROOT - } + NOT = { THIS = scope:spawn_scope } } save_scope_as = previous_march - parthia_rename_march_effect = yes - parthian_change_culture_march_effect = yes } scope:spawn_scope = { every_owned_province = { @@ -2407,11 +2531,42 @@ me_parthia.9901 = { #spawn a march in an illegal region death_reason = death_obscurity } } + every_country_treasure = { transfer_treasure_to_country = scope:previous_march } + } + scope:previous_march = { + new_march_colour_effect = yes + parthia_rename_march_effect = yes + parthian_change_culture_march_effect = yes + parthia_march_move_capital_eff = yes } } - trigger_event = { - id = me_parthia.9901 - days = 1 + if = { + limit = { + any_owned_province = { + NOT = { + has_variable = allowed_province + } + } + } + trigger_event = { + id = me_parthia.9901 + days = 1 + } } } } + +me_parthia.9902 = { + hidden = yes + + immediate = { + c:PES = { + limit = { + is_subject_type = march + is_subject_of = ROOT + } + new_march_colour_effect = yes + add_stability = 60 + } + } +} diff --git a/localization/english/missions/parthia_l_english.yml b/localization/english/missions/parthia_l_english.yml index dec7a7dc2..d406b609d 100644 --- a/localization/english/missions/parthia_l_english.yml +++ b/localization/english/missions/parthia_l_english.yml @@ -38,51 +38,49 @@ parthia_missions_10_DESC:0 "" parthia_missions_11:0 "Conquest 00" parthia_missions_11_DESC:0 "" - parthia_missions_12:0 "Conquest 1" + parthia_missions_12:0 "Conquest 12" parthia_missions_12_DESC:0 "" - parthia_missions_13:0 "Conquest 2" + parthia_missions_13:0 "Conquest 13" parthia_missions_13_DESC:0 "" - parthia_missions_14:0 "Conquest 3" + parthia_missions_14:0 "Conquest 14" parthia_missions_14_DESC:0 "" - parthia_missions_15:0 "Conquest 4" + parthia_missions_15:0 "Conquest 15" parthia_missions_15_DESC:0 "" - parthia_missions_16:0 "Conquest 5" + parthia_missions_16:0 "Conquest 16" parthia_missions_16_DESC:0 "" - parthia_missions_17:0 "Conquest 6" + parthia_missions_17:0 "Conquest 17" parthia_missions_17_DESC:0 "" - parthia_missions_18:0 "Conquest 7" + parthia_missions_18:0 "Conquest 18" parthia_missions_18_DESC:0 "" - parthia_missions_19:0 "Conquest 8" + parthia_missions_19:0 "Conquest 19" parthia_missions_19_DESC:0 "" - parthia_missions_20:0 "Conquest 9" + parthia_missions_20:0 "Conquest 20" parthia_missions_20_DESC:0 "" - parthia_missions_21:0 "Conquest 10" + parthia_missions_21:0 "Conquest 21" parthia_missions_21_DESC:0 "" - parthia_missions_22:0 "Conquest 11" + parthia_missions_22:0 "Conquest 22" parthia_missions_22_DESC:0 "" - parthia_missions_12a:0 "Conquest 1a" + parthia_missions_12a:0 "Conquest 12a" parthia_missions_12a_DESC:0 "" - parthia_missions_13a:0 "Conquest 2a" + parthia_missions_13a:0 "Conquest 13a" parthia_missions_13a_DESC:0 "" - parthia_missions_14a:0 "Conquest 3a" + parthia_missions_14a:0 "Conquest 14a" parthia_missions_14a_DESC:0 "" - parthia_missions_15a:0 "Conquest 4a" + parthia_missions_15a:0 "Conquest 15a" parthia_missions_15a_DESC:0 "" - parthia_missions_16a:0 "Conquest 5a" + parthia_missions_16a:0 "Conquest 16a" parthia_missions_16a_DESC:0 "" - parthia_missions_17a:0 "Conquest 6a" + parthia_missions_17a:0 "Conquest 17a" parthia_missions_17a_DESC:0 "" - parthia_missions_18a:0 "Conquest 7a" + parthia_missions_18a:0 "Conquest 18a" parthia_missions_18a_DESC:0 "" - parthia_missions_19a:0 "Conquest 8a" + parthia_missions_19a:0 "Conquest 19a" parthia_missions_19a_DESC:0 "" - parthia_missions_20a:0 "Conquest 9a" + parthia_missions_20a:0 "Conquest 20a" parthia_missions_20a_DESC:0 "" - parthia_missions_21a:0 "Conquest 10a" + parthia_missions_21a:0 "Conquest 21a" parthia_missions_21a_DESC:0 "" - parthia_missions_22a:0 "Conquest 11a" - parthia_missions_22a_DESC:0 "" - parthia_missions_22a:0 "Conquest 11a" + parthia_missions_22a:0 "Conquest 22a" parthia_missions_22a_DESC:0 "" parthia_missions_23:0 ""