From 25b5a76f852b43ee9ad5d313b187fa5dd4f3f363 Mon Sep 17 00:00:00 2001 From: arkhometha Date: Mon, 27 Jan 2020 00:48:12 +0100 Subject: [PATCH] Fix for canal construction and other small fixes * Added another condition for the Megali Idea: If Russia spheres the Ottomans. * Made the OR and AND conditions show red in decisions, to improve readability of decisions. Remember this as this doesn't mean the decisions were not fulfilled, it's just to make reading conditions easier for the player. * Since the game doesn't seem to handle losing a lump sum amount of more than 2 million very well (resulting in bugs where you get the money instead of losing it), the payments for the canals that cost more than 2 million will be dealt with using the debt system all times. * Added Friuli to the "Italian Diaspora" decision. * If Egypt refuses the "hegemony over the nile" event, Egypt's sphere-lord will get a CB to sphere them and a war will start. If they do enforce the CB, they get direct control over Egyptian Sudan/Ethiopia. --- HPM/common/cb_types.txt | 22 ++++++ HPM/decisions/CleanUp.txt | 31 ++++++++ HPM/decisions/Italy.txt | 3 +- HPM/events/Canals Construction.txt | 120 +++++++++++++++-------------- HPM/events/Scramble for Africa.txt | 11 ++- HPM/localisation/00_HPM_events.csv | 2 +- 6 files changed, 123 insertions(+), 66 deletions(-) diff --git a/HPM/common/cb_types.txt b/HPM/common/cb_types.txt index bcc47285..7304f90f 100644 --- a/HPM/common/cb_types.txt +++ b/HPM/common/cb_types.txt @@ -1306,6 +1306,28 @@ add_to_sphere = { value = 0.25 } } + + on_po_accepted = { + random_owned = { + limit = { + owner = { + has_country_flag = surrender_sudan_on_lose + } + } + owner = { + clr_country_flag = surrender_sudan_on_lose + any_owned = { + limit = { + OR = { + is_core = SUD + is_core = ETH + } + } + secede_province = THIS + } + } + } + } } # Unification Humiliate diff --git a/HPM/decisions/CleanUp.txt b/HPM/decisions/CleanUp.txt index 28563264..ad1a0bfa 100644 --- a/HPM/decisions/CleanUp.txt +++ b/HPM/decisions/CleanUp.txt @@ -182,6 +182,12 @@ political_decisions = { AND = { government = fascist_dictatorship NOT = { has_country_flag = fascist_gov } } AND = { government = bourgeois_dictatorship NOT = { has_country_flag = anarcho_liberal_gov } } AND = { exists = yes NOT = { has_country_flag = existing_country has_country_flag = ghost_country } } + AND = { + ai = yes + has_country_flag = surrender_sudan_on_lose + part_of_sphere = no + war = no + } any_neighbor_country = { ai = no OR = { @@ -195,6 +201,11 @@ political_decisions = { AND = { government = fascist_dictatorship NOT = { has_country_flag = fascist_gov } } AND = { government = bourgeois_dictatorship NOT = { has_country_flag = anarcho_liberal_gov } } AND = { exists = yes NOT = { has_country_flag = existing_country has_country_flag = ghost_country } } + AND = { + has_country_flag = surrender_sudan_on_lose + part_of_sphere = no + war = no + } } } any_greater_power = { @@ -228,6 +239,26 @@ political_decisions = { clr_country_flag = presidential_dictatorship_gov clr_country_flag = fascist_gov clr_country_flag = anarcho_liberal_gov + random_owned = { + limit = { + owner = { + ai = yes + has_country_flag = surrender_sudan_on_lose + part_of_sphere = no + war = no + } + } + owner = { clr_country_flag = surrender_sudan_on_lose } + } + any_neighbor_country = { + limit = { + ai = no + has_country_flag = surrender_sudan_on_lose + part_of_sphere = no + war = no + } + clr_country_flag = surrender_sudan_on_lose + } random_owned = { limit = { owner = { government = theocracy } } owner = { set_country_flag = theocratic_government } } random_owned = { limit = { owner = { government = proletarian_dictatorship } } owner = { set_country_flag = communist_gov } } random_owned = { limit = { owner = { government = absolute_monarchy } } owner = { set_country_flag = absolute_monarchy_gov } } diff --git a/HPM/decisions/Italy.txt b/HPM/decisions/Italy.txt index 54fb6093..04f9a1c0 100644 --- a/HPM/decisions/Italy.txt +++ b/HPM/decisions/Italy.txt @@ -652,6 +652,7 @@ political_decisions = { set_country_flag = italian_balkans AUS_734 = { add_core = ITA } #South Tirol AUS_736 = { add_core = ITA } #Istria + AUS_733 = { add_core = ITA } #Friuli 781 = { add_core = ITA } #Zadar } } @@ -677,7 +678,7 @@ political_decisions = { set_country_flag = conquest_adriatic_happened AUS_780 = { add_core = ITA } 2582 = { add_core = ITA } - 774 = { add_core = ITA } + #774 = { add_core = ITA } } ai_will_do = { diff --git a/HPM/events/Canals Construction.txt b/HPM/events/Canals Construction.txt index bb155843..676a23b8 100644 --- a/HPM/events/Canals Construction.txt +++ b/HPM/events/Canals Construction.txt @@ -12,26 +12,28 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 3000000 } + NOT = { treasury = 3000000 } check_variable = { which = owed_cash_money value = 9 } } } owner = { change_variable = { which = owed_cash_money value = 3000 } } } + random_owned = { limit = { owner = { - NOT = { money = 3000000 } + NOT = { treasury = 3000000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 3000 } } } - random_owned = { - limit = { owner = { money = 3000000 } } - owner = { treasury = -3000000 } - } + # random_owned = { + # owner = { country = { treasury = 3000000 } } + # limit = { owner = { treasury = -3000000 } } + # } + set_global_flag = suez_canal_construction random_list = { 35 = { 1755 = { add_province_modifier = { name = suez_canal_construction duration = 2190 } } } @@ -50,7 +52,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 2500000 } + NOT = { treasury = 2500000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -59,16 +61,18 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 2500000 } + NOT = { treasury = 2500000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 2500 } } } - random_owned = { - limit = { owner = { money = 2500000 } } - owner = { treasury = -2500000 } - } + + # random_owned = { + # limit = { owner = { treasury = 2500000 } } + # owner = { treasury = -2500000 } + # } + set_global_flag = suez_canal_construction random_list = { 30 = { 1755 = { add_province_modifier = { name = suez_canal_construction duration = 2555 } } } @@ -87,7 +91,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 2000000 } + NOT = { treasury = 2000000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -96,14 +100,14 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 2000000 } + NOT = { treasury = 2000000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 2000 } } } random_owned = { - limit = { owner = { money = 2000000 } } + limit = { owner = { treasury = 2000000 } } owner = { treasury = -2000000 } } set_global_flag = suez_canal_construction @@ -124,7 +128,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 1500000 } + NOT = { treasury = 1500000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -133,14 +137,14 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 1500000 } + NOT = { treasury = 1500000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 1500 } } } random_owned = { - limit = { owner = { money = 1500000 } } + limit = { owner = { treasury = 1500000 } } owner = { treasury = -1500000 } } set_global_flag = suez_canal_construction @@ -161,7 +165,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 1000000 } + NOT = { treasury = 1000000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -170,14 +174,14 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 1000000 } + NOT = { treasury = 1000000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 1000 } } } random_owned = { - limit = { owner = { money = 1000000 } } + limit = { owner = { treasury = 1000000 } } owner = { treasury = -1000000 } } set_global_flag = suez_canal_construction @@ -477,7 +481,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 1500000 } + NOT = { treasury = 1500000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -486,14 +490,14 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 1500000 } + NOT = { treasury = 1500000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 1500 } } } random_owned = { - limit = { owner = { money = 1500000 } } + limit = { owner = { treasury = 1500000 } } owner = { treasury = -1500000 } } set_global_flag = kiel_canal_construction @@ -512,7 +516,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 1000000 } + NOT = { treasury = 1000000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -521,14 +525,14 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 1000000 } + NOT = { treasury = 1000000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 1000 } } } random_owned = { - limit = { owner = { money = 1000000 } } + limit = { owner = { treasury = 1000000 } } owner = { treasury = -1000000 } } set_global_flag = kiel_canal_construction @@ -547,7 +551,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 500000 } + NOT = { treasury = 500000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -556,14 +560,14 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 500000 } + NOT = { treasury = 500000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 500 } } } random_owned = { - limit = { owner = { money = 500000 } } + limit = { owner = { treasury = 500000 } } owner = { treasury = -500000 } } set_global_flag = kiel_canal_construction @@ -621,7 +625,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 6000000 } + NOT = { treasury = 6000000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -630,16 +634,16 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 6000000 } + NOT = { treasury = 6000000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 6000 } } } - random_owned = { - limit = { owner = { money = 6000000 } } - owner = { treasury = -6000000 } - } + # random_owned = { + # limit = { owner = { treasury = 6000000 } } + # owner = { treasury = -6000000 } + # } set_global_flag = panama_canal_construction random_list = { 35 = { 1723 = { add_province_modifier = { name = panama_canal_construction duration = 2920 } } } @@ -658,7 +662,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 5000000 } + NOT = { treasury = 5000000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -667,16 +671,16 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 5000000 } + NOT = { treasury = 5000000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 5000 } } } - random_owned = { - limit = { owner = { money = 5000000 } } - owner = { treasury = -5000000 } - } + # random_owned = { + # limit = { owner = { treasury = 5000000 } } + # owner = { treasury = -5000000 } + # } set_global_flag = panama_canal_construction random_list = { 30 = { 1723 = { add_province_modifier = { name = panama_canal_construction duration = 2920 } } } @@ -695,7 +699,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 4000000 } + NOT = { treasury = 4000000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -704,16 +708,16 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 4000000 } + NOT = { treasury = 4000000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 4000 } } } - random_owned = { - limit = { owner = { money = 4000000 } } - owner = { treasury = -4000000 } - } + # random_owned = { + # limit = { owner = { treasury = 4000000 } } + # owner = { treasury = -4000000 } + # } set_global_flag = panama_canal_construction random_list = { 40 = { 1723 = { add_province_modifier = { name = panama_canal_construction duration = 2920 } } } @@ -732,7 +736,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 3000000 } + NOT = { treasury = 3000000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -741,16 +745,16 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 3000000 } + NOT = { treasury = 3000000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 3000 } } } - random_owned = { - limit = { owner = { money = 3000000 } } - owner = { treasury = -3000000 } - } + # random_owned = { + # limit = { owner = { treasury = 3000000 } } + # owner = { treasury = -3000000 } + # } set_global_flag = panama_canal_construction random_list = { 30 = { 1723 = { add_province_modifier = { name = panama_canal_construction duration = 3650 } } } @@ -769,7 +773,7 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 2000000 } + NOT = { treasury = 2000000 } check_variable = { which = owed_cash_money value = 9 } } } @@ -778,14 +782,14 @@ country_event = { random_owned = { limit = { owner = { - NOT = { money = 2000000 } + NOT = { treasury = 2000000 } NOT = { check_variable = { which = owed_cash_money value = 1 } } } } owner = { set_variable = { which = owed_cash_money value = 2000 } } } random_owned = { - limit = { owner = { money = 2000000 } } + limit = { owner = { treasury = 2000000 } } owner = { treasury = -2000000 } } set_global_flag = panama_canal_construction @@ -880,7 +884,7 @@ country_event = { tag = FROM NOT = { is_sphere_leader_of = THIS } } - THIS = { money = 100000 } + THIS = { treasury = 100000 } } } } diff --git a/HPM/events/Scramble for Africa.txt b/HPM/events/Scramble for Africa.txt index b16789c0..fbc9cb4f 100644 --- a/HPM/events/Scramble for Africa.txt +++ b/HPM/events/Scramble for Africa.txt @@ -920,15 +920,16 @@ country_event = { name = "EVT955178OPTA" prestige = -5 FROM = { country_event = 955179 } - ai_chance = { factor = 0.95 } + ai_chance = { factor = 0.75 } } option = { name = "EVT955178OPTB" prestige = 5 FROM = { country_event = 955180 } + set_country_flag = surrender_sudan_on_lose ai_chance = { - factor = 0.05 + factor = 0.25 modifier = { factor = 0 is_vassal = yes @@ -1013,7 +1014,6 @@ country_event = { name = "EVT955180OPTA" relation = { who = FROM value = -400 } diplomatic_influence = { who = FROM value = -400 } - SUD = { civilized = no government = theocracy @@ -1044,14 +1044,13 @@ country_event = { } casus_belli = { target = FROM - type = acquire_any_state + type = add_to_sphere months = 30 } war = { target = FROM attacker_goal = { - casus_belli = acquire_any_state - state_province_id = 1837 + casus_belli = add_to_sphere } } } diff --git a/HPM/localisation/00_HPM_events.csv b/HPM/localisation/00_HPM_events.csv index 3dda974f..118cca77 100644 --- a/HPM/localisation/00_HPM_events.csv +++ b/HPM/localisation/00_HPM_events.csv @@ -2187,7 +2187,7 @@ EVTDESC36977;The canal took years and thousands of workers to be built but today EVT36977OPTA;The canal will greatly help $COUNTRY$.;;;;;;;;;;;;x,,,,,,,,,,,,,,,,,,,, EVTNAME36978;Construction of the Panama Canal;;;;;;;;;;;;x,,,,,,,,,,,,,,,,,,,, EVTDESC36978;Today we will start building the Canal to connect the Atlantic and Pacific oceans. Our engineers are ready and a series of surveys of the area of the canal were done. The only thing left to do before we start the construction is define the budget of this colossal project. \n \n This promises to be one massive undertaking and when finished it will be, without a doubt, one of the biggest human achievements for decades to come.;;;;;;;;;;;;x,,,,,,,,,,,,,,,,,,,, -EVT36978OPTA;Allow them to have as much money as they need. §R((Pay or owe 6 million ¤)§W;;;;;;;;;;;;x,,,,,,,,,,,,,,,,,, +EVT36978OPTA;Allow them to have as much money as they need. §R(Pay or owe 6 million ¤)§W;;;;;;;;;;;;x,,,,,,,,,,,,,,,,,, EVT36978OPTB;Invest a little more than they asked for. §R(Pay or owe 5 million ¤)§W;;;;;;;;;;;;x,,,,,,,,,,,,,,,,,,, EVT36978OPTC;Give them as much as they asked for. §R(Pay or owe 4 million ¤)§W;;;;;;;;;;;;x,,,,,,,,,,,,,,,,,,, EVT36978OPTD;Invest a little less than they asked for. §RPay or owe 3 million ¤)§W;;;;;;;;;;;;x,,,,,,,,,,,,,,,,,,,