From 51db079df4dd01ba6fc737b6bf081e488a845e73 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 00:45:29 +0300 Subject: [PATCH 01/45] clamped currency value variables --- common/script_values/imf_values.txt | 9 ++- .../cwp_onaction_currency_effects.txt | 74 +++++++++---------- 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/common/script_values/imf_values.txt b/common/script_values/imf_values.txt index f22b208c0..c4ce89114 100644 --- a/common/script_values/imf_values.txt +++ b/common/script_values/imf_values.txt @@ -70,6 +70,7 @@ imf_domestic_currency_debt = { divide = { value = country_currency_val } + min = min_currency_value } } @@ -241,16 +242,16 @@ imf_credit_returns_mult = { not = { this = root } - imf_debt_monthly_payment_value >= 1 + imf_debt_monthly_payment_value > 0 } variable = imf_members add = imf_debt_monthly_payment_value } multiply = imf_contribution_share } - divide = { - value = country_currency_val - divide = global_var:global_currency.country_currency_val + multiply = { + value = global_var:global_currency.country_currency_val + divide = country_currency_val min = 0.00001 } divide = 4 diff --git a/common/scripted_effects/cwp_onaction_currency_effects.txt b/common/scripted_effects/cwp_onaction_currency_effects.txt index ab2ab24c3..a4f5dbd0c 100644 --- a/common/scripted_effects/cwp_onaction_currency_effects.txt +++ b/common/scripted_effects/cwp_onaction_currency_effects.txt @@ -1,42 +1,42 @@ onaction_currency_calculation = { # Currency Calculations - if = { limit = { var:cwp_currency = flag:currency_usd global_var:currency_usd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_usd_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_frf global_var:currency_frf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_frf_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_gbp global_var:currency_gbp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_gbp_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_sur global_var:currency_sur_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_sur_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_brz global_var:currency_brz_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_brz_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_dem global_var:currency_dem_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_dem_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_pen global_var:currency_pen_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_pen_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_mxn global_var:currency_mxn_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_mxn_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_irr global_var:currency_irr_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_irr_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_trl global_var:currency_trl_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_trl_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_yuf global_var:currency_yuf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_yuf_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_pln global_var:currency_pln_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_pln_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_cad global_var:currency_cad_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_cad_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_aud global_var:currency_aud_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_aud_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_nzd global_var:currency_nzd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_nzd_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_aup global_var:currency_aup_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_aup_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_nzp global_var:currency_nzp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_nzp_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_itl global_var:currency_itl_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_itl_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_jpy global_var:currency_jpy_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_jpy_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_chf global_var:currency_chf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_chf_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_ars global_var:currency_ars_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_ars_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_cny global_var:currency_cny_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_cny_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_inr global_var:currency_inr_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_inr_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_zar global_var:currency_zar_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_zar_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_sek global_var:currency_sek_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_sek_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_egp global_var:currency_egp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_egp_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_grd global_var:currency_grd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_grd_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_iep global_var:currency_iep_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_iep_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_esp global_var:currency_esp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_esp_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_pte global_var:currency_pte_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_pte_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_nok global_var:currency_nok_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_nok_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_fim global_var:currency_fim_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_fim_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_dkk global_var:currency_dkk_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_dkk_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_krw global_var:currency_krw_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_krw_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_thb global_var:currency_thb_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_thb_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_veb global_var:currency_veb_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_veb_v add = currency_value_growth }} - if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_php_v add = currency_value_growth }} + if = { limit = { var:cwp_currency = flag:currency_usd global_var:currency_usd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_usd_v add = currency_value_growth } clamp_global_variable = { name = currency_usd_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_frf global_var:currency_frf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_frf_v add = currency_value_growth } clamp_global_variable = { name = currency_frf_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_gbp global_var:currency_gbp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_gbp_v add = currency_value_growth } clamp_global_variable = { name = currency_gbp_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_sur global_var:currency_sur_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_sur_v add = currency_value_growth } clamp_global_variable = { name = currency_sur_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_brz global_var:currency_brz_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_brz_v add = currency_value_growth } clamp_global_variable = { name = currency_brz_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_dem global_var:currency_dem_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_dem_v add = currency_value_growth } clamp_global_variable = { name = currency_dem_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_pen global_var:currency_pen_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_pen_v add = currency_value_growth } clamp_global_variable = { name = currency_pen_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_mxn global_var:currency_mxn_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_mxn_v add = currency_value_growth } clamp_global_variable = { name = currency_mxn_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_irr global_var:currency_irr_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_irr_v add = currency_value_growth } clamp_global_variable = { name = currency_irr_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_trl global_var:currency_trl_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_trl_v add = currency_value_growth } clamp_global_variable = { name = currency_trl_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_yuf global_var:currency_yuf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_yuf_v add = currency_value_growth } clamp_global_variable = { name = currency_yuf_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_pln global_var:currency_pln_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_pln_v add = currency_value_growth } clamp_global_variable = { name = currency_pln_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_cad global_var:currency_cad_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_cad_v add = currency_value_growth } clamp_global_variable = { name = currency_cad_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_aud global_var:currency_aud_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_aud_v add = currency_value_growth } clamp_global_variable = { name = currency_aud_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_nzd global_var:currency_nzd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_nzd_v add = currency_value_growth } clamp_global_variable = { name = currency_nzd_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_aup global_var:currency_aup_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_aup_v add = currency_value_growth } clamp_global_variable = { name = currency_aup_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_nzp global_var:currency_nzp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_nzp_v add = currency_value_growth } clamp_global_variable = { name = currency_nzp_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_itl global_var:currency_itl_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_itl_v add = currency_value_growth } clamp_global_variable = { name = currency_itl_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_jpy global_var:currency_jpy_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_jpy_v add = currency_value_growth } clamp_global_variable = { name = currency_jpy_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_chf global_var:currency_chf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_chf_v add = currency_value_growth } clamp_global_variable = { name = currency_chf_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_ars global_var:currency_ars_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_ars_v add = currency_value_growth } clamp_global_variable = { name = currency_ars_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_cny global_var:currency_cny_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_cny_v add = currency_value_growth } clamp_global_variable = { name = currency_cny_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_inr global_var:currency_inr_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_inr_v add = currency_value_growth } clamp_global_variable = { name = currency_inr_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_zar global_var:currency_zar_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_zar_v add = currency_value_growth } clamp_global_variable = { name = currency_zar_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_sek global_var:currency_sek_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_sek_v add = currency_value_growth } clamp_global_variable = { name = currency_sek_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_egp global_var:currency_egp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_egp_v add = currency_value_growth } clamp_global_variable = { name = currency_egp_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_grd global_var:currency_grd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_grd_v add = currency_value_growth } clamp_global_variable = { name = currency_grd_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_iep global_var:currency_iep_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_iep_v add = currency_value_growth } clamp_global_variable = { name = currency_iep_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_esp global_var:currency_esp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_esp_v add = currency_value_growth } clamp_global_variable = { name = currency_esp_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_pte global_var:currency_pte_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_pte_v add = currency_value_growth } clamp_global_variable = { name = currency_pte_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_nok global_var:currency_nok_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_nok_v add = currency_value_growth } clamp_global_variable = { name = currency_nok_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_fim global_var:currency_fim_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_fim_v add = currency_value_growth } clamp_global_variable = { name = currency_fim_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_dkk global_var:currency_dkk_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_dkk_v add = currency_value_growth } clamp_global_variable = { name = currency_dkk_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_krw global_var:currency_krw_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_krw_v add = currency_value_growth } clamp_global_variable = { name = currency_krw_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_thb global_var:currency_thb_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_thb_v add = currency_value_growth } clamp_global_variable = { name = currency_thb_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_veb global_var:currency_veb_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_veb_v add = currency_value_growth } clamp_global_variable = { name = currency_veb_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_php_v add = currency_value_growth } clamp_global_variable = { name = currency_php_v max = 90000000000 min = min_currency_value } } ################################### on_action_currency_denomination_change_chance = yes if = { From 6cc1656974ed2ab9e932232bb2e554ed5481e6d6 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 05:28:17 +0300 Subject: [PATCH 02/45] added decision to adopt new currencies and take over as leading bank --- common/decisions/currency_decisions.txt | 47 +++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 common/decisions/currency_decisions.txt diff --git a/common/decisions/currency_decisions.txt b/common/decisions/currency_decisions.txt new file mode 100644 index 000000000..bc6630520 --- /dev/null +++ b/common/decisions/currency_decisions.txt @@ -0,0 +1,47 @@ +adopt_new_currency = { + is_shown = { + this = { + not = { + is_leading_central_bank = yes + } + can_adopt_currency = yes + } + } + + possible = { + not = { + has_law = law_type:law_pegged_currency + } + } + + when_taken = { + effect_adopt_currency = yes + } + + ai_chance = { + base = 100 + } +} + +take_over_currency_central_bank = { + is_shown = { + this = { + is_leading_central_bank = no + } + } + + possible = { + custom_tooltip = { + text = GDP_LARGER_THAN_LEADING_BANK + cwp_gdp_with_inflation >= leading_central_bank_gdp + } + } + + when_taken = { + replace_currency_leader = yes + } + + ai_chance = { + base = 100 + } +} From f1ca54aa0190cf2f07521cc42bcf7a4afa584296 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 05:28:54 +0300 Subject: [PATCH 03/45] removed DEM from occupation zones, as there can be no leading central bank yet --- common/history/countries/aoz - american occupation zone.txt | 1 - common/history/countries/boz - british occupation zone.txt | 1 - common/history/countries/foz - french occupation zone.txt | 1 - 3 files changed, 3 deletions(-) diff --git a/common/history/countries/aoz - american occupation zone.txt b/common/history/countries/aoz - american occupation zone.txt index 059052d83..381978405 100644 --- a/common/history/countries/aoz - american occupation zone.txt +++ b/common/history/countries/aoz - american occupation zone.txt @@ -43,7 +43,6 @@ ig:ig_patriots = { set_ig_suppression = yes } - effect_currency_dem = yes add_technology_researched = mechanical_computers } } diff --git a/common/history/countries/boz - british occupation zone.txt b/common/history/countries/boz - british occupation zone.txt index b5bf3d72c..ace7883d2 100644 --- a/common/history/countries/boz - british occupation zone.txt +++ b/common/history/countries/boz - british occupation zone.txt @@ -4,7 +4,6 @@ effect_starting_technology_tier_1_tech = yes effect_starting_technology_wartime_participant_tech = yes set_tax_level = medium - effect_currency_dem = yes #laws effect_create_law_package = { headOfGovernment = administrative diff --git a/common/history/countries/foz - french occupation zone.txt b/common/history/countries/foz - french occupation zone.txt index 7a5610508..6725bc122 100644 --- a/common/history/countries/foz - french occupation zone.txt +++ b/common/history/countries/foz - french occupation zone.txt @@ -3,7 +3,6 @@ set_next_election_date = 1946.10.20 effect_starting_technology_tier_1_tech = yes effect_starting_technology_wartime_participant_tech = yes - effect_currency_dem = yes set_tax_level = medium # Laws effect_create_law_package = { From 0c216d7f09c03093733178ef37081a12929462d9 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 05:29:05 +0300 Subject: [PATCH 04/45] improved syntax --- common/history/global/00_global.txt | 368 +++------------------------- 1 file changed, 37 insertions(+), 331 deletions(-) diff --git a/common/history/global/00_global.txt b/common/history/global/00_global.txt index 6c9ca17b6..727292a4b 100644 --- a/common/history/global/00_global.txt +++ b/common/history/global/00_global.txt @@ -15,337 +15,43 @@ GLOBAL = { value = c:USA } set_global_variable = bretton_woods_agreement - #USA-Sphere - add_to_global_variable_list = { - name = central_bank_list - target = c:USA - } #USD - add_to_global_variable_list = { - name = central_bank_list - target = c:JAP - } #JPY - #Anglo-Sphere - add_to_global_variable_list = { - name = central_bank_list - target = c:GBR - } #GBP - add_to_global_variable_list = { - name = central_bank_list - target = c:CAN - } #CAD - add_to_global_variable_list = { - name = central_bank_list - target = c:AST - } #AUP - add_to_global_variable_list = { - name = central_bank_list - target = c:NZL - } #NZP - add_to_global_variable_list = { - name = central_bank_list - target = c:SAF - } #ZAR - add_to_global_variable_list = { - name = central_bank_list - target = c:IRE - } #IEP - add_to_global_variable_list = { - name = central_bank_list - target = c:EGY - } #EGP - add_to_global_variable_list = { - name = central_bank_list - target = c:HND - } #INR - #Franco-Sphere - add_to_global_variable_list = { - name = central_bank_list - target = c:FRA - } #FRF - #Russo-Sphere - add_to_global_variable_list = { - name = central_bank_list - target = c:RUS - } #SUR - add_to_global_variable_list = { - name = central_bank_list - target = c:POL - } #PLN - #Nordics - add_to_global_variable_list = { - name = central_bank_list - target = c:SWE - } #SEK - add_to_global_variable_list = { - name = central_bank_list - target = c:NOR - } #NOK - add_to_global_variable_list = { - name = central_bank_list - target = c:FIN - } #FIM - add_to_global_variable_list = { - name = central_bank_list - target = c:DEN - } #DKK - #South America - add_to_global_variable_list = { - name = central_bank_list - target = c:BRZ - } #BRZ - add_to_global_variable_list = { - name = central_bank_list - target = c:PEU - } #PEN - add_to_global_variable_list = { - name = central_bank_list - target = c:ARG - } #ARS - #China - add_to_global_variable_list = { - name = central_bank_list - target = c:ROC - } #CNY - add_to_global_variable_list = { - name = central_bank_list - target = c:PRC - } #CNY - #Iberia - add_to_global_variable_list = { - name = central_bank_list - target = c:SPA - } #ESP - add_to_global_variable_list = { - name = central_bank_list - target = c:POR - } #PTE - #Others - add_to_global_variable_list = { - name = central_bank_list - target = c:MEX - } #MXN - add_to_global_variable_list = { - name = central_bank_list - target = c:PER - } #IRR - add_to_global_variable_list = { - name = central_bank_list - target = c:TUR - } #TRL - add_to_global_variable_list = { - name = central_bank_list - target = c:YUG - } #YUF - add_to_global_variable_list = { - name = central_bank_list - target = c:ITA - } #ITL - add_to_global_variable_list = { - name = central_bank_list - target = c:SWI - } #CHF - add_to_global_variable_list = { - name = central_bank_list - target = c:GRE - } #GRD - add_to_global_variable_list = { - name = central_bank_list - target = c:STK - } #KRW - add_to_global_variable_list = { - name = central_bank_list - target = c:THA - } #THB - add_to_global_variable_list = { - name = central_bank_list - target = c:VNZ - } #VEB - set_currency = { - currency = usd - value = 10 - denominationValue = 1 - } - set_currency = { - currency = frf - value = 9.3 - denominationValue = 1000 - } - set_currency = { - currency = gbp - value = 40.3 - denominationValue = 1 - } - set_currency = { - currency = sur - value = 2.7 - denominationValue = 10 - } - set_currency = { - currency = brz - value = 2.7 - denominationValue = 10 - } - set_currency = { - currency = dem - value = 2.7 - denominationValue = 10 - } - set_currency = { - currency = pen - value = 0.6 - denominationValue = 10 - } - set_currency = { - currency = mxn - value = 0.8 - denominationValue = 10 - } - #set_currency = { currency = dnr value = 100 denominationValue = 1 } - set_currency = { - currency = irr - value = 0.3 - denominationValue = 1000 - } - set_currency = { - currency = trl - value = 0.11 - denominationValue = 10 - } - set_currency = { - currency = yuf - value = 0.8 - denominationValue = 10 - } - set_currency = { - currency = pln - value = 3.4 - denominationValue = 1 - } - set_currency = { - currency = cad - value = 10.1 - denominationValue = 1 - } - set_currency = { - currency = aud - value = 9 - denominationValue = 1 - } - set_currency = { - currency = nzd - value = 9 - denominationValue = 1 - } - set_currency = { - currency = aup - value = 3.3 - denominationValue = 1 - } - set_currency = { - currency = nzp - value = 3.1 - denominationValue = 1 - } - set_currency = { - currency = itl - value = 0.67 - denominationValue = 100 - } - set_currency = { - currency = jpy - value = 2.8 - denominationValue = 100 - } - set_currency = { - currency = chf - value = 2.3 - denominationValue = 1 - } - set_currency = { - currency = ars - value = 2.7 - denominationValue = 1 - } - set_currency = { - currency = cny - value = 2 - denominationValue = 1 - } - set_currency = { - currency = inr - value = 3 - denominationValue = 1 - } - set_currency = { - currency = zar - value = 1.7 - denominationValue = 1 - } - set_currency = { - currency = sek - value = 1.6 - denominationValue = 1 - } - set_currency = { - currency = egp - value = 23.2 - denominationValue = 1 - } - set_currency = { - currency = grd - value = 0.3 - denominationValue = 10 - } - set_currency = { - currency = iep - value = 18.8 - denominationValue = 1 - } - set_currency = { - currency = esp - value = 0.78 - denominationValue = 10 - } - set_currency = { - currency = pte - value = 0.14 - denominationValue = 10 - } - set_currency = { - currency = nok - value = 1.5 - denominationValue = 1 - } - set_currency = { - currency = fim - value = 2.3 - denominationValue = 1 - } - set_currency = { - currency = dkk - value = 1.6 - denominationValue = 1 - } - set_currency = { - currency = krw - value = 0.9 - denominationValue = 100 - } - set_currency = { - currency = thb - value = 2 - denominationValue = 1 - } - set_currency = { - currency = veb - value = 30.35 - denominationValue = 1 - } - set_currency = { - currency = php - value = 5 - denominationValue = 100 - } + set_currency = { currency = usd value = 10 centralBank = c:USA denominationValue = 1 } + set_currency = { currency = frf value = 9.3 centralBank = c:FRA denominationValue = 1000 } + set_currency = { currency = gbp value = 40.3 centralBank = c:GBR denominationValue = 1 } + set_currency = { currency = sur value = 2.7 centralBank = c:RUS denominationValue = 10 } + set_currency = { currency = brz value = 2.7 centralBank = c:BRZ denominationValue = 10 } + set_currency = { currency = dem value = 2.7 centralBank = 0 denominationValue = 10 } + set_currency = { currency = pen value = 0.6 centralBank = c:PEU denominationValue = 10 } + set_currency = { currency = mxn value = 0.8 centralBank = c:MEX denominationValue = 10 } + set_currency = { currency = irr value = 0.3 centralBank = c:PER denominationValue = 1000 } + set_currency = { currency = trl value = 1.1 centralBank = c:TUR denominationValue = 100 } + set_currency = { currency = yuf value = 0.8 centralBank = c:YUG denominationValue = 10 } + set_currency = { currency = pln value = 3.4 centralBank = c:POL denominationValue = 1 } + set_currency = { currency = cad value = 10.1 centralBank = c:CAN denominationValue = 1 } + set_currency = { currency = aud value = 9 centralBank = 0 denominationValue = 1 } + set_currency = { currency = nzd value = 9 centralBank = 0 denominationValue = 1 } + set_currency = { currency = aup value = 3.3 centralBank = c:AST denominationValue = 1 } + set_currency = { currency = nzp value = 3.1 centralBank = c:NZL denominationValue = 1 } + set_currency = { currency = itl value = 0.67 centralBank = c:ITA denominationValue = 100 } + set_currency = { currency = jpy value = 2.8 centralBank = c:JAP denominationValue = 100 } + set_currency = { currency = chf value = 2.3 centralBank = c:SWI denominationValue = 1 } + set_currency = { currency = ars value = 2.7 centralBank = c:ARG denominationValue = 1 } + set_currency = { currency = cny value = 2 centralBank = c:ROC denominationValue = 1 } + set_currency = { currency = inr value = 3 centralBank = c:HND denominationValue = 1 } + set_currency = { currency = zar value = 1.7 centralBank = c:SAF denominationValue = 1 } + set_currency = { currency = sek value = 1.6 centralBank = c:SWE denominationValue = 1 } + set_currency = { currency = egp value = 23.2 centralBank = c:EGY denominationValue = 1 } + set_currency = { currency = grd value = 0.3 centralBank = c:GRE denominationValue = 10 } + set_currency = { currency = iep value = 18.8 centralBank = c:IRE denominationValue = 1 } + set_currency = { currency = esp value = 7.8 centralBank = c:SPA denominationValue = 100 } + set_currency = { currency = pte value = 1.4 centralBank = c:POR denominationValue = 100 } + set_currency = { currency = nok value = 1.5 centralBank = c:NOR denominationValue = 1 } + set_currency = { currency = fim value = 2.3 centralBank = c:FIN denominationValue = 1 } + set_currency = { currency = dkk value = 1.6 centralBank = c:DEN denominationValue = 1 } + set_currency = { currency = krw value = 0.9 centralBank = c:STK denominationValue = 100 } + set_currency = { currency = thb value = 2 centralBank = c:THA denominationValue = 1 } + set_currency = { currency = veb value = 30.35 centralBank = c:VNZ denominationValue = 1 } + set_currency = { currency = php value = 5 centralBank = c:PHI denominationValue = 100 } # Fiscal every_country = { limit = { not = { has_variable = foreign_reserves } } set_variable = { name = foreign_reserves value = 0 } } every_country = { limit = { not = { has_variable = inflation_rate } } set_variable = { name = inflation_rate value = 0 } } From bf6d1f3e1d9cccf31f5645c1b671f8cef8193f64 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 05:29:41 +0300 Subject: [PATCH 05/45] fixed foreign reserves selling value --- common/script_values/fiscal_values.txt | 51 +------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/common/script_values/fiscal_values.txt b/common/script_values/fiscal_values.txt index 32a0ae38c..7b889ee47 100644 --- a/common/script_values/fiscal_values.txt +++ b/common/script_values/fiscal_values.txt @@ -394,7 +394,7 @@ foreign_reserves_conversion = { } foreign_reserves_sell = { value = 500000 - multiply = currency_average_difference_to_global + divide = global_average_difference_to_currency min = 0.1 } foreign_reserves_ratio = { @@ -425,55 +425,6 @@ foreign_reserves_value = { value = var:foreign_reserves } -foreign_avg = { - if = { limit = { exists = global_var:currency_usd_v } add = global_var:currency_usd_v } - if = { limit = { exists = global_var:currency_frf_v } add = global_var:currency_frf_v } - if = { limit = { exists = global_var:currency_gbp_v } add = global_var:currency_gbp_v } - if = { limit = { exists = global_var:currency_sur_v } add = global_var:currency_sur_v } - if = { limit = { exists = global_var:currency_brz_v } add = global_var:currency_brz_v } - if = { limit = { exists = global_var:currency_dem_v } add = global_var:currency_dem_v } - if = { limit = { exists = global_var:currency_pen_v } add = global_var:currency_pen_v } - if = { limit = { exists = global_var:currency_mxn_v } add = global_var:currency_mxn_v } - if = { limit = { exists = global_var:currency_irr_v } add = global_var:currency_irr_v } - if = { limit = { exists = global_var:currency_trl_v } add = global_var:currency_trl_v } - if = { limit = { exists = global_var:currency_yuf_v } add = global_var:currency_yuf_v } - if = { limit = { exists = global_var:currency_pln_v } add = global_var:currency_pln_v } - if = { limit = { exists = global_var:currency_cad_v } add = global_var:currency_cad_v } - if = { limit = { exists = global_var:currency_aud_v } add = global_var:currency_aud_v } - if = { limit = { exists = global_var:currency_nzd_v } add = global_var:currency_nzd_v } - if = { limit = { exists = global_var:currency_aup_v } add = global_var:currency_aup_v } - if = { limit = { exists = global_var:currency_nzp_v } add = global_var:currency_nzp_v } - if = { limit = { exists = global_var:currency_itl_v } add = global_var:currency_itl_v } - if = { limit = { exists = global_var:currency_jpy_v } add = global_var:currency_jpy_v } - if = { limit = { exists = global_var:currency_chf_v } add = global_var:currency_chf_v } - if = { limit = { exists = global_var:currency_ars_v } add = global_var:currency_ars_v } - if = { limit = { exists = global_var:currency_cny_v } add = global_var:currency_cny_v } - if = { limit = { exists = global_var:currency_inr_v } add = global_var:currency_inr_v } - if = { limit = { exists = global_var:currency_zar_v } add = global_var:currency_zar_v } - if = { limit = { exists = global_var:currency_sek_v } add = global_var:currency_sek_v } - if = { limit = { exists = global_var:currency_egp_v } add = global_var:currency_egp_v } - if = { limit = { exists = global_var:currency_grd_v } add = global_var:currency_grd_v } - if = { limit = { exists = global_var:currency_iep_v } add = global_var:currency_iep_v } - if = { limit = { exists = global_var:currency_esp_v } add = global_var:currency_esp_v } - if = { limit = { exists = global_var:currency_pte_v } add = global_var:currency_pte_v } - if = { limit = { exists = global_var:currency_nok_v } add = global_var:currency_nok_v } - if = { limit = { exists = global_var:currency_fim_v } add = global_var:currency_fim_v } - if = { limit = { exists = global_var:currency_dkk_v } add = global_var:currency_dkk_v } - if = { limit = { exists = global_var:currency_krw_v } add = global_var:currency_krw_v } - if = { limit = { exists = global_var:currency_thb_v } add = global_var:currency_thb_v } - if = { limit = { exists = global_var:currency_veb_v } add = global_var:currency_veb_v } - if = { limit = { exists = global_var:currency_php_v } add = global_var:currency_php_v } - divide = foreign_avg_count -} - -foreign_avg_count = { - every_in_global_list = { - variable = central_bank_list - add = 1 - } -} - - # Interest Rates interest_rate = { value = 0 From cf48b93f45b4a5eb6c14c3cd518b08893671f9c6 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 05:30:11 +0300 Subject: [PATCH 06/45] improved % to global average calculations --- common/script_values/currency_values.txt | 60 ++++-- common/script_values/gdp_value.txt | 2 +- common/script_values/imf_values.txt | 10 +- .../cwp_currency_adoption_effects.txt | 23 +++ .../cwp_onaction_currency_effects.txt | 177 ++++++++++-------- common/scripted_guis/fiscal_sgui.txt | 24 +-- .../scripted_triggers/cwp_fiscal_triggers.txt | 30 +++ gui/banks_panel.gui | 5 +- .../english/CWP/CWP_concepts_l_english.yml | 3 + .../english/CWP/CWP_currency_l_english.yml | 9 + 10 files changed, 238 insertions(+), 105 deletions(-) create mode 100644 common/scripted_effects/cwp_currency_adoption_effects.txt create mode 100644 common/scripted_triggers/cwp_fiscal_triggers.txt diff --git a/common/script_values/currency_values.txt b/common/script_values/currency_values.txt index 48d6ae100..8403b1e84 100644 --- a/common/script_values/currency_values.txt +++ b/common/script_values/currency_values.txt @@ -80,12 +80,7 @@ currency_value_growth = { } if = { limit = { - not = { - is_target_in_global_variable_list = { - name = central_bank_list - target = THIS - } - } + is_leading_central_bank = no } value = 0 } @@ -174,6 +169,35 @@ country_currency_denomination = { if = { limit = { var:cwp_currency = flag:currency_veb } value = global_var:currency_veb_d } if = { limit = { var:cwp_currency = flag:currency_php } value = global_var:currency_php_d } } +foreign_avg = { + every_country = { + limit = { + is_leading_central_bank = yes + has_variable = cwp_currency + } + add = country_currency_val + } + divide = foreign_avg_count +} + +foreign_avg_count = { + every_country = { + limit = { + is_leading_central_bank = yes + } + add = 1 + } +} +leading_central_bank_gdp = { + every_in_global_list = { + variable = central_bank_list + limit = { + root.var:cwp_currency = var:cwp_currency + is_leading_central_bank = yes + } + add = cwp_gdp_with_inflation + } +} country_currency_with_denomination = { value = country_currency_val @@ -266,17 +290,29 @@ currency_modifier_multiplier = { currency_average_difference_to_global_AI = { - value = country_currency_val - subtract = foreign_avg - divide = foreign_avg + value = { + value = country_currency_val + subtract = foreign_avg + } + divide = { + value = country_currency_val + add = foreign_avg + divide = 2 + } multiply = 100 #min = min_currency_value } currency_average_difference_to_global = { - value = player_currency - subtract = foreign_avg - divide = foreign_avg + value = { + value = player_currency + subtract = foreign_avg + } + divide = { + value = player_currency + add = foreign_avg + divide = 2 + } multiply = 100 #min = min_currency_value } diff --git a/common/script_values/gdp_value.txt b/common/script_values/gdp_value.txt index 1df8578ec..8ec04b780 100644 --- a/common/script_values/gdp_value.txt +++ b/common/script_values/gdp_value.txt @@ -28,7 +28,7 @@ cwp_gdp_with_inflation = { } cwp_gdp_per_capita = { - value = cwp_gdp + value = cwp_gdp_with_inflation divide = total_population } diff --git a/common/script_values/imf_values.txt b/common/script_values/imf_values.txt index c4ce89114..c933cd12f 100644 --- a/common/script_values/imf_values.txt +++ b/common/script_values/imf_values.txt @@ -249,11 +249,11 @@ imf_credit_returns_mult = { } multiply = imf_contribution_share } - multiply = { - value = global_var:global_currency.country_currency_val - divide = country_currency_val - min = 0.00001 - } +# multiply = { +# value = global_var:global_currency.country_currency_val +# divide = country_currency_val +# min = 0.00001 +# } divide = 4 } diff --git a/common/scripted_effects/cwp_currency_adoption_effects.txt b/common/scripted_effects/cwp_currency_adoption_effects.txt new file mode 100644 index 000000000..3475efc7f --- /dev/null +++ b/common/scripted_effects/cwp_currency_adoption_effects.txt @@ -0,0 +1,23 @@ +effect_adopt_currency = { + if = { + limit = { + or = { + c:GER ?= THIS + c:RHI ?= THIS + c:SAA ?= THIS + c:AOA ?= THIS + c:SGF ?= THIS + } + } + custom_tooltip = { + text = "WILL_ADOPT_NEW_CURRENCY" + effect_currency_dem = yes + } + if = { limit = { not = { currency_leader_exists = { currency = dem } } } + custom_tooltip = { + text = "WILL_BECOME_LEADING_BANK_FOR_CURRENCY" + set_currency = { currency = dem value = foreign_avg centralBank = THIS denominationValue = 1 } + } + } + } +} \ No newline at end of file diff --git a/common/scripted_effects/cwp_onaction_currency_effects.txt b/common/scripted_effects/cwp_onaction_currency_effects.txt index a4f5dbd0c..589c4bfb3 100644 --- a/common/scripted_effects/cwp_onaction_currency_effects.txt +++ b/common/scripted_effects/cwp_onaction_currency_effects.txt @@ -1,42 +1,42 @@ onaction_currency_calculation = { # Currency Calculations - if = { limit = { var:cwp_currency = flag:currency_usd global_var:currency_usd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_usd_v add = currency_value_growth } clamp_global_variable = { name = currency_usd_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_frf global_var:currency_frf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_frf_v add = currency_value_growth } clamp_global_variable = { name = currency_frf_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_gbp global_var:currency_gbp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_gbp_v add = currency_value_growth } clamp_global_variable = { name = currency_gbp_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_sur global_var:currency_sur_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_sur_v add = currency_value_growth } clamp_global_variable = { name = currency_sur_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_brz global_var:currency_brz_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_brz_v add = currency_value_growth } clamp_global_variable = { name = currency_brz_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_dem global_var:currency_dem_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_dem_v add = currency_value_growth } clamp_global_variable = { name = currency_dem_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_pen global_var:currency_pen_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_pen_v add = currency_value_growth } clamp_global_variable = { name = currency_pen_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_mxn global_var:currency_mxn_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_mxn_v add = currency_value_growth } clamp_global_variable = { name = currency_mxn_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_irr global_var:currency_irr_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_irr_v add = currency_value_growth } clamp_global_variable = { name = currency_irr_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_trl global_var:currency_trl_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_trl_v add = currency_value_growth } clamp_global_variable = { name = currency_trl_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_yuf global_var:currency_yuf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_yuf_v add = currency_value_growth } clamp_global_variable = { name = currency_yuf_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_pln global_var:currency_pln_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_pln_v add = currency_value_growth } clamp_global_variable = { name = currency_pln_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_cad global_var:currency_cad_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_cad_v add = currency_value_growth } clamp_global_variable = { name = currency_cad_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_aud global_var:currency_aud_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_aud_v add = currency_value_growth } clamp_global_variable = { name = currency_aud_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_nzd global_var:currency_nzd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_nzd_v add = currency_value_growth } clamp_global_variable = { name = currency_nzd_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_aup global_var:currency_aup_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_aup_v add = currency_value_growth } clamp_global_variable = { name = currency_aup_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_nzp global_var:currency_nzp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_nzp_v add = currency_value_growth } clamp_global_variable = { name = currency_nzp_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_itl global_var:currency_itl_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_itl_v add = currency_value_growth } clamp_global_variable = { name = currency_itl_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_jpy global_var:currency_jpy_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_jpy_v add = currency_value_growth } clamp_global_variable = { name = currency_jpy_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_chf global_var:currency_chf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_chf_v add = currency_value_growth } clamp_global_variable = { name = currency_chf_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_ars global_var:currency_ars_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_ars_v add = currency_value_growth } clamp_global_variable = { name = currency_ars_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_cny global_var:currency_cny_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_cny_v add = currency_value_growth } clamp_global_variable = { name = currency_cny_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_inr global_var:currency_inr_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_inr_v add = currency_value_growth } clamp_global_variable = { name = currency_inr_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_zar global_var:currency_zar_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_zar_v add = currency_value_growth } clamp_global_variable = { name = currency_zar_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_sek global_var:currency_sek_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_sek_v add = currency_value_growth } clamp_global_variable = { name = currency_sek_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_egp global_var:currency_egp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_egp_v add = currency_value_growth } clamp_global_variable = { name = currency_egp_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_grd global_var:currency_grd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_grd_v add = currency_value_growth } clamp_global_variable = { name = currency_grd_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_iep global_var:currency_iep_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_iep_v add = currency_value_growth } clamp_global_variable = { name = currency_iep_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_esp global_var:currency_esp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_esp_v add = currency_value_growth } clamp_global_variable = { name = currency_esp_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_pte global_var:currency_pte_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_pte_v add = currency_value_growth } clamp_global_variable = { name = currency_pte_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_nok global_var:currency_nok_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_nok_v add = currency_value_growth } clamp_global_variable = { name = currency_nok_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_fim global_var:currency_fim_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_fim_v add = currency_value_growth } clamp_global_variable = { name = currency_fim_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_dkk global_var:currency_dkk_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_dkk_v add = currency_value_growth } clamp_global_variable = { name = currency_dkk_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_krw global_var:currency_krw_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_krw_v add = currency_value_growth } clamp_global_variable = { name = currency_krw_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_thb global_var:currency_thb_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_thb_v add = currency_value_growth } clamp_global_variable = { name = currency_thb_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_veb global_var:currency_veb_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_veb_v add = currency_value_growth } clamp_global_variable = { name = currency_veb_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } change_global_variable = { name = currency_php_v add = currency_value_growth } clamp_global_variable = { name = currency_php_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_usd global_var:currency_usd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_usd_v add = currency_value_growth } clamp_global_variable = { name = currency_usd_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_frf global_var:currency_frf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_frf_v add = currency_value_growth } clamp_global_variable = { name = currency_frf_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_gbp global_var:currency_gbp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_gbp_v add = currency_value_growth } clamp_global_variable = { name = currency_gbp_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_sur global_var:currency_sur_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_sur_v add = currency_value_growth } clamp_global_variable = { name = currency_sur_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_brz global_var:currency_brz_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_brz_v add = currency_value_growth } clamp_global_variable = { name = currency_brz_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_dem global_var:currency_dem_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_dem_v add = currency_value_growth } clamp_global_variable = { name = currency_dem_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_pen global_var:currency_pen_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pen_v add = currency_value_growth } clamp_global_variable = { name = currency_pen_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_mxn global_var:currency_mxn_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_mxn_v add = currency_value_growth } clamp_global_variable = { name = currency_mxn_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_irr global_var:currency_irr_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_irr_v add = currency_value_growth } clamp_global_variable = { name = currency_irr_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_trl global_var:currency_trl_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_trl_v add = currency_value_growth } clamp_global_variable = { name = currency_trl_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_yuf global_var:currency_yuf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_yuf_v add = currency_value_growth } clamp_global_variable = { name = currency_yuf_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_pln global_var:currency_pln_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pln_v add = currency_value_growth } clamp_global_variable = { name = currency_pln_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_cad global_var:currency_cad_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_cad_v add = currency_value_growth } clamp_global_variable = { name = currency_cad_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_aud global_var:currency_aud_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_aud_v add = currency_value_growth } clamp_global_variable = { name = currency_aud_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_nzd global_var:currency_nzd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nzd_v add = currency_value_growth } clamp_global_variable = { name = currency_nzd_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_aup global_var:currency_aup_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_aup_v add = currency_value_growth } clamp_global_variable = { name = currency_aup_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_nzp global_var:currency_nzp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nzp_v add = currency_value_growth } clamp_global_variable = { name = currency_nzp_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_itl global_var:currency_itl_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_itl_v add = currency_value_growth } clamp_global_variable = { name = currency_itl_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_jpy global_var:currency_jpy_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_jpy_v add = currency_value_growth } clamp_global_variable = { name = currency_jpy_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_chf global_var:currency_chf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_chf_v add = currency_value_growth } clamp_global_variable = { name = currency_chf_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_ars global_var:currency_ars_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_ars_v add = currency_value_growth } clamp_global_variable = { name = currency_ars_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_cny global_var:currency_cny_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_cny_v add = currency_value_growth } clamp_global_variable = { name = currency_cny_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_inr global_var:currency_inr_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_inr_v add = currency_value_growth } clamp_global_variable = { name = currency_inr_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_zar global_var:currency_zar_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_zar_v add = currency_value_growth } clamp_global_variable = { name = currency_zar_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_sek global_var:currency_sek_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_sek_v add = currency_value_growth } clamp_global_variable = { name = currency_sek_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_egp global_var:currency_egp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_egp_v add = currency_value_growth } clamp_global_variable = { name = currency_egp_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_grd global_var:currency_grd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_grd_v add = currency_value_growth } clamp_global_variable = { name = currency_grd_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_iep global_var:currency_iep_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_iep_v add = currency_value_growth } clamp_global_variable = { name = currency_iep_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_esp global_var:currency_esp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_esp_v add = currency_value_growth } clamp_global_variable = { name = currency_esp_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_pte global_var:currency_pte_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pte_v add = currency_value_growth } clamp_global_variable = { name = currency_pte_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_nok global_var:currency_nok_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nok_v add = currency_value_growth } clamp_global_variable = { name = currency_nok_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_fim global_var:currency_fim_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_fim_v add = currency_value_growth } clamp_global_variable = { name = currency_fim_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_dkk global_var:currency_dkk_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_dkk_v add = currency_value_growth } clamp_global_variable = { name = currency_dkk_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_krw global_var:currency_krw_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_krw_v add = currency_value_growth } clamp_global_variable = { name = currency_krw_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_thb global_var:currency_thb_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_thb_v add = currency_value_growth } clamp_global_variable = { name = currency_thb_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_veb global_var:currency_veb_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_veb_v add = currency_value_growth } clamp_global_variable = { name = currency_veb_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_php_v add = currency_value_growth } clamp_global_variable = { name = currency_php_v max = 90000000000 min = min_currency_value } } ################################### on_action_currency_denomination_change_chance = yes if = { @@ -161,43 +161,43 @@ on_action_change_domestic_currency_value = { effect_redenominate = { - if = { limit = { var:cwp_currency = flag:currency_usd global_var:currency_usd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_usd_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_frf global_var:currency_frf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_frf_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_gbp global_var:currency_gbp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_gbp_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_sur global_var:currency_sur_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_sur_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_brz global_var:currency_brz_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_brz_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_dem global_var:currency_dem_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_dem_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_pen global_var:currency_pen_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_pen_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_mxn global_var:currency_mxn_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_mxn_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_irr global_var:currency_irr_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_irr_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_trl global_var:currency_trl_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_trl_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_yuf global_var:currency_yuf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_yuf_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_pln global_var:currency_pln_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_pln_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_cad global_var:currency_cad_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_cad_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_aud global_var:currency_aud_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_aud_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_nzd global_var:currency_nzd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_nzd_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_aup global_var:currency_aup_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_aup_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_nzp global_var:currency_nzp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_nzp_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_itl global_var:currency_itl_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_itl_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_jpy global_var:currency_jpy_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_jpy_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_chf global_var:currency_chf_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_chf_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_ars global_var:currency_ars_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_ars_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_cny global_var:currency_cny_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_cny_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_inr global_var:currency_inr_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_inr_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_zar global_var:currency_zar_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_zar_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_sek global_var:currency_sek_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_sek_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_egp global_var:currency_egp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_egp_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_grd global_var:currency_grd_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_grd_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_iep global_var:currency_iep_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_iep_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_esp global_var:currency_esp_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_esp_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_pte global_var:currency_pte_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_pte_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_nok global_var:currency_nok_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_nok_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_fim global_var:currency_fim_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_fim_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_dkk global_var:currency_dkk_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_dkk_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_krw global_var:currency_krw_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_krw_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_thb global_var:currency_thb_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_thb_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_veb global_var:currency_veb_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_veb_d $mathAction$ = $mathValue$ }} - if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_target_in_global_variable_list = { name = central_bank_list target = THIS } } $denominationEffect$ = { name = currency_php_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_usd global_var:currency_usd_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_usd_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_frf global_var:currency_frf_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_frf_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_gbp global_var:currency_gbp_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_gbp_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_sur global_var:currency_sur_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_sur_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_brz global_var:currency_brz_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_brz_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_dem global_var:currency_dem_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_dem_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_pen global_var:currency_pen_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_pen_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_mxn global_var:currency_mxn_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_mxn_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_irr global_var:currency_irr_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_irr_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_trl global_var:currency_trl_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_trl_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_yuf global_var:currency_yuf_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_yuf_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_pln global_var:currency_pln_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_pln_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_cad global_var:currency_cad_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_cad_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_aud global_var:currency_aud_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_aud_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_nzd global_var:currency_nzd_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_nzd_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_aup global_var:currency_aup_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_aup_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_nzp global_var:currency_nzp_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_nzp_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_itl global_var:currency_itl_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_itl_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_jpy global_var:currency_jpy_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_jpy_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_chf global_var:currency_chf_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_chf_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_ars global_var:currency_ars_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_ars_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_cny global_var:currency_cny_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_cny_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_inr global_var:currency_inr_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_inr_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_zar global_var:currency_zar_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_zar_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_sek global_var:currency_sek_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_sek_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_egp global_var:currency_egp_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_egp_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_grd global_var:currency_grd_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_grd_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_iep global_var:currency_iep_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_iep_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_esp global_var:currency_esp_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_esp_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_pte global_var:currency_pte_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_pte_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_nok global_var:currency_nok_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_nok_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_fim global_var:currency_fim_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_fim_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_dkk global_var:currency_dkk_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_dkk_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_krw global_var:currency_krw_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_krw_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_thb global_var:currency_thb_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_thb_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_veb global_var:currency_veb_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_veb_d $mathAction$ = $mathValue$ }} + if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_php_d $mathAction$ = $mathValue$ }} } # Effects @@ -210,4 +210,33 @@ set_currency = { name = currency_$currency$_d value = $denominationValue$ } + if = { + limit = { + not = { + $centralBank$ = 0 + } + } + add_to_global_variable_list = { + name = central_bank_list + target = $centralBank$ + } + } +} + +replace_currency_leader = { + every_in_global_list = { + variable = central_bank_list + limit = { + root.var:cwp_currency = var:cwp_currency + is_leading_central_bank = yes + } + remove_list_global_variable = { + name = central_bank_list + target = THIS + } + } + add_to_global_variable_list = { + name = central_bank_list + target = THIS + } } \ No newline at end of file diff --git a/common/scripted_guis/fiscal_sgui.txt b/common/scripted_guis/fiscal_sgui.txt index 52aff508b..70fcbe799 100644 --- a/common/scripted_guis/fiscal_sgui.txt +++ b/common/scripted_guis/fiscal_sgui.txt @@ -89,15 +89,18 @@ sell_foreign_reserves = { name = foreign_reserves subtract = { value = 500000 - multiply = { - value = country_currency_val - subtract = foreign_avg - divide = foreign_avg - multiply = 100 + divide = { + value = foreign_avg + divide = country_currency_val + min = min_currency_value } - min = 0.1 } } + clamp_variable = { + name = foreign_reserves + min = 0 + max = foreign_reserves_max + } } # Increases Local Currency Value if = { @@ -446,11 +449,10 @@ can_sell_currency = { gold_reserve_value >= gold_reserve_limit foreign_reserves_value <= { value = 500000 - multiply = { - value = country_currency_val - subtract = foreign_avg - divide = foreign_avg - multiply = 100 + divide = { + value = foreign_avg + divide = country_currency_val + min = min_currency_value } } } diff --git a/common/scripted_triggers/cwp_fiscal_triggers.txt b/common/scripted_triggers/cwp_fiscal_triggers.txt new file mode 100644 index 000000000..155b2c0fe --- /dev/null +++ b/common/scripted_triggers/cwp_fiscal_triggers.txt @@ -0,0 +1,30 @@ +is_leading_central_bank = { + is_target_in_global_variable_list = { + name = central_bank_list + target = THIS + } +} + +currency_leader_exists = { + any_country = { + is_leading_central_bank = yes + var:cwp_currency = flag:currency_$currency$ + } +} + +can_adopt_currency = { + or = { + and = { + not = { + var:cwp_currency = flag:currency_dem + } + or = { + c:GER ?= THIS + c:RHI ?= THIS + c:SAA ?= THIS + c:AOA ?= THIS + c:SGF ?= THIS + } + } + } +} diff --git a/gui/banks_panel.gui b/gui/banks_panel.gui index 3c38cbfea..1422987d0 100644 --- a/gui/banks_panel.gui +++ b/gui/banks_panel.gui @@ -115,14 +115,15 @@ types banks_panel spacing = 25 textbox = { align = center - raw_text = "Inflation" + raw_text = "Value" } textbox = { align = center - raw_text = "#v [Country.MakeScope.ScriptValue('inflation_value')|d%]#!" + raw_text = "#v [Country.MakeScope.ScriptValue('currency_average_difference_to_global_AI')|d%]#!" } } + tooltip = "CURRENCY_TOOLTIP" } } diff --git a/localization/english/CWP/CWP_concepts_l_english.yml b/localization/english/CWP/CWP_concepts_l_english.yml index 35a40da9c..605b58a29 100644 --- a/localization/english/CWP/CWP_concepts_l_english.yml +++ b/localization/english/CWP/CWP_concepts_l_english.yml @@ -15,6 +15,9 @@ CWP_NORMAL: "[Country.MakeScope.ScriptValue('cwp_gdp_with_inflation')|vd]" CWP_TRILLION: "#v [Country.MakeScope.ScriptValue('cwp_gdp_div')|v]T#!" + CWP_GDP_PLAYERSCOPE: "[SelectLocalization(LessThan_CFixedPoint(GetPlayer.MakeScope.ScriptValue('cwp_gdp_with_inflation'), '(CFixedPoint)1000000000000'), 'CWP_NORMAL_PLAYERSCOPE', 'CWP_TRILLION_PLAYERSCOPE')|Dv]" + CWP_NORMAL_PLAYERSCOPE: "[GetPlayer.MakeScope.ScriptValue('cwp_gdp_with_inflation')|vd]" + CWP_TRILLION_PLAYERSCOPE: "#v [GetPlayer.MakeScope.ScriptValue('cwp_gdp_div')|v]T#!" ## SUBJECTS concept_military_occupation: "Military Occupation" concept_military_occupation_desc: "Military Occupations are areas where the military of a greater country have taken control, typically by force and part of a treatied agreement, and asserted their authority and sovereignty." diff --git a/localization/english/CWP/CWP_currency_l_english.yml b/localization/english/CWP/CWP_currency_l_english.yml index 22d146e7c..0af051937 100644 --- a/localization/english/CWP/CWP_currency_l_english.yml +++ b/localization/english/CWP/CWP_currency_l_english.yml @@ -113,3 +113,12 @@ CREDIT_EXTREMELY_SPECULATIVE: "#n Extremely Speculative Grade#!" CREDIT_DEFAULT_IMMINENT: "#n Default Imminent#!" CREDIT_IN_DEFAULT: "#n In Default#!" +adopt_new_currency: "Adopt a new [concept_currency]" +adopt_new_currency_desc: "Our current currency [concept_currency] severely limits our monetary ability, time has come for us to adopt a new one." + +WILL_ADOPT_NEW_CURRENCY: "Will adopt a new [concept_currency]" +WILL_BECOME_LEADING_BANK_FOR_CURRENCY: "Will become leading [concept_central_bank] for new [concept_currency]" + +take_over_currency_central_bank: "Take over leadership of [GetPlayer.GetCustom('currency_text_loc')]" +take_over_currency_central_bank_desc: "Our GDP has surpassed the [GetPlayer.GetCustom('currency_text_loc')]'s leading [concept_central_bank]'s GDP. It's only fair that we become take over and manage it ourselves." +GDP_LARGER_THAN_LEADING_BANK: "[GetPlayer.GetName]'s GDP (#s Currently: $CWP_GDP_PLAYERSCOPE$$GLOBAL_CURRENCY_ICON$#!) is larger than the [GetPlayer.GetCustom('currency_text_loc')]'s leading [concept_central_bank]'s GDP (#s Currently: [GetPlayer.MakeScope.ScriptValue('leading_central_bank_gdp')|vd]#!)" From 08b4b822a20e0e4ce9bb149acd985f5d84a2edf9 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 06:02:31 +0300 Subject: [PATCH 07/45] changed starting currency values --- common/history/global/00_global.txt | 71 ++++++++++++++--------------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/common/history/global/00_global.txt b/common/history/global/00_global.txt index 727292a4b..99b5dc171 100644 --- a/common/history/global/00_global.txt +++ b/common/history/global/00_global.txt @@ -15,43 +15,40 @@ GLOBAL = { value = c:USA } set_global_variable = bretton_woods_agreement - set_currency = { currency = usd value = 10 centralBank = c:USA denominationValue = 1 } - set_currency = { currency = frf value = 9.3 centralBank = c:FRA denominationValue = 1000 } - set_currency = { currency = gbp value = 40.3 centralBank = c:GBR denominationValue = 1 } - set_currency = { currency = sur value = 2.7 centralBank = c:RUS denominationValue = 10 } - set_currency = { currency = brz value = 2.7 centralBank = c:BRZ denominationValue = 10 } - set_currency = { currency = dem value = 2.7 centralBank = 0 denominationValue = 10 } - set_currency = { currency = pen value = 0.6 centralBank = c:PEU denominationValue = 10 } - set_currency = { currency = mxn value = 0.8 centralBank = c:MEX denominationValue = 10 } - set_currency = { currency = irr value = 0.3 centralBank = c:PER denominationValue = 1000 } - set_currency = { currency = trl value = 1.1 centralBank = c:TUR denominationValue = 100 } - set_currency = { currency = yuf value = 0.8 centralBank = c:YUG denominationValue = 10 } - set_currency = { currency = pln value = 3.4 centralBank = c:POL denominationValue = 1 } - set_currency = { currency = cad value = 10.1 centralBank = c:CAN denominationValue = 1 } - set_currency = { currency = aud value = 9 centralBank = 0 denominationValue = 1 } - set_currency = { currency = nzd value = 9 centralBank = 0 denominationValue = 1 } - set_currency = { currency = aup value = 3.3 centralBank = c:AST denominationValue = 1 } - set_currency = { currency = nzp value = 3.1 centralBank = c:NZL denominationValue = 1 } - set_currency = { currency = itl value = 0.67 centralBank = c:ITA denominationValue = 100 } - set_currency = { currency = jpy value = 2.8 centralBank = c:JAP denominationValue = 100 } - set_currency = { currency = chf value = 2.3 centralBank = c:SWI denominationValue = 1 } - set_currency = { currency = ars value = 2.7 centralBank = c:ARG denominationValue = 1 } - set_currency = { currency = cny value = 2 centralBank = c:ROC denominationValue = 1 } - set_currency = { currency = inr value = 3 centralBank = c:HND denominationValue = 1 } - set_currency = { currency = zar value = 1.7 centralBank = c:SAF denominationValue = 1 } - set_currency = { currency = sek value = 1.6 centralBank = c:SWE denominationValue = 1 } - set_currency = { currency = egp value = 23.2 centralBank = c:EGY denominationValue = 1 } - set_currency = { currency = grd value = 0.3 centralBank = c:GRE denominationValue = 10 } - set_currency = { currency = iep value = 18.8 centralBank = c:IRE denominationValue = 1 } - set_currency = { currency = esp value = 7.8 centralBank = c:SPA denominationValue = 100 } - set_currency = { currency = pte value = 1.4 centralBank = c:POR denominationValue = 100 } - set_currency = { currency = nok value = 1.5 centralBank = c:NOR denominationValue = 1 } - set_currency = { currency = fim value = 2.3 centralBank = c:FIN denominationValue = 1 } - set_currency = { currency = dkk value = 1.6 centralBank = c:DEN denominationValue = 1 } - set_currency = { currency = krw value = 0.9 centralBank = c:STK denominationValue = 100 } - set_currency = { currency = thb value = 2 centralBank = c:THA denominationValue = 1 } - set_currency = { currency = veb value = 30.35 centralBank = c:VNZ denominationValue = 1 } - set_currency = { currency = php value = 5 centralBank = c:PHI denominationValue = 100 } + set_currency = { currency = usd value = 1 centralBank = c:USA denominationValue = 1 } + set_currency = { currency = frf value = 0.93 centralBank = c:FRA denominationValue = 100 } + set_currency = { currency = gbp value = 4.03 centralBank = c:GBR denominationValue = 1 } + set_currency = { currency = sur value = 0.27 centralBank = c:RUS denominationValue = 1 } + set_currency = { currency = brz value = 0.27 centralBank = c:BRZ denominationValue = 1 } + set_currency = { currency = pen value = 0.06 centralBank = c:PEU denominationValue = 1 } + set_currency = { currency = mxn value = 0.08 centralBank = c:MEX denominationValue = 1 } + set_currency = { currency = irr value = 0.3 centralBank = c:PER denominationValue = 10000 } + set_currency = { currency = trl value = 0.11 centralBank = c:TUR denominationValue = 100 } + set_currency = { currency = yuf value = 0.8 centralBank = c:YUG denominationValue = 100 } + set_currency = { currency = pln value = 0.34 centralBank = c:POL denominationValue = 1 } + set_currency = { currency = cad value = 1.10 centralBank = c:CAN denominationValue = 1 } + set_currency = { currency = aup value = 0.33 centralBank = c:AST denominationValue = 1 } + set_currency = { currency = nzp value = 0.31 centralBank = c:NZL denominationValue = 1 } + set_currency = { currency = itl value = 0.67 centralBank = c:ITA denominationValue = 1000 } + set_currency = { currency = jpy value = 0.28 centralBank = c:JAP denominationValue = 100 } + set_currency = { currency = chf value = 0.23 centralBank = c:SWI denominationValue = 1 } + set_currency = { currency = ars value = 0.27 centralBank = c:ARG denominationValue = 1 } + set_currency = { currency = cny value = 0.20 centralBank = c:ROC denominationValue = 1 } + set_currency = { currency = inr value = 0.30 centralBank = c:HND denominationValue = 1 } + set_currency = { currency = zar value = 0.17 centralBank = c:SAF denominationValue = 1 } + set_currency = { currency = sek value = 0.16 centralBank = c:SWE denominationValue = 1 } + set_currency = { currency = egp value = 2.32 centralBank = c:EGY denominationValue = 1 } + set_currency = { currency = grd value = 0.3 centralBank = c:GRE denominationValue = 100 } + set_currency = { currency = iep value = 1.88 centralBank = c:IRE denominationValue = 1 } + set_currency = { currency = esp value = 0.78 centralBank = c:SPA denominationValue = 100 } + set_currency = { currency = pte value = 0.14 centralBank = c:POR denominationValue = 100 } + set_currency = { currency = nok value = 0.15 centralBank = c:NOR denominationValue = 1 } + set_currency = { currency = fim value = 0.23 centralBank = c:FIN denominationValue = 1 } + set_currency = { currency = dkk value = 0.16 centralBank = c:DEN denominationValue = 1 } + set_currency = { currency = krw value = 0.9 centralBank = c:STK denominationValue = 1000 } + set_currency = { currency = thb value = 0.2 centralBank = c:THA denominationValue = 10 } + set_currency = { currency = veb value = 3.35 centralBank = c:VNZ denominationValue = 1 } + set_currency = { currency = php value = 0.5 centralBank = c:PHI denominationValue = 10 } # Fiscal every_country = { limit = { not = { has_variable = foreign_reserves } } set_variable = { name = foreign_reserves value = 0 } } every_country = { limit = { not = { has_variable = inflation_rate } } set_variable = { name = inflation_rate value = 0 } } From 1dd1318fd122d9db8135e5f442ba51afa52a12cf Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 06:03:53 +0300 Subject: [PATCH 08/45] superpowers and great powers very unlikely to take imf loans --- common/script_values/currency_values.txt | 1 + common/script_values/imf_ai_values.txt | 8 +++++++- .../cwp_onaction_currency_effects.txt | 13 +++---------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/common/script_values/currency_values.txt b/common/script_values/currency_values.txt index 8403b1e84..4b65febd3 100644 --- a/common/script_values/currency_values.txt +++ b/common/script_values/currency_values.txt @@ -188,6 +188,7 @@ foreign_avg_count = { add = 1 } } + leading_central_bank_gdp = { every_in_global_list = { variable = central_bank_list diff --git a/common/script_values/imf_ai_values.txt b/common/script_values/imf_ai_values.txt index 9198838be..d7482c4ef 100644 --- a/common/script_values/imf_ai_values.txt +++ b/common/script_values/imf_ai_values.txt @@ -145,7 +145,13 @@ imf_ai_wants_loan = { limit = { country_rank = rank_value:superpower } - subtract = -5 + subtract = 5 + } + if = { + limit = { + country_rank = rank_value:great_power + } + subtract = 0.3 } multiply = 100 } diff --git a/common/scripted_effects/cwp_onaction_currency_effects.txt b/common/scripted_effects/cwp_onaction_currency_effects.txt index 589c4bfb3..0330df4f6 100644 --- a/common/scripted_effects/cwp_onaction_currency_effects.txt +++ b/common/scripted_effects/cwp_onaction_currency_effects.txt @@ -210,16 +210,9 @@ set_currency = { name = currency_$currency$_d value = $denominationValue$ } - if = { - limit = { - not = { - $centralBank$ = 0 - } - } - add_to_global_variable_list = { - name = central_bank_list - target = $centralBank$ - } + add_to_global_variable_list = { + name = central_bank_list + target = $centralBank$ } } From 7781f6a1d80ba247920eead71000686f101fef3a Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 06:34:40 +0300 Subject: [PATCH 09/45] bretton woods even less likely to be ended by US --- common/decisions/bretton_woods.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/decisions/bretton_woods.txt b/common/decisions/bretton_woods.txt index 2c60ab0fe..1a4184a17 100644 --- a/common/decisions/bretton_woods.txt +++ b/common/decisions/bretton_woods.txt @@ -113,7 +113,7 @@ end_bretton_woods_agreement = { } } ai_chance = { - base = -30 + base = -50 modifier = { trigger = { year >= 1970 From bbe65a103211e2972462618b0f4179209a28f82c Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 06:35:04 +0300 Subject: [PATCH 10/45] money supply can no longer go above/below -100/100% --- common/script_values/fiscal_values.txt | 5 +++++ common/scripted_effects/cwp_onaction_fiscal_effects.txt | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/script_values/fiscal_values.txt b/common/script_values/fiscal_values.txt index 7b889ee47..a37dcd6fe 100644 --- a/common/script_values/fiscal_values.txt +++ b/common/script_values/fiscal_values.txt @@ -491,6 +491,11 @@ money_supply_max = { add = credit } +money_supply_min = { + value = money_supply_max + multiply = -1 +} + money_supply_5 = { value = money_supply_max multiply = 0.05 diff --git a/common/scripted_effects/cwp_onaction_fiscal_effects.txt b/common/scripted_effects/cwp_onaction_fiscal_effects.txt index de4a0b2fb..78d534e43 100644 --- a/common/scripted_effects/cwp_onaction_fiscal_effects.txt +++ b/common/scripted_effects/cwp_onaction_fiscal_effects.txt @@ -43,7 +43,11 @@ fiscal_money_supply_calculation = { value = var:pegged_currency.inflation_value } } - + clamp_variable = { + name = money_supply + max = money_supply_max + min = money_supply_min + } } fiscal_inflation_deflation_calculation = { From df31a136976b53c64e37f0f805af3d7bc26a45aa Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 06:35:16 +0300 Subject: [PATCH 11/45] changed localization --- localization/english/CWP/CWP_fiscal_l_english.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localization/english/CWP/CWP_fiscal_l_english.yml b/localization/english/CWP/CWP_fiscal_l_english.yml index e649d3e0f..491353d47 100644 --- a/localization/english/CWP/CWP_fiscal_l_english.yml +++ b/localization/english/CWP/CWP_fiscal_l_english.yml @@ -82,7 +82,7 @@ BNK_IN_DEFAULT: "In Default" BNK_ALTERED_CURRENCY: "Recently Altering Currency" # Currency CUR_TOOLTIP_FORMAT: "$VALUE|+d%$ from $KEY$" -CUR_MONEY_SUPPLY: "Money Supply Change" +CUR_MONEY_SUPPLY: "Money Supply Percentage" CUR_INTEREST_RATE: "Interest Rates" CUR_PEGGED_CURRENCY: "Currency Peg to [GetPlayer.MakeScope.Var('pegged_currency').GetCountry.GetCustom('currency_text_loc')][GetPlayer.MakeScope.Var('pegged_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" CURRENCY_VALUE_TOOLTIP: "#v 1.00[GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]#! is\n#v [SelectLocalization(LessThan_CFixedPoint(Country.MakeScope.ScriptValue('currency_difference_to_exchange_currency_denomination'), '(CFixedPoint)0.01'), 'CURRENCY_VALUE_LESSTHANONE', 'CURRENCY_VALUE_MORETHANONE')][Country.MakeScope.Var('cwp_currency').GetFlagName]#" From 20eaaa667fc31d97d106abd8e6c95cc224111d06 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 06:35:29 +0300 Subject: [PATCH 12/45] added value % to banks panel --- gui/banks_panel.gui | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/gui/banks_panel.gui b/gui/banks_panel.gui index 1422987d0..1a4c92149 100644 --- a/gui/banks_panel.gui +++ b/gui/banks_panel.gui @@ -3,7 +3,7 @@ types banks_panel type banks_panel = international_org_window { visible = "[And(InformationPanelBar.IsPanelOpen('budget'), GetVariableSystem.Exists('banks_panel'))]" name = "banks_panel" - size = { 500 0 } + size = { 700 0 } background = { using = dropdown_background } @@ -31,7 +31,7 @@ types banks_panel blockoverride "scrollarea_content" { scrollbox = { - minimumsize = { 450 750 } + minimumsize = { 650 750 } layoutpolicy_horizontal = expanding layoutpolicy_vertical = expanding blockoverride "scrollbox_content" { @@ -52,14 +52,13 @@ types banks_panel using = dropdown_background } flowcontainer = { - minimumsize = { 280 0 } + minimumsize = { 500 0 } margin_bottom = 5 - spacing = 20 direction = horizontal flowcontainer = { - margin_top = 5 + margin = { 10 10 } small_flag = { - scale = 1.2 + scale = 1.3 parentanchor = vcenter using = tooltip_above datacontext = "[Scope.AccessCountry]" @@ -79,9 +78,8 @@ types banks_panel } hbox = { + maximumsize = { 500 -1 } layoutpolicy_horizontal = expanding - margin_right = 100 - margin_left = -30 margin_top = 20 flowcontainer = { direction = vertical @@ -102,7 +100,7 @@ types banks_panel textbox = { parentanchor = hcenter align = center - raw_text = "Currency Value" + raw_text = "Exchange Rate" } textbox = { margin_top = 20 @@ -123,9 +121,21 @@ types banks_panel } } - tooltip = "CURRENCY_TOOLTIP" - + flowcontainer = { + direction = vertical + spacing = 25 + textbox = { + align = center + raw_text = "Inflation" + } + textbox = { + align = center + raw_text = "#v [Country.MakeScope.ScriptValue('inflation_value')|d%]#!" + } + + } } + tooltip = "CURRENCY_TOOLTIP" } flowcontainer = { margin_top = 40 From 2035c982a67f5eff312986d6b41fba59197abf86 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 07:12:43 +0300 Subject: [PATCH 13/45] central bank list now ordered by currency value --- common/alert_types/cwp_alerts.txt | 5 +++++ common/history/global/00_global.txt | 1 + .../cwp_onaction_currency_effects.txt | 16 ++++++++++++++++ common/scripted_triggers/cwp_imf_triggers.txt | 6 ++++++ gui/banks_panel.gui | 2 +- 5 files changed, 29 insertions(+), 1 deletion(-) diff --git a/common/alert_types/cwp_alerts.txt b/common/alert_types/cwp_alerts.txt index 90b458f5b..8b1d4941b 100644 --- a/common/alert_types/cwp_alerts.txt +++ b/common/alert_types/cwp_alerts.txt @@ -145,6 +145,7 @@ not_paying_imf_debt = { texture = "gfx/interface/icons/cwp_icons/imf_seal.dds" valid = { + is_imf_member = yes trigger_if = { limit = { not = { @@ -171,6 +172,7 @@ can_apply_for_imf_loan = { texture = "gfx/interface/icons/cwp_icons/imf_seal.dds" valid = { + is_imf_member = yes nor = { has_variable = imf_debt_years has_variable = applied_to_imf_loan @@ -190,6 +192,7 @@ not_withdrawing_imf_credit = { texture = "gfx/interface/icons/cwp_icons/imf_seal.dds" valid = { + is_imf_member = yes trigger_if = { limit = { has_variable = imf_credit @@ -208,6 +211,7 @@ imf_austerity_measures = { texture = "gfx/interface/icons/cwp_icons/imf_seal.dds" valid = { + is_imf_member = yes has_journal_entry = je_imf_austerity_measures } alert_group = alert_group_imf @@ -219,6 +223,7 @@ imf_bailout = { texture = "gfx/interface/icons/cwp_icons/imf_seal.dds" valid = { + is_imf_member = yes has_journal_entry = je_imf_bailout_loan } alert_group = alert_group_imf diff --git a/common/history/global/00_global.txt b/common/history/global/00_global.txt index 99b5dc171..4eb47c212 100644 --- a/common/history/global/00_global.txt +++ b/common/history/global/00_global.txt @@ -9,6 +9,7 @@ GLOBAL = { variable = imf_members set_imf_vars = yes } + onaction_order_by_value_currency = yes # Currency set_global_variable = { name = global_currency diff --git a/common/scripted_effects/cwp_onaction_currency_effects.txt b/common/scripted_effects/cwp_onaction_currency_effects.txt index 0330df4f6..c23971a5c 100644 --- a/common/scripted_effects/cwp_onaction_currency_effects.txt +++ b/common/scripted_effects/cwp_onaction_currency_effects.txt @@ -39,6 +39,7 @@ if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_php_v add = currency_value_growth } clamp_global_variable = { name = currency_php_v max = 90000000000 min = min_currency_value } } ################################### on_action_currency_denomination_change_chance = yes + onaction_order_by_value_currency = yes if = { limit = { country_currency_val >= global_average_above_currency_ratio @@ -200,6 +201,21 @@ effect_redenominate = { if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_leading_central_bank = yes } $denominationEffect$ = { name = currency_php_d $mathAction$ = $mathValue$ }} } +onaction_order_by_value_currency = { + clear_global_variable_list = central_bank_ordered_list + ordered_in_global_list = { + variable = central_bank_list + order_by = country_currency_val + max = 1000 + check_range_bounds = no + add_to_global_variable_list = { + name = central_bank_ordered_list + target = THIS + } + } +} + + # Effects set_currency = { set_global_variable = { diff --git a/common/scripted_triggers/cwp_imf_triggers.txt b/common/scripted_triggers/cwp_imf_triggers.txt index 2a2c6eb00..9514fb512 100644 --- a/common/scripted_triggers/cwp_imf_triggers.txt +++ b/common/scripted_triggers/cwp_imf_triggers.txt @@ -64,3 +64,9 @@ has_law = law_type:law_resource_extraction_nationalization } } +is_imf_member = { + is_target_in_global_variable_list = { + name = imf_members + target = THIS + } +} \ No newline at end of file diff --git a/gui/banks_panel.gui b/gui/banks_panel.gui index 1a4c92149..b2bd569c1 100644 --- a/gui/banks_panel.gui +++ b/gui/banks_panel.gui @@ -38,7 +38,7 @@ types banks_panel vbox = { datamodel_wrap = 1 spacing = 20 - datamodel = "[GetGlobalList('central_bank_list')]" + datamodel = "[GetGlobalList('central_bank_ordered_list')]" item = { flowcontainer = { visible = "[Country.Exists]" From c7eb752101fdfd405297c164625ed690796df29a Mon Sep 17 00:00:00 2001 From: Max200012 Date: Mon, 31 Jul 2023 00:14:51 +0200 Subject: [PATCH 14/45] more clear loc --- common/journal_entries/CWP_MONETARY.txt | 51 ++++++++++++++----- .../english/CWP/CWP_concepts_l_english.yml | 4 +- .../english/CWP/CWP_fiscal_l_english.yml | 15 ++++-- 3 files changed, 50 insertions(+), 20 deletions(-) diff --git a/common/journal_entries/CWP_MONETARY.txt b/common/journal_entries/CWP_MONETARY.txt index e5a570805..336190c81 100644 --- a/common/journal_entries/CWP_MONETARY.txt +++ b/common/journal_entries/CWP_MONETARY.txt @@ -5,12 +5,18 @@ this = { has_law = law_type:law_pegged_currency not = { - has_variable = peg_target_set + custom_tooltip = { + text = no_pegging_tt #:flushed: + has_variable = peg_target_set + } } } } invalid = { - has_variable = peg_target_set + custom_tooltip = { + text = no_pegging_tt #:flushed: + has_variable = peg_target_set + } } immediate = { set_variable = { @@ -40,7 +46,7 @@ is_goal_complete = yes } custom_tooltip = { - text = FOREIGNRESERVESBIGOREQUALTOPEG + text = foreignreservesbigorequaltopeg foreign_reserves_value >= foreign_reserves_needed_for_peg } @@ -50,7 +56,7 @@ is_goal_complete = yes } custom_tooltip = { - text = FAIL_FOREIGNRESERVESBIGOREQUALTOPEG + text = fail_foreignreservesbigorequaltopeg foreign_reserves_value <= foreign_reserves_needed_for_peg } } @@ -63,7 +69,7 @@ } on_fail = { custom_tooltip = { - text = WILL_LOSE_PEGGED_CURRENCY + text = will_lose_pegged_currency remove_variable = pegged_currency_je_val remove_variable = pegged_currency remove_variable = peg_target_set @@ -80,8 +86,14 @@ je_maintain_pegged_currency = { possible = { this = { has_law = law_type:law_pegged_currency - has_variable = pegged_currency - has_variable = peg_target_set + custom_tooltip = { + text = pegged_currency_tt + has_variable = pegged_currency + } + custom_tooltip = { + text = pegging_tt #:flushed: + has_variable = peg_target_set + } not = { has_journal_entry = je_bretton_woods_agreement } @@ -132,7 +144,7 @@ je_maintain_pegged_currency = { is_goal_complete = yes } custom_tooltip = { - text = FAIL_FOREIGNRESERVESBIGOREQUALTOPEG + text = fail_foreignreservesbigorequaltopeg foreign_reserves_value <= foreign_reserves_needed_for_peg } } @@ -141,7 +153,7 @@ je_maintain_pegged_currency = { } on_fail = { custom_tooltip = { - text = WILL_LOSE_PEGGED_CURRENCY + text = will_lose_pegged_currency remove_variable = maintain_pegged_currency_je_val remove_variable = pegged_currency remove_variable = peg_target_set @@ -158,15 +170,26 @@ je_bretton_woods_agreement = { possible = { this = { has_law = law_type:law_pegged_currency - has_variable = pegged_currency - has_variable = peg_target_set - + custom_tooltip = { + text = pegged_currency_tt + has_variable = pegged_currency + } + custom_tooltip = { + text = pegging_tt #:flushed: + has_variable = peg_target_set + } } } invalid = { nor = { - has_variable = pegged_currency - has_variable = peg_target_set + custom_tooltip = { + text = no_pegged_currency_tt + has_variable = pegged_currency + } + custom_tooltip = { + text = no_pegging_tt #:flushed: + has_variable = peg_target_set + } } } immediate = { diff --git a/localization/english/CWP/CWP_concepts_l_english.yml b/localization/english/CWP/CWP_concepts_l_english.yml index 605b58a29..f430fcbbd 100644 --- a/localization/english/CWP/CWP_concepts_l_english.yml +++ b/localization/english/CWP/CWP_concepts_l_english.yml @@ -24,7 +24,7 @@ ## ORGANIZATIONS concept_united_nations: "United Nations" - concept_united_nations_desc: "The United Nations (UN) is an [concept_international_organization] whose stated purposes are to maintain international peace and security, develop friendly relations among nations, achieve international cooperation, and be a centre for harmonizing the actions of nations." + concept_united_nations_desc: "The United Nations (UN) is one of many [concept_international_organization]; its' stated purposes are to maintain international peace and security, develop friendly relations among nations, achieve international cooperation, and be a centre for harmonizing the actions of nations." concept_international_organization: "International Organizations" concept_international_organization_desc: "An international organization is a grouping of states that have a mutually agreed upon set of norms and rules meant to govern and enforce various military and economic goals. Notable organizations include the [concept_united_nations], the [concept_world_health_organization] and [concept_nato]. International organizations are composed of primarily [Concept('concept_member_state', 'Member States')], but certain nations may hold an [concept_observer_status]." concept_observer_status: "Observer Status" @@ -147,7 +147,7 @@ CWP_TRILLION_IMF: "#v [GetPlayer.MakeScope.ScriptValue('global_gdp_imf_div')|v]T#!" concept_imf: "International Monetary Fund" - concept_imf_desc: "[concept_imf] (IMF) is an [concept_international_organization] established in 1944 with the goal of promoting global economic stability and growth. It provides financial assistance, policy advice, and technical expertise to its member countries to address economic challenges and imbalances. The IMF plays a crucial role in managing financial crises, promoting exchange rate stability, and supporting sustainable economic development worldwide." + concept_imf_desc: "[concept_imf] (IMF) is one of many [concept_international_organization]; established in 1944 with the goal of promoting global economic stability and growth. It provides financial assistance, policy advice, and technical expertise to its member countries to address economic challenges and imbalances. The IMF plays a crucial role in managing financial crises, promoting exchange rate stability, and supporting sustainable economic development worldwide." concept_external_debt: "External Debt" concept_external_debt_desc: "TODO" diff --git a/localization/english/CWP/CWP_fiscal_l_english.yml b/localization/english/CWP/CWP_fiscal_l_english.yml index 491353d47..70c6fc7fb 100644 --- a/localization/english/CWP/CWP_fiscal_l_english.yml +++ b/localization/english/CWP/CWP_fiscal_l_english.yml @@ -128,18 +128,19 @@ currency_not_pegged: "Pegged Currency | #n No Peg Target#!" no_pegged_currency: "#n Currency Pegging Target Not Set#!\nGo to Monetary Policy Screen to set target" yes_pegged_currency: "Currency Pegging Target: [GetPlayer.MakeScope.Var('pegged_currency').GetCountry.GetCustom('currency_text_loc')][GetPlayer.MakeScope.Var('pegged_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" -FOREIGNRESERVESBIGOREQUALTOPEG: "Has required Foreign Reserves needed to maintain peg" -FAIL_FOREIGNRESERVESBIGOREQUALTOPEG: "Does not have required Foreign Reserves needed to maintain peg" +foreignreservesbigorequaltopeg: "Has required Foreign Reserves needed to maintain peg" +fail_foreignreservesbigorequaltopeg: "Does not have required Foreign Reserves needed to maintain peg" je_maintain_pegged_currency: "[SelectLocalization(GetPlayer.MakeScope.Var('pegged_currency').IsSet, 'je_maintain_pegged_currency_b', 'je_maintain_pegged_currency_a')]" je_maintain_pegged_currency_a: "Maintain Peg to Target Currency" je_maintain_pegged_currency_b: "Maintain Peg to [GetPlayer.MakeScope.Var('pegged_currency').GetCountry.GetCustom('currency_text_loc')][GetPlayer.MakeScope.Var('pegged_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" je_maintain_pegged_currency_reason: "Current Foreign Reserves: [GetPlayer.MakeScope.ScriptValue('foreign_reserves_value')|+Od]\nForeign Reserves needed to maintain peg: [GetPlayer.MakeScope.ScriptValue('foreign_reserves_needed_for_peg')|+Od]\n$TOOLTIP_DELIMITER$\nA pegged currency offers a shield against the unpredictable nature of global markets. It provides businesses and investors with confidence, assuring them that the value of their investments and the price of their goods will remain stable.\n\nThis fosters an environment conducive to growth, attracting foreign investments and encouraging domestic businesses to thrive." +je_maintain_pegged_currency_goal: "[SCOPE.GetRootScope.GetCountry.GetNameNoFlag] can't maintain a [concept_pegged_currency]" pegged_currency_status_desc: "[SelectLocalization(GreaterThan_CFixedPoint(GetPlayer.MakeScope.ScriptValue('foreign_reserves_value'), GetPlayer.MakeScope.ScriptValue('foreign_reserves_needed_for_peg')), 'can_maintain_peg', 'cant_maintain_peg')]" -WILL_LOSE_PEGGED_CURRENCY: "#N Will Lose Current Currency Peg" +will_lose_pegged_currency: "#N Will Lose Current Currency Peg#!" cant_maintain_peg: "#N Not Enough Foreign Reserves to Maintain Peg#!" can_maintain_peg: "#p Enough Foreign Reserves to Maintain Peg#!" @@ -182,4 +183,10 @@ end_bretton_woods_agreement: "End the Bretton Woods Agreement" end_bretton_woods_agreement_desc: "The Bretton Woods Agreement severely limits our ability to manage our own monetary policies, perhaps it would be best to take back control." WILL_END_BRETTON_WOODS: "Will formally end the Bretton Woods Agreement" -BRETTON_WOODS_AGREEMENT_ENDED_BY_US: "#t Bretton Woods Agreement#! formally ended by the #t United States#!" \ No newline at end of file +BRETTON_WOODS_AGREEMENT_ENDED_BY_US: "#t Bretton Woods Agreement#! formally ended by the #t United States#!" + +no_pegged_currency_tt: "#t Doesn't#! have a #t [concept_pegged_currency]#!" +no_pegging_tt: "#t Doesn't#! have a #t;gold Pegging Target#!" + +pegged_currency_tt: "[SCOPE.GetRootScope.GetCountry.GetNameNoFlag] has a [concept_pegged_currency]" +pegging_tt: "[SCOPE.GetRootScope.GetCountry.GetNameNoFlag] has a #gold Pegging Target#!" \ No newline at end of file From 8e5b71bb612e5dbd5392bf1d50bbc31fac49c433 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:24:45 +0300 Subject: [PATCH 15/45] currencies will no longer exceed -99% the global value --- common/script_values/currency_values.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/script_values/currency_values.txt b/common/script_values/currency_values.txt index 4b65febd3..523998616 100644 --- a/common/script_values/currency_values.txt +++ b/common/script_values/currency_values.txt @@ -362,5 +362,10 @@ currency_difference_to_global_revalue = { } min_currency_value = { - value = 0.00001 + value = foreign_avg + subtract = { + value = foreign_avg + multiply = 0.99 + } + min = 0.00001 } \ No newline at end of file From fa86baef81bcec7ead070fa63b1dd29c3c0847ee Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:25:02 +0300 Subject: [PATCH 16/45] austria no longer automatically becomes DEM leader --- events/CWP_events/germany_events/german_unification.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/events/CWP_events/germany_events/german_unification.txt b/events/CWP_events/germany_events/german_unification.txt index b3f94af4d..fad0f8c27 100644 --- a/events/CWP_events/germany_events/german_unification.txt +++ b/events/CWP_events/germany_events/german_unification.txt @@ -1501,7 +1501,7 @@ west_german_unification.201 = { state = s:STATE_AUSTRIA.region_state:AOZ } c:AOA = { - effect_currency_dem = yes + effect_currency_usd = yes onaction_monetary_variables_creation = yes } if = { @@ -1577,7 +1577,7 @@ west_german_unification.202 = { state = s:STATE_AUSTRIA.region_state:AOZ } c:AOA = { - effect_currency_dem = yes + effect_currency_usd = yes onaction_monetary_variables_creation = yes } if = { From 8edc7a9dd9166dceb2db1c4a28a4d365620c6f59 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:28:34 +0300 Subject: [PATCH 17/45] fixed german currency error spam --- events/CWP_events/germany_events/german_unification.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/events/CWP_events/germany_events/german_unification.txt b/events/CWP_events/germany_events/german_unification.txt index fad0f8c27..ce9bb489c 100644 --- a/events/CWP_events/germany_events/german_unification.txt +++ b/events/CWP_events/germany_events/german_unification.txt @@ -175,7 +175,7 @@ west_german_unification.301 = { state = s:STATE_RHINELAND.region_state:FOZ } c:RHI = { - effect_currency_dem = yes + effect_currency_usd = yes onaction_monetary_variables_creation = yes } if = { @@ -1655,7 +1655,7 @@ west_german_unification.203 = { state = s:STATE_AUSTRIA.region_state:AOZ } c:SGF = { - effect_currency_dem = yes + effect_currency_usd = yes onaction_monetary_variables_creation = yes } if = { From 13210d85fa548aadb2fc2c6efd037ba93132e02b Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:36:34 +0300 Subject: [PATCH 18/45] independent monetary policy can alter currency now --- common/scripted_guis/fiscal_sgui.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/scripted_guis/fiscal_sgui.txt b/common/scripted_guis/fiscal_sgui.txt index 70fcbe799..11babfdaf 100644 --- a/common/scripted_guis/fiscal_sgui.txt +++ b/common/scripted_guis/fiscal_sgui.txt @@ -330,7 +330,7 @@ can_alter_currency = { has_variable = pegged_currency has_variable = altered_currency has_law = law_type:law_gold_standard - has_law = law_type:law_independent_monetary_policy + #has_law = law_type:law_independent_monetary_policy } is_target_in_global_variable_list = { name = central_bank_list From 74cbd82791f36ea28613f26c6d9d774ba60069fa Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:36:48 +0300 Subject: [PATCH 19/45] foreign reserves conversion cant be negative --- common/script_values/fiscal_values.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/common/script_values/fiscal_values.txt b/common/script_values/fiscal_values.txt index a37dcd6fe..a0a9a271c 100644 --- a/common/script_values/fiscal_values.txt +++ b/common/script_values/fiscal_values.txt @@ -391,6 +391,7 @@ foreign_reserves_needed_for_peg = { foreign_reserves_conversion = { value = foreign_reserves_value multiply = global_average_difference_to_currency + min = 0 } foreign_reserves_sell = { value = 500000 From cb45c0986ea83ae7593cceb890f7e16dd25faf23 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 16:08:05 +0300 Subject: [PATCH 20/45] currency wont go under -99% --- common/history/global/00_global.txt | 3 +- common/script_values/currency_values.txt | 11 ++- .../cwp_onaction_currency_effects.txt | 74 +++++++++---------- 3 files changed, 46 insertions(+), 42 deletions(-) diff --git a/common/history/global/00_global.txt b/common/history/global/00_global.txt index 4eb47c212..faf5d31c0 100644 --- a/common/history/global/00_global.txt +++ b/common/history/global/00_global.txt @@ -8,8 +8,9 @@ GLOBAL = { every_in_global_list = { variable = imf_members set_imf_vars = yes + onaction_order_by_value_currency = yes } - onaction_order_by_value_currency = yes + # Currency set_global_variable = { name = global_currency diff --git a/common/script_values/currency_values.txt b/common/script_values/currency_values.txt index 523998616..127ff320d 100644 --- a/common/script_values/currency_values.txt +++ b/common/script_values/currency_values.txt @@ -361,11 +361,14 @@ currency_difference_to_global_revalue = { } -min_currency_value = { - value = foreign_avg - subtract = { +foreign_avg_min99 = { + value = { value = foreign_avg - multiply = 0.99 + multiply = 0.34 } +} + +min_currency_value = { + min = 0.00001 } \ No newline at end of file diff --git a/common/scripted_effects/cwp_onaction_currency_effects.txt b/common/scripted_effects/cwp_onaction_currency_effects.txt index c23971a5c..5c1be52c0 100644 --- a/common/scripted_effects/cwp_onaction_currency_effects.txt +++ b/common/scripted_effects/cwp_onaction_currency_effects.txt @@ -1,42 +1,42 @@ onaction_currency_calculation = { # Currency Calculations - if = { limit = { var:cwp_currency = flag:currency_usd global_var:currency_usd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_usd_v add = currency_value_growth } clamp_global_variable = { name = currency_usd_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_frf global_var:currency_frf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_frf_v add = currency_value_growth } clamp_global_variable = { name = currency_frf_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_gbp global_var:currency_gbp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_gbp_v add = currency_value_growth } clamp_global_variable = { name = currency_gbp_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_sur global_var:currency_sur_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_sur_v add = currency_value_growth } clamp_global_variable = { name = currency_sur_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_brz global_var:currency_brz_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_brz_v add = currency_value_growth } clamp_global_variable = { name = currency_brz_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_dem global_var:currency_dem_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_dem_v add = currency_value_growth } clamp_global_variable = { name = currency_dem_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_pen global_var:currency_pen_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pen_v add = currency_value_growth } clamp_global_variable = { name = currency_pen_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_mxn global_var:currency_mxn_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_mxn_v add = currency_value_growth } clamp_global_variable = { name = currency_mxn_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_irr global_var:currency_irr_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_irr_v add = currency_value_growth } clamp_global_variable = { name = currency_irr_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_trl global_var:currency_trl_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_trl_v add = currency_value_growth } clamp_global_variable = { name = currency_trl_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_yuf global_var:currency_yuf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_yuf_v add = currency_value_growth } clamp_global_variable = { name = currency_yuf_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_pln global_var:currency_pln_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pln_v add = currency_value_growth } clamp_global_variable = { name = currency_pln_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_cad global_var:currency_cad_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_cad_v add = currency_value_growth } clamp_global_variable = { name = currency_cad_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_aud global_var:currency_aud_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_aud_v add = currency_value_growth } clamp_global_variable = { name = currency_aud_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_nzd global_var:currency_nzd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nzd_v add = currency_value_growth } clamp_global_variable = { name = currency_nzd_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_aup global_var:currency_aup_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_aup_v add = currency_value_growth } clamp_global_variable = { name = currency_aup_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_nzp global_var:currency_nzp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nzp_v add = currency_value_growth } clamp_global_variable = { name = currency_nzp_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_itl global_var:currency_itl_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_itl_v add = currency_value_growth } clamp_global_variable = { name = currency_itl_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_jpy global_var:currency_jpy_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_jpy_v add = currency_value_growth } clamp_global_variable = { name = currency_jpy_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_chf global_var:currency_chf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_chf_v add = currency_value_growth } clamp_global_variable = { name = currency_chf_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_ars global_var:currency_ars_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_ars_v add = currency_value_growth } clamp_global_variable = { name = currency_ars_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_cny global_var:currency_cny_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_cny_v add = currency_value_growth } clamp_global_variable = { name = currency_cny_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_inr global_var:currency_inr_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_inr_v add = currency_value_growth } clamp_global_variable = { name = currency_inr_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_zar global_var:currency_zar_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_zar_v add = currency_value_growth } clamp_global_variable = { name = currency_zar_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_sek global_var:currency_sek_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_sek_v add = currency_value_growth } clamp_global_variable = { name = currency_sek_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_egp global_var:currency_egp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_egp_v add = currency_value_growth } clamp_global_variable = { name = currency_egp_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_grd global_var:currency_grd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_grd_v add = currency_value_growth } clamp_global_variable = { name = currency_grd_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_iep global_var:currency_iep_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_iep_v add = currency_value_growth } clamp_global_variable = { name = currency_iep_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_esp global_var:currency_esp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_esp_v add = currency_value_growth } clamp_global_variable = { name = currency_esp_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_pte global_var:currency_pte_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pte_v add = currency_value_growth } clamp_global_variable = { name = currency_pte_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_nok global_var:currency_nok_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nok_v add = currency_value_growth } clamp_global_variable = { name = currency_nok_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_fim global_var:currency_fim_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_fim_v add = currency_value_growth } clamp_global_variable = { name = currency_fim_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_dkk global_var:currency_dkk_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_dkk_v add = currency_value_growth } clamp_global_variable = { name = currency_dkk_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_krw global_var:currency_krw_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_krw_v add = currency_value_growth } clamp_global_variable = { name = currency_krw_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_thb global_var:currency_thb_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_thb_v add = currency_value_growth } clamp_global_variable = { name = currency_thb_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_veb global_var:currency_veb_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_veb_v add = currency_value_growth } clamp_global_variable = { name = currency_veb_v max = 90000000000 min = min_currency_value } } - if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_php_v add = currency_value_growth } clamp_global_variable = { name = currency_php_v max = 90000000000 min = min_currency_value } } + if = { limit = { var:cwp_currency = flag:currency_usd global_var:currency_usd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_usd_v add = currency_value_growth } clamp_global_variable = { name = currency_usd_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_frf global_var:currency_frf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_frf_v add = currency_value_growth } clamp_global_variable = { name = currency_frf_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_gbp global_var:currency_gbp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_gbp_v add = currency_value_growth } clamp_global_variable = { name = currency_gbp_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_sur global_var:currency_sur_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_sur_v add = currency_value_growth } clamp_global_variable = { name = currency_sur_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_brz global_var:currency_brz_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_brz_v add = currency_value_growth } clamp_global_variable = { name = currency_brz_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_dem global_var:currency_dem_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_dem_v add = currency_value_growth } clamp_global_variable = { name = currency_dem_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_pen global_var:currency_pen_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pen_v add = currency_value_growth } clamp_global_variable = { name = currency_pen_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_mxn global_var:currency_mxn_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_mxn_v add = currency_value_growth } clamp_global_variable = { name = currency_mxn_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_irr global_var:currency_irr_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_irr_v add = currency_value_growth } clamp_global_variable = { name = currency_irr_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_trl global_var:currency_trl_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_trl_v add = currency_value_growth } clamp_global_variable = { name = currency_trl_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_yuf global_var:currency_yuf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_yuf_v add = currency_value_growth } clamp_global_variable = { name = currency_yuf_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_pln global_var:currency_pln_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pln_v add = currency_value_growth } clamp_global_variable = { name = currency_pln_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_cad global_var:currency_cad_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_cad_v add = currency_value_growth } clamp_global_variable = { name = currency_cad_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_aud global_var:currency_aud_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_aud_v add = currency_value_growth } clamp_global_variable = { name = currency_aud_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_nzd global_var:currency_nzd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nzd_v add = currency_value_growth } clamp_global_variable = { name = currency_nzd_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_aup global_var:currency_aup_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_aup_v add = currency_value_growth } clamp_global_variable = { name = currency_aup_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_nzp global_var:currency_nzp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nzp_v add = currency_value_growth } clamp_global_variable = { name = currency_nzp_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_itl global_var:currency_itl_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_itl_v add = currency_value_growth } clamp_global_variable = { name = currency_itl_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_jpy global_var:currency_jpy_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_jpy_v add = currency_value_growth } clamp_global_variable = { name = currency_jpy_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_chf global_var:currency_chf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_chf_v add = currency_value_growth } clamp_global_variable = { name = currency_chf_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_ars global_var:currency_ars_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_ars_v add = currency_value_growth } clamp_global_variable = { name = currency_ars_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_cny global_var:currency_cny_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_cny_v add = currency_value_growth } clamp_global_variable = { name = currency_cny_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_inr global_var:currency_inr_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_inr_v add = currency_value_growth } clamp_global_variable = { name = currency_inr_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_zar global_var:currency_zar_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_zar_v add = currency_value_growth } clamp_global_variable = { name = currency_zar_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_sek global_var:currency_sek_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_sek_v add = currency_value_growth } clamp_global_variable = { name = currency_sek_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_egp global_var:currency_egp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_egp_v add = currency_value_growth } clamp_global_variable = { name = currency_egp_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_grd global_var:currency_grd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_grd_v add = currency_value_growth } clamp_global_variable = { name = currency_grd_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_iep global_var:currency_iep_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_iep_v add = currency_value_growth } clamp_global_variable = { name = currency_iep_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_esp global_var:currency_esp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_esp_v add = currency_value_growth } clamp_global_variable = { name = currency_esp_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_pte global_var:currency_pte_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pte_v add = currency_value_growth } clamp_global_variable = { name = currency_pte_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_nok global_var:currency_nok_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nok_v add = currency_value_growth } clamp_global_variable = { name = currency_nok_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_fim global_var:currency_fim_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_fim_v add = currency_value_growth } clamp_global_variable = { name = currency_fim_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_dkk global_var:currency_dkk_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_dkk_v add = currency_value_growth } clamp_global_variable = { name = currency_dkk_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_krw global_var:currency_krw_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_krw_v add = currency_value_growth } clamp_global_variable = { name = currency_krw_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_thb global_var:currency_thb_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_thb_v add = currency_value_growth } clamp_global_variable = { name = currency_thb_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_veb global_var:currency_veb_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_veb_v add = currency_value_growth } clamp_global_variable = { name = currency_veb_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_php_v add = currency_value_growth } clamp_global_variable = { name = currency_php_v max = 90000000000 min = foreign_avg_min99 } } ################################### on_action_currency_denomination_change_chance = yes onaction_order_by_value_currency = yes From b615a090b9c92027e33f68fa5e80f188e72f69bd Mon Sep 17 00:00:00 2001 From: raxo2222 <54320715+raxo2222@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:05:30 +0200 Subject: [PATCH 21/45] Contractionary monetary policy now increases currency value., also made one loc more clear --- common/script_values/currency_values.txt | 2 +- localization/english/CWP/CWP_fiscal_l_english.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/script_values/currency_values.txt b/common/script_values/currency_values.txt index 127ff320d..4edb147bb 100644 --- a/common/script_values/currency_values.txt +++ b/common/script_values/currency_values.txt @@ -31,7 +31,7 @@ currency_value_growth = { limit = { has_variable = contractionary_monetary_policy } - add = { + subtract = { value = money_supply_growth_percentage divide = 10 desc = MNS_CONTRACTIONARY diff --git a/localization/english/CWP/CWP_fiscal_l_english.yml b/localization/english/CWP/CWP_fiscal_l_english.yml index 70c6fc7fb..2aaa96e1e 100644 --- a/localization/english/CWP/CWP_fiscal_l_english.yml +++ b/localization/english/CWP/CWP_fiscal_l_english.yml @@ -82,7 +82,7 @@ BNK_IN_DEFAULT: "In Default" BNK_ALTERED_CURRENCY: "Recently Altering Currency" # Currency CUR_TOOLTIP_FORMAT: "$VALUE|+d%$ from $KEY$" -CUR_MONEY_SUPPLY: "Money Supply Percentage" +CUR_MONEY_SUPPLY: "Money Supply Growth Percentage" CUR_INTEREST_RATE: "Interest Rates" CUR_PEGGED_CURRENCY: "Currency Peg to [GetPlayer.MakeScope.Var('pegged_currency').GetCountry.GetCustom('currency_text_loc')][GetPlayer.MakeScope.Var('pegged_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" CURRENCY_VALUE_TOOLTIP: "#v 1.00[GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]#! is\n#v [SelectLocalization(LessThan_CFixedPoint(Country.MakeScope.ScriptValue('currency_difference_to_exchange_currency_denomination'), '(CFixedPoint)0.01'), 'CURRENCY_VALUE_LESSTHANONE', 'CURRENCY_VALUE_MORETHANONE')][Country.MakeScope.Var('cwp_currency').GetFlagName]#" From f4f49763ea2eca374c7aa4425a02763357acd9bb Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:15:30 +0300 Subject: [PATCH 22/45] internal fix --- common/script_values/currency_values.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/script_values/currency_values.txt b/common/script_values/currency_values.txt index 127ff320d..53f208ba3 100644 --- a/common/script_values/currency_values.txt +++ b/common/script_values/currency_values.txt @@ -301,7 +301,7 @@ currency_average_difference_to_global_AI = { divide = 2 } multiply = 100 - #min = min_currency_value + min = -99.9 } currency_average_difference_to_global = { @@ -315,7 +315,7 @@ currency_average_difference_to_global = { divide = 2 } multiply = 100 - #min = min_currency_value + min = -99.9 } global_average_difference_to_currency = { From 96054c5e7763de1df0925cc4b5a7ca1f1476cf19 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:20:05 +0300 Subject: [PATCH 23/45] dem can only be formed with germany --- common/scripted_effects/cwp_currency_adoption_effects.txt | 8 +------- common/scripted_triggers/cwp_fiscal_triggers.txt | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/common/scripted_effects/cwp_currency_adoption_effects.txt b/common/scripted_effects/cwp_currency_adoption_effects.txt index 3475efc7f..c0159130c 100644 --- a/common/scripted_effects/cwp_currency_adoption_effects.txt +++ b/common/scripted_effects/cwp_currency_adoption_effects.txt @@ -1,13 +1,7 @@ effect_adopt_currency = { if = { limit = { - or = { - c:GER ?= THIS - c:RHI ?= THIS - c:SAA ?= THIS - c:AOA ?= THIS - c:SGF ?= THIS - } + c:GER ?= THIS } custom_tooltip = { text = "WILL_ADOPT_NEW_CURRENCY" diff --git a/common/scripted_triggers/cwp_fiscal_triggers.txt b/common/scripted_triggers/cwp_fiscal_triggers.txt index 155b2c0fe..2a5964c14 100644 --- a/common/scripted_triggers/cwp_fiscal_triggers.txt +++ b/common/scripted_triggers/cwp_fiscal_triggers.txt @@ -18,13 +18,7 @@ can_adopt_currency = { not = { var:cwp_currency = flag:currency_dem } - or = { - c:GER ?= THIS - c:RHI ?= THIS - c:SAA ?= THIS - c:AOA ?= THIS - c:SGF ?= THIS - } + c:GER ?= THIS } } } From f01716a0559e3b4ae6cc90d1ab1e05301e2da4ad Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:55:07 +0300 Subject: [PATCH 24/45] currency value change fixed --- common/script_values/currency_values.txt | 5 ++ .../cwp_onaction_currency_effects.txt | 74 +++++++++---------- 2 files changed, 42 insertions(+), 37 deletions(-) diff --git a/common/script_values/currency_values.txt b/common/script_values/currency_values.txt index 6358ca7c8..08e20c6b2 100644 --- a/common/script_values/currency_values.txt +++ b/common/script_values/currency_values.txt @@ -85,6 +85,11 @@ currency_value_growth = { value = 0 } } + +currency_value_change = { + value = country_currency_val + multiply = currency_value_growth +} global_currency_value = { value = global_var:currency_usd_v min = min_currency_value diff --git a/common/scripted_effects/cwp_onaction_currency_effects.txt b/common/scripted_effects/cwp_onaction_currency_effects.txt index 5c1be52c0..acf5ee089 100644 --- a/common/scripted_effects/cwp_onaction_currency_effects.txt +++ b/common/scripted_effects/cwp_onaction_currency_effects.txt @@ -1,42 +1,42 @@ onaction_currency_calculation = { # Currency Calculations - if = { limit = { var:cwp_currency = flag:currency_usd global_var:currency_usd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_usd_v add = currency_value_growth } clamp_global_variable = { name = currency_usd_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_frf global_var:currency_frf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_frf_v add = currency_value_growth } clamp_global_variable = { name = currency_frf_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_gbp global_var:currency_gbp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_gbp_v add = currency_value_growth } clamp_global_variable = { name = currency_gbp_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_sur global_var:currency_sur_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_sur_v add = currency_value_growth } clamp_global_variable = { name = currency_sur_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_brz global_var:currency_brz_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_brz_v add = currency_value_growth } clamp_global_variable = { name = currency_brz_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_dem global_var:currency_dem_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_dem_v add = currency_value_growth } clamp_global_variable = { name = currency_dem_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_pen global_var:currency_pen_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pen_v add = currency_value_growth } clamp_global_variable = { name = currency_pen_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_mxn global_var:currency_mxn_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_mxn_v add = currency_value_growth } clamp_global_variable = { name = currency_mxn_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_irr global_var:currency_irr_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_irr_v add = currency_value_growth } clamp_global_variable = { name = currency_irr_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_trl global_var:currency_trl_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_trl_v add = currency_value_growth } clamp_global_variable = { name = currency_trl_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_yuf global_var:currency_yuf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_yuf_v add = currency_value_growth } clamp_global_variable = { name = currency_yuf_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_pln global_var:currency_pln_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pln_v add = currency_value_growth } clamp_global_variable = { name = currency_pln_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_cad global_var:currency_cad_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_cad_v add = currency_value_growth } clamp_global_variable = { name = currency_cad_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_aud global_var:currency_aud_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_aud_v add = currency_value_growth } clamp_global_variable = { name = currency_aud_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_nzd global_var:currency_nzd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nzd_v add = currency_value_growth } clamp_global_variable = { name = currency_nzd_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_aup global_var:currency_aup_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_aup_v add = currency_value_growth } clamp_global_variable = { name = currency_aup_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_nzp global_var:currency_nzp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nzp_v add = currency_value_growth } clamp_global_variable = { name = currency_nzp_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_itl global_var:currency_itl_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_itl_v add = currency_value_growth } clamp_global_variable = { name = currency_itl_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_jpy global_var:currency_jpy_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_jpy_v add = currency_value_growth } clamp_global_variable = { name = currency_jpy_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_chf global_var:currency_chf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_chf_v add = currency_value_growth } clamp_global_variable = { name = currency_chf_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_ars global_var:currency_ars_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_ars_v add = currency_value_growth } clamp_global_variable = { name = currency_ars_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_cny global_var:currency_cny_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_cny_v add = currency_value_growth } clamp_global_variable = { name = currency_cny_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_inr global_var:currency_inr_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_inr_v add = currency_value_growth } clamp_global_variable = { name = currency_inr_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_zar global_var:currency_zar_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_zar_v add = currency_value_growth } clamp_global_variable = { name = currency_zar_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_sek global_var:currency_sek_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_sek_v add = currency_value_growth } clamp_global_variable = { name = currency_sek_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_egp global_var:currency_egp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_egp_v add = currency_value_growth } clamp_global_variable = { name = currency_egp_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_grd global_var:currency_grd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_grd_v add = currency_value_growth } clamp_global_variable = { name = currency_grd_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_iep global_var:currency_iep_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_iep_v add = currency_value_growth } clamp_global_variable = { name = currency_iep_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_esp global_var:currency_esp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_esp_v add = currency_value_growth } clamp_global_variable = { name = currency_esp_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_pte global_var:currency_pte_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pte_v add = currency_value_growth } clamp_global_variable = { name = currency_pte_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_nok global_var:currency_nok_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nok_v add = currency_value_growth } clamp_global_variable = { name = currency_nok_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_fim global_var:currency_fim_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_fim_v add = currency_value_growth } clamp_global_variable = { name = currency_fim_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_dkk global_var:currency_dkk_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_dkk_v add = currency_value_growth } clamp_global_variable = { name = currency_dkk_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_krw global_var:currency_krw_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_krw_v add = currency_value_growth } clamp_global_variable = { name = currency_krw_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_thb global_var:currency_thb_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_thb_v add = currency_value_growth } clamp_global_variable = { name = currency_thb_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_veb global_var:currency_veb_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_veb_v add = currency_value_growth } clamp_global_variable = { name = currency_veb_v max = 90000000000 min = foreign_avg_min99 } } - if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_php_v add = currency_value_growth } clamp_global_variable = { name = currency_php_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_usd global_var:currency_usd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_usd_v add = currency_value_change } clamp_global_variable = { name = currency_usd_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_frf global_var:currency_frf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_frf_v add = currency_value_change } clamp_global_variable = { name = currency_frf_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_gbp global_var:currency_gbp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_gbp_v add = currency_value_change } clamp_global_variable = { name = currency_gbp_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_sur global_var:currency_sur_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_sur_v add = currency_value_change } clamp_global_variable = { name = currency_sur_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_brz global_var:currency_brz_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_brz_v add = currency_value_change } clamp_global_variable = { name = currency_brz_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_dem global_var:currency_dem_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_dem_v add = currency_value_change } clamp_global_variable = { name = currency_dem_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_pen global_var:currency_pen_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pen_v add = currency_value_change } clamp_global_variable = { name = currency_pen_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_mxn global_var:currency_mxn_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_mxn_v add = currency_value_change } clamp_global_variable = { name = currency_mxn_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_irr global_var:currency_irr_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_irr_v add = currency_value_change } clamp_global_variable = { name = currency_irr_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_trl global_var:currency_trl_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_trl_v add = currency_value_change } clamp_global_variable = { name = currency_trl_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_yuf global_var:currency_yuf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_yuf_v add = currency_value_change } clamp_global_variable = { name = currency_yuf_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_pln global_var:currency_pln_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pln_v add = currency_value_change } clamp_global_variable = { name = currency_pln_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_cad global_var:currency_cad_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_cad_v add = currency_value_change } clamp_global_variable = { name = currency_cad_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_aud global_var:currency_aud_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_aud_v add = currency_value_change } clamp_global_variable = { name = currency_aud_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_nzd global_var:currency_nzd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nzd_v add = currency_value_change } clamp_global_variable = { name = currency_nzd_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_aup global_var:currency_aup_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_aup_v add = currency_value_change } clamp_global_variable = { name = currency_aup_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_nzp global_var:currency_nzp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nzp_v add = currency_value_change } clamp_global_variable = { name = currency_nzp_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_itl global_var:currency_itl_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_itl_v add = currency_value_change } clamp_global_variable = { name = currency_itl_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_jpy global_var:currency_jpy_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_jpy_v add = currency_value_change } clamp_global_variable = { name = currency_jpy_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_chf global_var:currency_chf_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_chf_v add = currency_value_change } clamp_global_variable = { name = currency_chf_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_ars global_var:currency_ars_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_ars_v add = currency_value_change } clamp_global_variable = { name = currency_ars_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_cny global_var:currency_cny_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_cny_v add = currency_value_change } clamp_global_variable = { name = currency_cny_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_inr global_var:currency_inr_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_inr_v add = currency_value_change } clamp_global_variable = { name = currency_inr_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_zar global_var:currency_zar_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_zar_v add = currency_value_change } clamp_global_variable = { name = currency_zar_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_sek global_var:currency_sek_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_sek_v add = currency_value_change } clamp_global_variable = { name = currency_sek_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_egp global_var:currency_egp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_egp_v add = currency_value_change } clamp_global_variable = { name = currency_egp_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_grd global_var:currency_grd_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_grd_v add = currency_value_change } clamp_global_variable = { name = currency_grd_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_iep global_var:currency_iep_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_iep_v add = currency_value_change } clamp_global_variable = { name = currency_iep_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_esp global_var:currency_esp_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_esp_v add = currency_value_change } clamp_global_variable = { name = currency_esp_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_pte global_var:currency_pte_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_pte_v add = currency_value_change } clamp_global_variable = { name = currency_pte_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_nok global_var:currency_nok_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_nok_v add = currency_value_change } clamp_global_variable = { name = currency_nok_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_fim global_var:currency_fim_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_fim_v add = currency_value_change } clamp_global_variable = { name = currency_fim_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_dkk global_var:currency_dkk_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_dkk_v add = currency_value_change } clamp_global_variable = { name = currency_dkk_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_krw global_var:currency_krw_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_krw_v add = currency_value_change } clamp_global_variable = { name = currency_krw_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_thb global_var:currency_thb_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_thb_v add = currency_value_change } clamp_global_variable = { name = currency_thb_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_veb global_var:currency_veb_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_veb_v add = currency_value_change } clamp_global_variable = { name = currency_veb_v max = 90000000000 min = foreign_avg_min99 } } + if = { limit = { var:cwp_currency = flag:currency_php global_var:currency_php_v > 0 is_leading_central_bank = yes } change_global_variable = { name = currency_php_v add = currency_value_change } clamp_global_variable = { name = currency_php_v max = 90000000000 min = foreign_avg_min99 } } ################################### on_action_currency_denomination_change_chance = yes onaction_order_by_value_currency = yes From f5e74e5d99fcb9d762fab8283dcbef409314296a Mon Sep 17 00:00:00 2001 From: raxo2222 <54320715+raxo2222@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:27:36 +0200 Subject: [PATCH 25/45] this loc is unused --- localization/english/CWP/CWP_fiscal_l_english.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/localization/english/CWP/CWP_fiscal_l_english.yml b/localization/english/CWP/CWP_fiscal_l_english.yml index 2aaa96e1e..cfdd90f35 100644 --- a/localization/english/CWP/CWP_fiscal_l_english.yml +++ b/localization/english/CWP/CWP_fiscal_l_english.yml @@ -136,7 +136,6 @@ je_maintain_pegged_currency: "[SelectLocalization(GetPlayer.MakeScope.Var('pegge je_maintain_pegged_currency_a: "Maintain Peg to Target Currency" je_maintain_pegged_currency_b: "Maintain Peg to [GetPlayer.MakeScope.Var('pegged_currency').GetCountry.GetCustom('currency_text_loc')][GetPlayer.MakeScope.Var('pegged_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" je_maintain_pegged_currency_reason: "Current Foreign Reserves: [GetPlayer.MakeScope.ScriptValue('foreign_reserves_value')|+Od]\nForeign Reserves needed to maintain peg: [GetPlayer.MakeScope.ScriptValue('foreign_reserves_needed_for_peg')|+Od]\n$TOOLTIP_DELIMITER$\nA pegged currency offers a shield against the unpredictable nature of global markets. It provides businesses and investors with confidence, assuring them that the value of their investments and the price of their goods will remain stable.\n\nThis fosters an environment conducive to growth, attracting foreign investments and encouraging domestic businesses to thrive." -je_maintain_pegged_currency_goal: "[SCOPE.GetRootScope.GetCountry.GetNameNoFlag] can't maintain a [concept_pegged_currency]" pegged_currency_status_desc: "[SelectLocalization(GreaterThan_CFixedPoint(GetPlayer.MakeScope.ScriptValue('foreign_reserves_value'), GetPlayer.MakeScope.ScriptValue('foreign_reserves_needed_for_peg')), 'can_maintain_peg', 'cant_maintain_peg')]" From 7f26b5bed827213dd13136edbd2c0e8d69fc74a8 Mon Sep 17 00:00:00 2001 From: raxo2222 <54320715+raxo2222@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:33:45 +0200 Subject: [PATCH 26/45] Revert "this loc is unused" This reverts commit f5e74e5d99fcb9d762fab8283dcbef409314296a. --- localization/english/CWP/CWP_fiscal_l_english.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/localization/english/CWP/CWP_fiscal_l_english.yml b/localization/english/CWP/CWP_fiscal_l_english.yml index cfdd90f35..2aaa96e1e 100644 --- a/localization/english/CWP/CWP_fiscal_l_english.yml +++ b/localization/english/CWP/CWP_fiscal_l_english.yml @@ -136,6 +136,7 @@ je_maintain_pegged_currency: "[SelectLocalization(GetPlayer.MakeScope.Var('pegge je_maintain_pegged_currency_a: "Maintain Peg to Target Currency" je_maintain_pegged_currency_b: "Maintain Peg to [GetPlayer.MakeScope.Var('pegged_currency').GetCountry.GetCustom('currency_text_loc')][GetPlayer.MakeScope.Var('pegged_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" je_maintain_pegged_currency_reason: "Current Foreign Reserves: [GetPlayer.MakeScope.ScriptValue('foreign_reserves_value')|+Od]\nForeign Reserves needed to maintain peg: [GetPlayer.MakeScope.ScriptValue('foreign_reserves_needed_for_peg')|+Od]\n$TOOLTIP_DELIMITER$\nA pegged currency offers a shield against the unpredictable nature of global markets. It provides businesses and investors with confidence, assuring them that the value of their investments and the price of their goods will remain stable.\n\nThis fosters an environment conducive to growth, attracting foreign investments and encouraging domestic businesses to thrive." +je_maintain_pegged_currency_goal: "[SCOPE.GetRootScope.GetCountry.GetNameNoFlag] can't maintain a [concept_pegged_currency]" pegged_currency_status_desc: "[SelectLocalization(GreaterThan_CFixedPoint(GetPlayer.MakeScope.ScriptValue('foreign_reserves_value'), GetPlayer.MakeScope.ScriptValue('foreign_reserves_needed_for_peg')), 'can_maintain_peg', 'cant_maintain_peg')]" From 3a605d92c07de5e90654087f93b9c8f6625daf44 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 04:27:53 +0300 Subject: [PATCH 27/45] ai monetary policy ability improved, currencies fixed(finally) --- common/script_values/currency_values.txt | 2 +- common/script_values/fiscal_ai_values.txt | 143 +++++ .../cwp_currency_adoption_effects.txt | 30 + .../cwp_onaction_fiscal_ai.txt | 318 ++++++++++ .../cwp_onaction_fiscal_effects.txt | 71 +-- common/scripted_guis/fiscal_sgui.txt | 13 +- events/CWP_events/ai_fiscal.txt | 596 ------------------ .../english/CWP/CWP_fiscal_l_english.yml | 6 - .../japanese/CWP/CWP_fiscal_l_japanese.yml | 4 - 9 files changed, 496 insertions(+), 687 deletions(-) create mode 100644 common/scripted_effects/cwp_onaction_fiscal_ai.txt delete mode 100644 events/CWP_events/ai_fiscal.txt diff --git a/common/script_values/currency_values.txt b/common/script_values/currency_values.txt index 08e20c6b2..2d286e16b 100644 --- a/common/script_values/currency_values.txt +++ b/common/script_values/currency_values.txt @@ -87,7 +87,7 @@ currency_value_growth = { } currency_value_change = { - value = country_currency_val + value = foreign_avg multiply = currency_value_growth } global_currency_value = { diff --git a/common/script_values/fiscal_ai_values.txt b/common/script_values/fiscal_ai_values.txt index ebafd5a42..e17db9671 100644 --- a/common/script_values/fiscal_ai_values.txt +++ b/common/script_values/fiscal_ai_values.txt @@ -134,4 +134,147 @@ ai_interest_rate_from_growth = { # Base interest rate change to stabilize growt } min = -10 max = 10 +} + + +ai_wants_contractionary = { + if = { + limit = { + money_supply_percentage >= 50 + } + add = 50 + } + if = { + limit = { + money_supply_percentage >= 30 + } + add = 30 + } + if = { + limit = { + money_supply_percentage >= 15 + } + add = 30 + } + if = { + limit = { + gold_reserve_ratio >= 0.2 + } + add = 50 + } + if = { + limit = { + inflation_value >= 20 + } + add = 50 + } +} + +ai_wants_stable = { + if = { + limit = { + money_supply_percentage >= 5 + money_supply_percentage <= 10 + } + add = 50 + } +} + +ai_wants_expansionary = { + if = { + limit = { + money_supply_percentage <= -100 + } + add = 100 + } + if = { + limit = { + money_supply_percentage <= -50 + } + add = 50 + } + if = { + limit = { + scaled_debt >= 0.3 + } + add = 15 + } + if = { + limit = { + money_supply_percentage <= -30 + } + add = 30 + } + if = { + limit = { + money_supply_percentage <= -15 + } + add = 30 + } + if = { + limit = { + money_supply_percentage < 5 + } + add = 20 + } + if = { + limit = { + inflation_value <= 0 + } + add = 100 + } +} + +ai_wants_devalue = { + if = { + limit = { + currency_average_difference_to_global_AI >= 60 + } + add = 20 + } + if = { + limit = { + currency_average_difference_to_global_AI >= 50 + } + add = 20 + } + if = { + limit = { + currency_average_difference_to_global_AI >= 90 + } + add = 20 + } + if = { + limit = { + country_rank = rank_value:superpower # Superpowers dont want to devalue + } + add = -50 + } + if = { + limit = { + country_rank = rank_value:great_power # Great Powers hesitant to devalue + } + add = -20 + } +} + +ai_wants_revalue = { + if = { + limit = { + THIS.currency_average_difference_to_global_AI <= -30 + } + add = 20 + } + if = { + limit = { + THIS.currency_average_difference_to_global_AI <= -50 + } + add = 20 + } + if = { + limit = { + THIS.currency_average_difference_to_global_AI <= -90 + } + add = 40 + } } \ No newline at end of file diff --git a/common/scripted_effects/cwp_currency_adoption_effects.txt b/common/scripted_effects/cwp_currency_adoption_effects.txt index c0159130c..7b4f4a3c3 100644 --- a/common/scripted_effects/cwp_currency_adoption_effects.txt +++ b/common/scripted_effects/cwp_currency_adoption_effects.txt @@ -14,4 +14,34 @@ } } } + if = { + limit = { + c:AST ?= THIS + } + custom_tooltip = { + text = "WILL_ADOPT_NEW_CURRENCY" + effect_currency_aud = yes + } + if = { limit = { not = { currency_leader_exists = { currency = dem } } } + custom_tooltip = { + text = "WILL_BECOME_LEADING_BANK_FOR_CURRENCY" + set_currency = { currency = dem value = foreign_avg centralBank = THIS denominationValue = 1 } + } + } + } + if = { + limit = { + c:NZL ?= THIS + } + custom_tooltip = { + text = "WILL_ADOPT_NEW_CURRENCY" + effect_currency_nzd = yes + } + if = { limit = { not = { currency_leader_exists = { currency = dem } } } + custom_tooltip = { + text = "WILL_BECOME_LEADING_BANK_FOR_CURRENCY" + set_currency = { currency = dem value = foreign_avg centralBank = THIS denominationValue = 1 } + } + } + } } \ No newline at end of file diff --git a/common/scripted_effects/cwp_onaction_fiscal_ai.txt b/common/scripted_effects/cwp_onaction_fiscal_ai.txt new file mode 100644 index 000000000..29a7bd8d9 --- /dev/null +++ b/common/scripted_effects/cwp_onaction_fiscal_ai.txt @@ -0,0 +1,318 @@ +onaction_ai_fiscal_calculations = { + if = { + limit = { + is_ai = yes + } + onaction_ai_monetary_policy_calculation = yes + onaction_ai_interest_rate_calculation = yes + onaction_ai_buy_foreign_currency_calculation = yes + onaction_ai_sell_foreign_reserves_calculation = yes + onaction_ai_devalue_revalue_calculation = yes + } +} + +onaction_ai_monetary_policy_calculation = { + if = { + limit = { + nor = { + has_variable = pegged_currency + has_law = law_type:law_gold_standard + } + } + random_list = { + 1 = { # Contractionary + modifier = { + add = ai_wants_contractionary + } + remove_variable = stable_monetary_policy + remove_variable = expansionary_monetary_policy + set_variable = contractionary_monetary_policy + + } + 1 = { # Stable + modifier = { + add = ai_wants_stable + } + remove_variable = contractionary_monetary_policy + remove_variable = expansionary_monetary_policy + set_variable = stable_monetary_policy + } + 1 = { # Expansionary + modifier = { + add = ai_wants_expansionary + } + remove_variable = stable_monetary_policy + remove_variable = contractionary_monetary_policy + set_variable = expansionary_monetary_policy + } + } + } + +} + +onaction_ai_interest_rate_calculation = { + if = { + limit = { + nor = { + var:interest_rate = ai_ideal_interest_rate + has_law = law_type:law_gold_standard + has_variable = pegged_currency + } + } + set_variable = { + name = interest_rate + value = ai_ideal_interest_rate + } + set_variable = { + name = interest_rate_gui + value = var:interest_rate + } + } +} + +onaction_ai_buy_foreign_currency_calculation = { + if = { + limit = { + nor = { + foreign_reserves_value >= foreign_reserves_max + scaled_debt >= 0.5 + } + } + random = { + chance = 50 + random_in_global_list = { + variable = central_bank_list + limit = { + nor = { + ROOT = THIS + has_variable = currency_bought + } + or = { + and = { + ROOT = { + has_variable = pegged_currency + } + ROOT.var:pegged_currency = THIS + } + } + ROOT.country_payment_ability >= { + value = { + value = { + value = THIS.gold_reserves_limit + add = THIS.credit + } + multiply = 0.05 + max = ROOT.foreign_reserves_capacity_left + } + multiply = { + value = THIS.country_currency_val + divide = ROOT.country_currency_val + } + } + } + save_scope_as = currency_exchange_country + } + if = { + limit = { + is_set = scope:currency_exchange_country + } + set_variable = { + name = ai_currency_buy_country + value = scope:currency_exchange_country + } + } + if = { + limit = { + not = { + is_set = scope:currency_exchange_country + } + } + remove_variable = ai_currency_buy_country + } + if = { + limit = { + has_variable = ai_currency_buy_country + } + add_treasury = { # Remove from AI treasury + value = { + value = var:ai_currency_buy_country.money_supply_5 + max = ROOT.foreign_reserves_capacity_left + } + multiply = { + value = var:ai_currency_buy_country.country_currency_val + divide = ROOT.country_currency_val + } + multiply = -1 + } + # Increases Reserve + if = { + limit = { + var:ai_currency_buy_country.money_supply_5 <= foreign_reserves_capacity_left + } + change_variable = { + name = foreign_reserves + add = { + value = { + value = var:ai_currency_buy_country.gold_reserves_limit + add = var:ai_currency_buy_country.credit + } + multiply = 0.05 + } + } + } + if = { + limit = { + var:ai_currency_buy_country.money_supply_5 >= foreign_reserves_capacity_left + } + set_variable = { + name = foreign_reserves + value = foreign_reserves_max + } + } + var:ai_currency_buy_country = { + on_action_change_domestic_currency_value = { + mathAction = add + mathAction2 = currency_value_growth_by_exchange + } + if = { + limit = { + nor = { + has_law = law_type:law_gold_standard # Gold standard has fixed money supply unless altered + has_law = law_type:law_pegged_currency # Pegged Currency uses pegged money supply + } + } + # Reduces Money Supply + change_variable = { + name = money_supply + subtract = { + value = { + value = var:ai_currency_buy_country.gold_reserves_limit + add = var:ai_currency_buy_country.credit + } + multiply = 0.05 + } + } + } + # Prevents further currency buying for 1 month + set_variable = { + name = currency_bought + months = 1 + } + } + remove_variable = ai_currency_buy_country + } + } + } +} + +onaction_ai_sell_foreign_reserves_calculation = { + if = { + limit = { + foreign_reserves_value >= 1 + foreign_reserves_ratio > 0.2 + scaled_debt >= 0.5 + } + random = { + chance = 50 + change_variable = { + name = foreign_reserves + subtract = { + value = 500000 + divide = { + value = foreign_avg + divide = country_currency_val + min = min_currency_value + } + } + } + clamp_variable = { + name = foreign_reserves + min = 0 + max = foreign_reserves_max + } + # Increases Local Currency Value + if = { + limit = { + not = { + has_variable = pegged_currency # Pegged Currencies do not get their value increased + } + } + on_action_change_domestic_currency_value = { + mathAction = add + mathAction2 = currency_value_growth_by_exchange + } + } + add_treasury = 500000 + } + } +} + +onaction_ai_devalue_revalue_calculation = { + if = { + limit = { + or = { + currency_average_difference_to_global_AI > 90 + currency_average_difference_to_global_AI < 90 + } + nor = { + has_variable = pegged_currency + has_variable = altered_currency + has_law = law_type:law_gold_standard + } + is_leading_central_bank = yes + } + random_list = { + 50 = { } # Do Nothing + 1 = { # Devalue + modifier = { + add = ai_wants_devalue + } + on_action_change_domestic_currency_value = { + mathAction = subtract + mathAction2 = alter_currency_value + } + if = { + limit = { + country_currency_val > 0 + } + change_variable = { + name = money_supply + subtract = { + value = money_supply_from_gold_reserves + multiply = 10 + } + } + } + set_variable = { + name = altered_currency + months = 12 + } + } + 1 = { + modifier = { + add = ai_wants_revalue + } + on_action_change_domestic_currency_value = { + mathAction = add + mathAction2 = alter_currency_value + } + if = { + limit = { + country_currency_val > 0 + } + change_variable = { + name = money_supply + add = { + value = money_supply_from_gold_reserves + multiply = 10 + } + } + } + set_variable = { + name = altered_currency + months = 12 + } + } + } + } +} \ No newline at end of file diff --git a/common/scripted_effects/cwp_onaction_fiscal_effects.txt b/common/scripted_effects/cwp_onaction_fiscal_effects.txt index 78d534e43..c4937bd70 100644 --- a/common/scripted_effects/cwp_onaction_fiscal_effects.txt +++ b/common/scripted_effects/cwp_onaction_fiscal_effects.txt @@ -1,13 +1,10 @@ onaction_fiscal_calculation = { fiscal_error_check = yes - fiscal_money_supply_calculation = yes fiscal_inflation_deflation_calculation = yes fiscal_monetary_policy_calculation = yes - - fiscal_ai_calculation = yes - + onaction_ai_fiscal_calculations = yes fiscal_investor_confidence_calculation = yes } @@ -97,72 +94,6 @@ fiscal_monetary_policy_calculation = { } } -fiscal_ai_calculation = { - if = { - limit = { - is_ai = yes - not = { - has_variable = adjusted_monetary_policy - } - } - trigger_event = ai_fiscal.1 # AI Monetary Policy - } - if = { - limit = { - is_ai = yes - not = { - var:interest_rate = ai_ideal_interest_rate - has_law = law_type:law_gold_standard - } - } - trigger_event = ai_fiscal.2 # AI Interest Rate - } - if = { - limit = { - is_ai = yes - foreign_reserves_ratio < 30 - nor = { - foreign_reserves_value >= foreign_reserves_max - scaled_debt >= 1 - has_variable = ai_bought_currency - } - } - trigger_event = ai_fiscal.3 # AI Buy Foreign Reserves - } - if = { - limit = { - is_ai = yes - or = { - and = { - foreign_reserves_ratio > 10 - scaled_debt >= 0.7 - } - and = { - foreign_reserves_ratio > 70 - scaled_debt >= 0.5 - } - } - } - trigger_event = ai_fiscal.4 # AI Sell Foreign Reserves - } - if = { - limit = { - is_ai = yes - and = { - THIS.currency_average_difference_to_global_AI > 50 - is_target_in_global_variable_list = { - name = central_bank_list - target = THIS - } - not = { - has_variable = altered_currency - } - } - } - trigger_event = ai_fiscal.5 # AI Devalue/Revalue - } -} - fiscal_investor_confidence_calculation = { remove_modifier = investor_confidence add_modifier = { diff --git a/common/scripted_guis/fiscal_sgui.txt b/common/scripted_guis/fiscal_sgui.txt index 11babfdaf..78a64acaa 100644 --- a/common/scripted_guis/fiscal_sgui.txt +++ b/common/scripted_guis/fiscal_sgui.txt @@ -40,16 +40,9 @@ buy_foreign_currency = { } # Increases Bought Currency Value scope:currency_exchange_country = { - if = { - limit = { - not = { - has_law = law_type:law_pegged_currency # Pegged Currencies dont increase in value - } - } - on_action_change_domestic_currency_value = { - mathAction = add - mathAction2 = currency_value_growth_by_exchange - } + on_action_change_domestic_currency_value = { + mathAction = add + mathAction2 = currency_value_growth_by_exchange } if = { limit = { diff --git a/events/CWP_events/ai_fiscal.txt b/events/CWP_events/ai_fiscal.txt deleted file mode 100644 index 0a682341a..000000000 --- a/events/CWP_events/ai_fiscal.txt +++ /dev/null @@ -1,596 +0,0 @@ -namespace = ai_fiscal - -ai_fiscal.1 = { #Sets Monetary policy - type = country_event - trigger = { - is_ai = yes - not = { - has_variable = adjusted_monetary_policy - } - } - duration = 3 - immediate = { - - } - option = { # Contractionary - name = ai_fiscal.1.a - if = { - limit = { - not = { - has_variable = pegged_currency - has_law = law_type:law_gold_standard - } - } - remove_variable = stable_monetary_policy - remove_variable = expansionary_monetary_policy - set_variable = contractionary_monetary_policy - set_variable = { - name = adjusted_monetary_policy - days = 30 - } - } - - ai_chance = { - base = 0 - modifier = { - trigger = { - money_supply_percentage >= 50 - } - add = 50 - } - modifier = { - trigger = { - gold_reserve_ratio >= 0.2 - } - add = 15 - } - modifier = { - trigger = { - money_supply_percentage >= 30 - } - add = 30 - } - modifier = { - trigger = { - money_supply_percentage >= 15 - } - add = 30 - } - modifier = { - trigger = { - inflation_value >= 20 - } - add = 50 - } - } - } - option = { # Stable - name = ai_fiscal.2.a - default_option = yes - if = { - limit = { - not = { - has_variable = pegged_currency - has_law = law_type:law_gold_standard - } - } - remove_variable = contractionary_monetary_policy - remove_variable = expansionary_monetary_policy - set_variable = stable_monetary_policy - set_variable = { - name = adjusted_monetary_policy - days = 30 - } - } - ai_chance = { - base = 0 - modifier = { - trigger = { - money_supply_percentage >= 5 - money_supply_percentage <= 10 - } - add = 30 - } - } - } - option = { # Expansionary - name = ai_fiscal.3.a - if = { - limit = { - nor = { - has_variable = pegged_currency - has_law = law_type:law_gold_standard - } - } - remove_variable = stable_monetary_policy - remove_variable = contractionary_monetary_policy - set_variable = expansionary_monetary_policy - set_variable = { - name = adjusted_monetary_policy - days = 30 - } - } - ai_chance = { - base = 0 - modifier = { - trigger = { - money_supply_percentage <= -100 - } - add = 100 - } - modifier = { - trigger = { - money_supply_percentage <= -50 - } - add = 50 - } - modifier = { - trigger = { - scaled_debt >= 0.2 - } - add = 15 - } - modifier = { - trigger = { - money_supply_percentage <= -30 - } - add = 30 - } - modifier = { - trigger = { - money_supply_percentage <= -15 - } - add = 30 - } - modifier = { - trigger = { - money_supply_percentage < 5 - } - add = 20 - } - modifier = { - trigger = { - inflation_value <= 0 - } - add = 30 - } - } - } - -} - -ai_fiscal.2 = { # Set Interest Rate - type = country_event - trigger = { - is_ai = yes - nor = { - var:interest_rate = ai_ideal_interest_rate - has_law = law_type:law_gold_standard - has_variable = pegged_currency - has_law = law_type:law_pegged_currency - } - } - duration = 3 - immediate = { - - } - option = { - name = ai_fiscal.1.a - default_option = yes - set_variable = { - name = interest_rate - value = ai_ideal_interest_rate - } - set_variable = { - name = interest_rate_gui - value = var:interest_rate - } - } - -} - -ai_fiscal.3 = { # Buy Foreign Currency - type = country_event - trigger = { - is_ai = yes - foreign_reserves_ratio < 30 - nor = { - foreign_reserves_value >= foreign_reserves_max - scaled_debt >= 1 - has_variable = ai_bought_currency - } - } - duration = 3 - immediate = { - if = { - limit = { - not = { - has_variable = pegged_currency - } - } - random_in_global_list = { - variable = central_bank_list - limit = { - nor = { - ROOT = THIS - has_variable = currency_bought - } - or = { - and = { - has_variable = pegged_currency - THIS = var:pegged_currency - } - not = { - has_variable = pegged_currency - } - } - ROOT.country_payment_ability >= { - value = { - value = { - value = THIS.gold_reserves_limit - add = THIS.credit - } - max = ROOT.foreign_reserves_capacity_left - } - multiply = { - value = THIS.country_currency_val - divide = ROOT.country_currency_val - } - } - } - save_scope_as = currency_exchange_country - } - if = { - limit = { - is_set = scope:currency_exchange_country - } - set_variable = { - name = ai_currency_buy_country - value = scope:currency_exchange_country - } - } - if = { - limit = { - not = { - is_set = scope:currency_exchange_country - } - } - remove_variable = ai_currency_buy_country - } - } - } - option = { - name = ai_fiscal.1.a - if = { - limit = { - has_variable = ai_currency_buy_country - } - add_treasury = { - value = { - value = var:ai_currency_buy_country.money_supply_5 - max = ROOT.foreign_reserves_capacity_left - } - multiply = { - value = var:ai_currency_buy_country.country_currency_val - divide = ROOT.country_currency_val - } - multiply = -1 - } - # Increases Reserve - if = { - limit = { - var:ai_currency_buy_country.money_supply_5 <= foreign_reserves_capacity_left - } - change_variable = { - name = foreign_reserves - add = var:ai_currency_buy_country.money_supply_5 - } - } - if = { - limit = { - var:ai_currency_buy_country.money_supply_5 >= foreign_reserves_capacity_left - } - set_variable = { - name = foreign_reserves - value = foreign_reserves_max - } - } - # Increases Bought Currency Value - var:ai_currency_buy_country = { - if = { - limit = { - not = { - has_law = law_type:law_pegged_currency # Pegged Currencies dont increase in value - } - } - on_action_change_domestic_currency_value = { - mathAction = add - mathAction2 = currency_value_growth_by_exchange - } - } - if = { - limit = { - nor = { - has_law = law_type:law_gold_standard # Gold standard has fixed money supply unless altered - has_law = law_type:law_pegged_currency # Pegged Currency uses pegged money supply - } - } - # Reduces Money Supply - change_variable = { - name = money_supply - subtract = { - value = money_supply_5 - } - } - } - set_variable = { - name = currency_bought - months = 1 - } - } - remove_variable = ai_currency_buy_country - set_variable = { - name = ai_bought_currency - months = 3 - } - } - ai_chance = { - base = 30 - } - } - option = { - name = ai_fiscal.1.b - default_option = yes - set_variable = { - name = ai_bought_currency - months = 3 - } - ai_chance = { - base = 70 - modifier = { - trigger = { - nor = { - has_variable = ai_currency_buy_country - } - } - add = 1000 - } - } - } - -} - -ai_fiscal.4 = { # Sell Foreign Currency - type = country_event - trigger = { - is_ai = yes - or = { - and = { - foreign_reserves_ratio > 10 - scaled_debt >= 0.7 - } - and = { - foreign_reserves_ratio > 70 - scaled_debt >= 0.5 - } - } - - } - duration = 3 - immediate = { - - } - option = { - name = ai_fiscal.1.a - default_option = yes - if = { - limit = { - nor = { - foreign_reserves_value <= 0 - gold_reserve_value >= gold_reserve_limit - foreign_reserves_value <= { - value = 500000 - multiply = { - value = country_currency_val - subtract = foreign_avg - divide = foreign_avg - multiply = 100 - } - } - } - } - # Reduces Reserves - if = { - limit = { - foreign_reserves_value >= 1 - } - change_variable = { - name = foreign_reserves - subtract = { - value = 500000 - multiply = { - value = country_currency_val - subtract = foreign_avg - divide = foreign_avg - multiply = 100 - } - } - } - } - # Increases Local Currency Value - if = { - limit = { - not = { - has_variable = pegged_currency # Pegged Currencies do not get their value increased - } - } - on_action_change_domestic_currency_value = { - mathAction = add - mathAction2 = currency_value_growth_by_exchange - } - } - add_treasury = 500000 - } - } - option = { # Do nothing - name = ai_fiscal.2.a - ai_chance = { - base = 20 - } - } - -} - -ai_fiscal.5 = { # Consider Devalue/revalue - type = country_event - trigger = { - is_ai = yes - THIS.currency_average_difference_to_global_AI > 50 - is_target_in_global_variable_list = { - name = central_bank_list - target = THIS - } - nor = { - has_variable = pegged_currency - has_variable = altered_currency - has_law = law_type:law_gold_standard - has_law = law_type:law_pegged_currency - has_law = law_type:law_independent_monetary_policy - } - } - duration = 3 - immediate = { - - } - option = { - name = ai_fiscal.1.a # Devalue - if = { - limit = { - nor = { - has_variable = pegged_currency - has_variable = altered_currency - has_law = law_type:law_gold_standard - has_law = law_type:law_pegged_currency - has_law = law_type:law_independent_monetary_policy - } - } - on_action_change_domestic_currency_value = { - mathAction = subtract - mathAction2 = alter_currency_value - } - if = { - limit = { - country_currency_val > 0 - } - change_variable = { - name = money_supply - subtract = { - value = money_supply_from_gold_reserves - multiply = 10 - } - } - } - set_variable = { - name = altered_currency - months = 12 - } - } - - ai_chance = { - base = 0 - modifier = { - trigger = { - THIS.currency_average_difference_to_global_AI >= 60 - } - add = 20 - } - modifier = { - trigger = { - THIS.currency_average_difference_to_global_AI >= 50 - } - add = 20 - } - modifier = { - trigger = { # TODO, make it so US is more likely to devalue after bretton woods ends - country_rank = rank_value:superpower # Superpowers dont want to devalue - } - add = -50 - } - modifier = { - trigger = { - country_rank = rank_value:great_power # Great Powers hesitant to devalue - } - add = -20 - } - } - } - option = { # Do nothing - name = ai_fiscal.2.a - default_option = yes - ai_chance = { - base = 0 - modifier = { - trigger = { - THIS.currency_average_difference_to_global_AI >=-30 - } - add = 20 - } - modifier = { - trigger = { - THIS.currency_average_difference_to_global_AI <= 30 - } - add = 20 - } - } - } - option = { - name = ai_fiscal.3.a # Revalue - if = { - limit = { - nor = { - has_variable = pegged_currency - has_variable = altered_currency - has_law = law_type:law_gold_standard - has_law = law_type:law_pegged_currency - has_law = law_type:law_independent_monetary_policy - } - } - on_action_change_domestic_currency_value = { - mathAction = add - mathAction2 = alter_currency_value - } - if = { - limit = { - country_currency_val > 0 - } - change_variable = { - name = money_supply - add = { - value = money_supply_from_gold_reserves - multiply = 10 - } - } - } - set_variable = { - name = altered_currency - months = 12 - } - } - ai_chance = { - base = 0 - modifier = { - trigger = { - THIS.currency_average_difference_to_global_AI <= -30 - } - add = 20 - } - modifier = { - trigger = { - THIS.currency_average_difference_to_global_AI <= 50 - } - add = 20 - } - } - } - -} \ No newline at end of file diff --git a/localization/english/CWP/CWP_fiscal_l_english.yml b/localization/english/CWP/CWP_fiscal_l_english.yml index 2aaa96e1e..0ffd4af85 100644 --- a/localization/english/CWP/CWP_fiscal_l_english.yml +++ b/localization/english/CWP/CWP_fiscal_l_english.yml @@ -155,12 +155,6 @@ cwp_bank_reevaluation.2.desc: "In a sudden turn of events, the credit rating of cwp_bank_reevaluation.2.f: "We find ourselves at a crossroads, where the consequences of our actions have rippled through the financial fabric of our nation. The trust we once enjoyed has been tested, and our reputation has taken a blow. The future lies uncertain." cwp_bank_reevaluation.2.a: "Where did the money go?" -# AI events -ai_fiscal.1.a: "AI option 1.a" -ai_fiscal.1.b: "AI option 1.b" -ai_fiscal.2.a: "AI option 2.a" -ai_fiscal.3.a: "AI option 3.a" - je_bretton_woods_agreement: "Bretton Woods Agreement" je_bretton_woods_agreement_reason: "[SelectLocalization(GetScriptedGui('bretton_woods_is_usa_enabled').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BRETTON_WOODS_USA', 'BRETTON_WOODS_OTHER')]" bretton_woods_agreement_status_desc: "Currently #v [GetDataModelSize(GetGlobalList('bretton_woods_members'))]#! Signatory Countries" diff --git a/localization/japanese/CWP/CWP_fiscal_l_japanese.yml b/localization/japanese/CWP/CWP_fiscal_l_japanese.yml index c53c90d00..b19de5ddc 100644 --- a/localization/japanese/CWP/CWP_fiscal_l_japanese.yml +++ b/localization/japanese/CWP/CWP_fiscal_l_japanese.yml @@ -112,10 +112,6 @@ cwp_bank_reevaluation.2.desc:0 "In a sudden turn of events, the credit rating of the [GetPlayer.GetAdjectiveNoFlag] [concept_central_bank] has been downgraded from [GetPlayer.GetCustom('bank_credibility_previous_loc')] to [GetPlayer.GetCustom('bank_credibility_loc')] and is now considered [GetPlayer.GetCustom('bank_credibility_loc_desc')], causing ripples of concern throughout the nation. This unforeseen blow has cast a shadow on the bank's stability and ability to maintain its financial commitments." cwp_bank_reevaluation.2.f:0 "We find ourselves at a crossroads, where the consequences of our actions have rippled through the financial fabric of our nation. The trust we once enjoyed has been tested, and our reputation has taken a blow. The future lies uncertain." cwp_bank_reevaluation.2.a:0 "Where did the money go?" - ai_fiscal.1.a:0 "AI option 1.a" - ai_fiscal.1.b:0 "AI option 1.b" - ai_fiscal.2.a:0 "AI option 2.a" - ai_fiscal.3.a:0 "AI option 3.a" je_bretton_woods_agreement:0 "Bretton Woods Agreement" je_bretton_woods_agreement_reason:0 "[SelectLocalization(GetScriptedGui('bretton_woods_is_usa_enabled').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BRETTON_WOODS_USA', 'BRETTON_WOODS_OTHER')]" bretton_woods_agreement_status_desc:0 "Currently #v [GetDataModelSize(GetGlobalList('bretton_woods_members'))]#! Signatory Countries" From 0119bc7056d38724d987ad88f222d57bc4d8c01d Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 05:22:17 +0300 Subject: [PATCH 28/45] added IMR(IMF Reserve Currency) replacing USD as transaction currency --- common/script_values/currency_values.txt | 11 ++++ common/script_values/imf_values.txt | 36 +++++++---- common/scripted_effects/cwp_onaction_imf.txt | 2 +- gfx/interface/icons/cwp_currency/IMR.dds | Bin 0 -> 10944 bytes gfx/interface/icons/cwp_currency/imra.dds | Bin 0 -> 10944 bytes gui/imf_panel.gui | 59 ++++++++++++------ .../english/CWP/CWP_imf_l_english.yml | 36 ++++++----- 7 files changed, 94 insertions(+), 50 deletions(-) create mode 100644 gfx/interface/icons/cwp_currency/IMR.dds create mode 100644 gfx/interface/icons/cwp_currency/imra.dds diff --git a/common/script_values/currency_values.txt b/common/script_values/currency_values.txt index 2d286e16b..3c7b05e4e 100644 --- a/common/script_values/currency_values.txt +++ b/common/script_values/currency_values.txt @@ -221,6 +221,17 @@ currency_difference_to_usd = { } min = min_currency_value } +currency_domestic_to_imf_currency = { + value = imf_reserve_asset_value + divide = player_currency + + min = min_currency_value +} +currency_imr_to_domestic = { + value = country_currency_val + divide = imf_reserve_asset_value + min = min_currency_value +} currency_domestic_to_global_currency = { value = { value = global_var:global_currency.country_currency_val diff --git a/common/script_values/imf_values.txt b/common/script_values/imf_values.txt index c933cd12f..1e793b785 100644 --- a/common/script_values/imf_values.txt +++ b/common/script_values/imf_values.txt @@ -28,13 +28,29 @@ imf_contribution_value = { imf_contribution_natural_growth = { value = imf_contribution_value - multiply = 0.01 + multiply = 0.001 } imf_contribution_percent_value = { value = var:imf_contribution_percent } +imf_reserve_asset_value = { + every_in_global_list = { + variable = imf_members + add = country_currency_val + } + divide = { + value = { + every_in_global_list = { + variable = imf_members + add = 1 + } + } + } + min = min_currency_value +} + imf_contribution_money = { value = income multiply = 4 @@ -56,17 +72,15 @@ imf_contribution_money_weekly = { } -imf_contribution_money_to_usd = { +imf_contribution_money_to_imr = { value = imf_contribution_money - multiply = currency_global_to_domestic + multiply = currency_imr_to_domestic } imf_domestic_currency_debt = { value = imf_debt_value multiply = { - value = { - value = global_var:global_currency.country_currency_val - } + value = imf_reserve_asset_value divide = { value = country_currency_val } @@ -77,9 +91,7 @@ imf_domestic_currency_debt = { imf_domestic_currency_credit = { value = imf_credit_value multiply = { - value = { - value = global_var:global_currency.country_currency_val - } + value = imf_reserve_asset_value divide = { value = country_currency_val } @@ -520,7 +532,7 @@ imf_application_loan_amount = { } imf_application_loan_amount_domestic = { value = imf_application_loan_amount - multiply = currency_domestic_to_global_currency + multiply = currency_domestic_to_imf_currency } imf_application_loan_increase_val = { @@ -541,7 +553,7 @@ imf_application_upfront_principle = { imf_application_upfront_principle_domestic = { value = imf_application_upfront_principle - multiply = currency_domestic_to_global_currency + multiply = currency_domestic_to_imf_currency } imf_application_upfront_principle_change_val = { @@ -861,7 +873,7 @@ country_debt_to_global = { value = country_debt multiply = { value = country_currency_val - divide = global_currency_value + divide = imf_reserve_asset_value } } diff --git a/common/scripted_effects/cwp_onaction_imf.txt b/common/scripted_effects/cwp_onaction_imf.txt index 2c7eadbf2..5477f93d0 100644 --- a/common/scripted_effects/cwp_onaction_imf.txt +++ b/common/scripted_effects/cwp_onaction_imf.txt @@ -33,7 +33,7 @@ onaction_imf_contribution_calculation = { } change_variable = { name = imf_contribution - add = imf_contribution_money_to_usd + add = imf_contribution_money_to_imr } } if = { diff --git a/gfx/interface/icons/cwp_currency/IMR.dds b/gfx/interface/icons/cwp_currency/IMR.dds new file mode 100644 index 0000000000000000000000000000000000000000..e8218f30c5496b31b4e62a6f18239866d49371fa GIT binary patch literal 10944 zcmeI14Nz0r6~}K9)I#4+BMTLA45FNj zGmpT{yZ60&&+q)tJ@2u8{m+<#2%&jmKFWaKmd7<^hKu9D1-t1452?aKwWn9&8?P=;3>!hb`g-W1Yog2Zs=ndV62N zl2|UGxCYuRLOPeoWtK1UMsJ?J%^)^0DTVWfKK+b-&($)h9oY@pY=|W08w_Uc&*hd+ zACJ8-Pl@JA)(n+-urgWZ9N(%4Q?;ilpN!wOEty7)we40?;@);xJXq|^oWRC%@^@@!wR2l`9n6VMhV-z*UgY(5FscXKPT8_y@}v1?n`H@&^I z+12a^H^>=^60>F$IQKtQ5ggHA&7V8qdh7wiauoZ%_vU;*>wKkK(&_v$RLdMNTl+iW zFR3rKz;O*D{uMBCA7bL_O6^yTy(OzhL>2=a*)YEpFbRr1?gR&!2n$C0UutPcJr73P z=89tNx`>Ds*o?R`>-A!`N+bq@=*XoA(`C>0RN%91TXq^JRKN30{jM`ne1y_BY)Fr4 zd{To)OR=~*Un~H#U9U)6_3^oLwB1_KqcYS#%vfaxIB@(_gHQq(l1N-?X$AiV?@aybMfu!lIX{I@YekV(C(!EY`dTZR3xJQZALW+$ z<>dQ)9tG=5h?feZ0gispk4Zdcr>7^kjf}M7VT{`<-VGIScs$$qB5lbJvN~<;ZdFW7 zMknQy77F?Yb4?D3|Cs-OEbyg{DSKL9Y04E**EWu%v7vJC@}@DH(|5SCr)#$cx;UFk=}lu zevWLn>SquptehKEsr|`T#F!7*`xE)E2v~CQ^gFjc8a2GWpF#0bY0?c&>~9V>oLI_R zhS0x1^z@|t%~w>poZtVU3qOJDg;b#;ZN_#q-xpHPxI>Dx%_^lNGnMioJgoYe$Zsyk zAm7>LxAtDpJIU7)L0>6;T63D@E14o^!o7&Zhg6!tF0KzxySGt(&$SxHhlNe%$0rlx z7yZT6GB3|OZ_NJ-$>gA7C054;Sn;Y$4S+QwDWS_fS%b>)>L|Yj)Bk|K6McTAbgFz;X=xeI9 zG!i}t0iH=dMcQ(eEJL=5@@ZC$^9hlJ%OAWgf6xN{2l-6yKc932L&jp+fZez+688U7 z9SmP4n;$4VrN0Q93?_Qo0c*ssEMkZzPIbt{Lhe}|{*ts118onae3&!8O?0sKL~#3$ zKwn7-Hoh;L&-Q72;xt|A0$k(wqI^Wx$N9YSI_@vUgF7bqtaXwhju<(gWcaY%3&#SK zTz|y969?V`dC5e>@$%7j(O8@&iXZ0V#+w*bOlouFM zCDD`*Id5Md6apXn`e3iNTmAI1=?v9hk=9vr-&8tA+rhA2w6gcF_U%{8*NugBfO;4N^XvpTp=V^k>I=c&kpGe>AEJk;`iaer&dkiAeClAohzFzfHMyU?e#m;B z=>Bw##!uG7{Am1h;1AeN*yWEl$_F-P4G8u#{4h7$en`gqH}>Mi4S9Ve{+u;C`7pm( z<1>aO9s^)BUb@tUs>0C4$`|ExVHzL0e$Rivdc(82NPNP2C-;LmtxhEhOCH1{#4`xR zX=4ixogKkXQ5!F!o#)%RkJJy+c*=+P+n!I8Iv_W*F=lfAIrkhsWIZbjFMUAyG^rWT zr$S-9Iebt)i)&yrgrh!_f&FkQpUM^2Q-0Vyo*$Y(f3wSnnZl<@y}N)LSb2`}ajBa* zzinS?=!vBbB}wG@#I3|=r2KWNk21MXFwl0Rn!i8)Y^Q7pDY$+I%KUt{ zLcJTGkU;rN*H71(fZSg`tewnn%i;NjJpWMr5We>M=~BlQjOa$-d12hYWIaUR-^PdV zvmf82KB|&Le=MSW8fTf$C`Mv?{gC-&r+@Me<$vwyBZGAC!0i$VFW(|PYsvbPl2TZB|F-9!D00|2zWTSW>US-n{jnD}1UVhYvA}PE-~v15 z1^-`0k0bpH7-TTyu=7GMCYvq`O|-vv7pV`jV)#}*7udDd`;|KNd^SG6z+UoxM`+?% z^%KvM_Xqut7&&#;==L-%8l8 z$awd|crXuN7Q{}h&q<&cnl1`WBoDll_d634biB|0j^1ZF{Au-oBc2@bG$92?Jb(ur XdT{8$p$D4>9C~o*!4?hQpZxe=4yxjb literal 0 HcmV?d00001 diff --git a/gfx/interface/icons/cwp_currency/imra.dds b/gfx/interface/icons/cwp_currency/imra.dds new file mode 100644 index 0000000000000000000000000000000000000000..635fa60deb158378dad622d91a351f118243cfec GIT binary patch literal 10944 zcmeHLeNafz4L*yN36d8s_kQ8O^q&~p z@w20@dzU|4@i6287av@F7>WjjT=C$F2Uk1{dBDX77axYA!Id9J1(Y>kO)HvSpDStRA(PL6iMB@RfO|_j+$)u<$QTiNed5ZiQ?JiUyWN~Q@HJU4kyJA4 zqn+!8(zwSMgkG;Rcg{y|{lggh=bbt5>_DY%AKag@ms$VhzGHvpp3%qem|)!m`lgWc zY(X9#cdEoKJ~r;;3qnLuE0qrG5Tf-{i3!i$`xX^Vy}N6ty}sOG51)U0xPJep2{w29 zXl+Y7=+kJnvQXT<(72pXT36L^LU9Fda54Dc^DJ)!SGlp)j|YM` zA+`{%a-$HbKzKnXI1Aunfno}TnSZhDh-1F@0{hATCJOX{!1>C;;}K%>ra#hlYjMAH#aTI5qcWR0vrdRx zPY1Rh0sK>vl9Iqbhm3K>ZbaL=F(BPfskAt&Bwtqg1>>ywr*Uru%>@~Zgc8J+%i;*<9he9D>mPXFc^@8zN zm6>%quiX`I0NyQxKS|U_Y2MaFCogRW6U&a}(lmpcJbOw}cRmtftA zAU=7DvmCQ($%#F}{-)2mV!xrIPHS*WD>WPa?v#biAj=1;$p{>M8qFYEhR zLhkDV-y()jUzU~ah;J~>e2B7+gl}Pozqd+=5))Sr=F3;bN6qlT$)A_uqhRJ&m|4j( zu2BJawX`UejJ%Sk0g7H0g*vST}DjyoDL`Eu#@+Br7!vaAqp zLPA0^IV+J@#V69q2d4gbI`hRy^@o`+`%2qWqJ1O~1K*V(_%Rs6_C|zHYz~Lj6A-^^ z>6V?r=hh)~t+~1Iy8(=)xGz{?2#u(%RjC$LHyZ#++YJlW$$>3-}~bYcxzfUkCY!qOM*Kzp+GZ zYkn}GFobX=5|QZAQ`+9Op1^mrS*1GXcHz6^w;%sA2jb1Q$TGN}*pR*oj?3cR&9^mH z+a{`wA>8C-X2xH+Z^>1BzN4{YA)2MgU+mZOg%%5-wjDf2$*MZM~XsibMLDsQc zsK;==He0y;o)%+;F+9F-e-r{U$IsBQBOBqo8jVuvUk&7ei=6*i{@nlj=h36}Z;g5f z{y($VS$~**Z`y-;;%|E-!~?D0$+v>0TQfRA#(Z!(#V^}eN$UCL^z`%v9Z$+hzZPj& zNBTA1`~6xg$&XhoLhlTZnI_o^^b@&%9qJKzp1}ViJ0bK=-OlKvhrck%8%RIbFO4+h zkoZ%v=0bmTO40hN_zXX`kxc${;xni2dm10! z#%$j$*@DA_Kk4a-*DgPOdIR@i+^AnXm&M|+Wf=qw>~4a1L+G#)%gAp*X!msh$Al?N zchChaVn6hsqDup~m+-Sozc>QgBi&~7)|JrT<%GW~KBnC4=bnFFh7a){i7y5p@Q2)Sl*_>1 zBjMAi&!*#>;m@GGBjB?q*NMLqpYe6ILc*Vi;}tDwO_qSPxzO(w75NU?`@@HS{p{E` zBCD6pJjYhs@gcD{d9WX2_{oEOIMAGVhs1|SBpHmyEDJH?l%Mk zT_U5rKkzt=xX?8^-X8>(~?1uPKD%Vgx2bZXOs?>`JK1EPJ7n1%I-*B7VWPWMddeCQv2bB2;ULGv#yghvX-Sqxv2kj;M5qoL= zEc-r`neW>Od~VB(UB83)uab(U?J0F5_Ud$<)Dyw^lYa4gZ`Z{kBoLHPQs?;F79q`# z37>jx`*(@BB?9W%O0d`AU4$6@{#TZ$Z!gJQMB)v?kz)9jZ*iR0?Ev(1UJGm5z~2Ia z;HB>m82uyS=bYdgfARYlm;W3daK(o!J{T^LUspW1;=vUULmqJP!NrH6XmI667av@F I_Ke&%lJ^%m! literal 0 HcmV?d00001 diff --git a/gui/imf_panel.gui b/gui/imf_panel.gui index dba28a8ae..108ffa5bd 100644 --- a/gui/imf_panel.gui +++ b/gui/imf_panel.gui @@ -142,16 +142,32 @@ types imf direction = vertical spacing = 15 flowcontainer = { + margin = { 10 10 } direction = vertical spacing = 25 textbox = { using = tooltip_above - raw_text = "#gold Total Reserves#!: #v [GetPlayer.MakeScope.ScriptValue('imf_reserves')|D][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]#!" + raw_text = "#gold IMR#! Exchange Rate" using = fontsize_large } textbox = { using = tooltip_above - raw_text = "Changing by [GetPlayer.MakeScope.ScriptValue('imf_reserves_growth')|+D][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName] per month" + raw_text = "#v 1#![GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] is [GetPlayer.MakeScope.ScriptValue('currency_domestic_to_imf_currency')|vd] #gold #bold IMR#!#!" + } + + } + flowcontainer = { + margin = { 10 10 } + direction = vertical + spacing = 25 + textbox = { + using = tooltip_above + raw_text = "#gold Total Reserves#!: #v [GetPlayer.MakeScope.ScriptValue('imf_reserves')|D] #gold #bold IMR#!#!" + using = fontsize_large + } + textbox = { + using = tooltip_above + raw_text = "Changing by [GetPlayer.MakeScope.ScriptValue('imf_reserves_growth')|+D] #gold #bold IMR#!#! per month" } } @@ -162,6 +178,7 @@ types imf } } flowcontainer = { + margin = { 10 10 } direction = vertical spacing = 25 textbox = { @@ -185,16 +202,17 @@ types imf direction = vertical spacing = 15 flowcontainer = { + margin = { 10 10 } direction = vertical spacing = 25 textbox = { using = tooltip_above - raw_text = "#gold Total Debt#!: #v [GetPlayer.MakeScope.ScriptValue('imf_global_debt')|D][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]#!" + raw_text = "#gold Total Debt#!: #v [GetPlayer.MakeScope.ScriptValue('imf_global_debt')|D] #gold #bold IMR#!#!#!" using = fontsize_large } textbox = { using = tooltip_above - raw_text = "Changing by [GetPlayer.MakeScope.ScriptValue('imf_debt_interest_growth_global')|-D][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName] per month" + raw_text = "Changing by [GetPlayer.MakeScope.ScriptValue('imf_debt_interest_growth_global')|-D] #gold #bold IMR#!#! per month" } } widget = { @@ -204,6 +222,7 @@ types imf } } flowcontainer = { + margin = { 10 10 } direction = vertical spacing = 25 textbox = { @@ -281,7 +300,7 @@ types imf } textbox = { using = tooltip_above - raw_text = "[GetPlayer.MakeScope.ScriptValue('imf_contribution_value')|D][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "[GetPlayer.MakeScope.ScriptValue('imf_contribution_value')|D] #gold #bold IMR#!#!" using = fontsize_large } } @@ -346,7 +365,7 @@ types imf textbox = { margin_top = 20 using = tooltip_above - raw_text = "#gold IMF Contribution Percent#! | [GetPlayer.MakeScope.ScriptValue('imf_contribution_money')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] > [GetPlayer.MakeScope.ScriptValue('imf_contribution_money_to_usd')|pd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "#gold IMF Contribution Percent#! | [GetPlayer.MakeScope.ScriptValue('imf_contribution_money')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] > [GetPlayer.MakeScope.ScriptValue('imf_contribution_money_to_usd')|pd] #gold #bold IMR#!#!" using = fontsize_large } flowcontainer = { @@ -400,7 +419,7 @@ types imf textbox = { margin_top = 20 using = tooltip_above - raw_text = "#gold IMF Total Debt#! | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|vd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] | [GetPlayer.MakeScope.ScriptValue('imf_debt_value')|vd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "#gold IMF Total Debt#! | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|vd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] | [GetPlayer.MakeScope.ScriptValue('imf_debt_value')|vd] #gold #bold IMR#!#!" using = fontsize_large } flowcontainer = { @@ -430,7 +449,7 @@ types imf spacing = 20 textbox = { using = tooltip_above - raw_text = "#gold IMF Monthly Debt Payment#! | [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value_domestic')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] > [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value')|nd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "#gold IMF Monthly Debt Payment#! | [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value_domestic')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] > [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value')|nd] #gold #bold IMR#!#!" } flowcontainer = { spacing = 10 @@ -478,7 +497,7 @@ types imf spacing = 520 textbox = { using = tooltip_above - raw_text = "#gold IMF Debt Monthly Change#! | [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_change')|-D][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "#gold IMF Debt Monthly Change#! | [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_change')|-D] #gold #bold IMR#!#!" } textbox = { using = tooltip_above @@ -500,7 +519,7 @@ types imf spacing = 600 textbox = { using = tooltip_above - raw_text = "#gold IMF Total Available Credit#! | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_credit')|vd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] | [GetPlayer.MakeScope.ScriptValue('imf_credit_value')|pd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "#gold IMF Total Available Credit#! | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_credit')|vd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] | [GetPlayer.MakeScope.ScriptValue('imf_credit_value')|pd] #gold #bold IMR#!#!" using = fontsize_large } } @@ -548,7 +567,7 @@ types imf spacing = 600 textbox = { using = tooltip_above - raw_text = "#gold IMF Monthly Credit Payment#! | [GetPlayer.MakeScope.ScriptValue('imf_credit_monthly_payment_value_domestic')|pd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] < [GetPlayer.MakeScope.ScriptValue('imf_credit_monthly_payment_value')|pD][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "#gold IMF Monthly Credit Payment#! | [GetPlayer.MakeScope.ScriptValue('imf_credit_monthly_payment_value_domestic')|pd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] < [GetPlayer.MakeScope.ScriptValue('imf_credit_monthly_payment_value')|pD] #gold #bold IMR#!#!" } } flowcontainer = { @@ -620,7 +639,7 @@ types imf } textbox = { using = tooltip_above - raw_text = "[GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]| [GetPlayer.MakeScope.ScriptValue('imf_debt_value')|nd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "[GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]| [GetPlayer.MakeScope.ScriptValue('imf_debt_value')|nd] #gold #bold IMR#!#!" using = fontsize_large } } @@ -799,7 +818,7 @@ types imf margin_top = -10 size = { 200 30 } using = tooltip_above - raw_text = "[GetPlayer.MakeScope.ScriptValue('imf_application_loan_amount_domestic')|pd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]| [GetPlayer.MakeScope.ScriptValue('imf_application_loan_amount')|pd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "[GetPlayer.MakeScope.ScriptValue('imf_application_loan_amount_domestic')|pd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]| [GetPlayer.MakeScope.ScriptValue('imf_application_loan_amount')|pd] #gold #bold IMR#!#!" using = fontsize_large } button = { @@ -895,7 +914,7 @@ types imf margin_top = -10 size = { 200 30 } using = tooltip_above - raw_text = "[GetPlayer.MakeScope.ScriptValue('imf_application_upfront_principle_domestic')|pd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] | [GetPlayer.MakeScope.ScriptValue('imf_application_upfront_principle')|pd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "[GetPlayer.MakeScope.ScriptValue('imf_application_upfront_principle_domestic')|pd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] | [GetPlayer.MakeScope.ScriptValue('imf_application_upfront_principle')|pd] #gold #bold IMR#!#!" using = fontsize_large } button = { @@ -1024,7 +1043,7 @@ types imf spacing = 25 textbox = { using = tooltip_above - raw_text = "Total to be paid with interest: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_total_payment_with_interest')|nd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "Total to be paid with interest: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_total_payment_with_interest')|nd] #gold #bold IMR#!#!" using = fontsize_large } } @@ -1039,17 +1058,17 @@ types imf spacing = 25 textbox = { using = tooltip_above - raw_text = "Annual Payment: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_annual_payment')|nd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "Annual Payment: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_annual_payment')|nd] #gold #bold IMR#!#!" using = fontsize_large } textbox = { using = tooltip_above - raw_text = "Monthly Payment: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_monthly_payment')|nd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "Monthly Payment: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_monthly_payment')|nd] #gold #bold IMR#!#!" using = fontsize_large } textbox = { using = tooltip_above - raw_text = "Weekly Payment: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_weekly_payment')|nd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "Weekly Payment: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_weekly_payment')|nd] #gold #bold IMR#!#!" using = fontsize_large } } @@ -1064,7 +1083,7 @@ types imf spacing = 25 textbox = { using = tooltip_above - raw_text = "Monthly Interest Growth: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_monthly_interest_growth')|nd][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + raw_text = "Monthly Interest Growth: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_monthly_interest_growth')|nd] #gold #bold IMR#!#!" using = fontsize_large } } @@ -1193,7 +1212,7 @@ types imf } blockoverride "rightside1_info" { - raw_text = "#bold #gold [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|D][GetGlobalVariable('global_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]#!#!" + raw_text = "#v [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|D]#! #gold #bold IMR#!#!" } blockoverride "rightside2_info" { diff --git a/localization/english/CWP/CWP_imf_l_english.yml b/localization/english/CWP/CWP_imf_l_english.yml index 8b27a3a22..e9a313ac4 100644 --- a/localization/english/CWP/CWP_imf_l_english.yml +++ b/localization/english/CWP/CWP_imf_l_english.yml @@ -6,10 +6,12 @@ GLOBAL_CURRENCY_ICON: "[GetGlobalVariable('global_currency').GetCountry.MakeScop is_imf_member: "[GetPlayer.GetName] is an #gold IMF#! Member" -IMF_GDP_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF GDP Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_member_gdp_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d]$GLOBAL_CURRENCY_ICON$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d]$GLOBAL_CURRENCY_ICON$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_usd')|+0d]$GLOBAL_CURRENCY_ICON$#!" -IMF_CONTRIBUTION_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d]$GLOBAL_CURRENCY_ICON$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d]$GLOBAL_CURRENCY_ICON$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_usd')|+0d]$GLOBAL_CURRENCY_ICON$#!\n$TAB$Credit Revenue per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_credit_returns_mult')|+0d][Scope.GetCountry.MakeScope.Var('cwp_currency').GetFlagName]#!" +imr: "#gold #bold IMR#!#!" -IMF_DEBT_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d]$GLOBAL_CURRENCY_ICON$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d]$GLOBAL_CURRENCY_ICON$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_usd')|+0d]$GLOBAL_CURRENCY_ICON$#!" +IMF_GDP_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF GDP Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_member_gdp_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d] $imr$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d] $imr$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_usd')|+0d] $imr$#!" +IMF_CONTRIBUTION_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d] $imr$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d] $imr$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_usd')|+0d] $imr$#!\n$TAB$Credit Revenue per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_credit_returns_mult')|+0d][Scope.GetCountry.MakeScope.Var('cwp_currency').GetFlagName]#!" + +IMF_DEBT_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d] $imr$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d] $imr$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_usd')|+0d] $imr$#!" @@ -41,21 +43,21 @@ imf_bailout: "#gold IMF#! Bailout" #Events imf_events.1.t: "#gold #b IMF#!#! Loan Application #p Accepted#!" -imf_events.1.d: "The [concept_imf] has #p accepted#! our application for a loan of [GetPlayer.MakeScope.Var('imf_loan_application_amount').GetValue|pd]$GLOBAL_CURRENCY_ICON$, this loan is considered [GetPlayer.GetCustom('imf_loan_type_loc_accepted')|v].\nWe will be expected to pay off this loan in [GetPlayer.MakeScope.Var('imf_loan_application_payment_due_years_current').GetValue|v0] Years" +imf_events.1.d: "The [concept_imf] has #p accepted#! our application for a loan of [GetPlayer.MakeScope.Var('imf_loan_application_amount').GetValue|pd] $imr$, this loan is considered [GetPlayer.GetCustom('imf_loan_type_loc_accepted')|v].\nWe will be expected to pay off this loan in [GetPlayer.MakeScope.Var('imf_loan_application_payment_due_years_current').GetValue|v0] Years" imf_events.1.f: "Amidst the mayhem of his messy office, [GetPlayer.GetRuler.GetFullNameWithTitle] held a thrilling letter from the IMF, his face beaming with joy. "#s Approved! Can you believe it?#!" he exclaimed, waving the letter like a victory flag.\n\n"#s Even the IMF sees our potential. Time to show them we're worth every penny, and then some!#!"\n\n"#s Watch out world, we're putting the 'fun' in 'funds'!#!" " imf_events.1.a: "Graciously Accept!" imf_events.1.b: "On second thought..." imf_events.2.t: "#gold #b IMF#!#! Loan Application #n Denied#!" -imf_events.2.d: "The [concept_imf] has #n denied#! our application for a loan of [GetPlayer.MakeScope.Var('imf_loan_application_amount').GetValue|pd]$GLOBAL_CURRENCY_ICON$, this loan was to be considered [GetPlayer.GetCustom('imf_loan_type_loc_accepted')|v]." +imf_events.2.d: "The [concept_imf] has #n denied#! our application for a loan of [GetPlayer.MakeScope.Var('imf_loan_application_amount').GetValue|pd] $imr$, this loan was to be considered [GetPlayer.GetCustom('imf_loan_type_loc_accepted')|v]." imf_events.2.f: "Amidst the chaos of his cluttered office, [GetPlayer.GetRuler.GetFullNameWithTitle] held a dreaded letter from the IMF\n\nHis face a mix of disbelief and indignation. "#s Denied? Really? Do they think we're asking for a vacation loan?#!" he exclaimed, waving the letter in disbelief.\n\n"#s I mean, sure, our economy might be a bit chaotic, but c'mon, even a kid with a piggy bank would lend us more!#!"" imf_events.2.a: "Perhaps we should re-evaluate our next application.." imf_events.2.b: "Damn money grubbing IMFers!" imf_events.3.t: "#gold IMF#! Loan Overdue" -imf_events.3.d: "The [concept_imf] has recently contacted us with information regarding our current loan arrangement. It appears we are overdue on our payment of the remaining [GetPlayer.MakeScope.Var('imf_debt').GetValue|nd]$GLOBAL_CURRENCY_ICON$ loan." +imf_events.3.d: "The [concept_imf] has recently contacted us with information regarding our current loan arrangement. It appears we are overdue on our payment of the remaining [GetPlayer.MakeScope.Var('imf_debt').GetValue|nd] $imr$ loan." imf_events.3.f: ""Amidst the chaos of overdue paperwork and diplomatic fiascos, the [GetPlayer.GetRuler.GetFullNameWithTitle]'s face turned as pale as an unpaid invoice. With a nervous chuckle, he quipped, '#s Well, well, well, it seems our country's financial prowess needs a bit of a "due" date extension, shall we say? Don't worry, folks, we're just exercising our diplomatic charm!#!'\n\nAttempting to reassure the nation, he continued, '#s You know, managing a loan is a bit like navigating a traffic jam – it takes time and patience, but we'll get there eventually!#!'" imf_events.3.a: "Request an extension" @@ -92,19 +94,19 @@ has_not_met_imf_standards: "#n Has not met IMF Requirements#!" je_imf_concessionary_loan_reason: "$je_imf_nonconcessionary_loan_reason$" -je_imf_nonconcessionary_loan_reason: "#header Current #gold IMF#! Debt:#!\n$TAB$[GetPlayer.MakeScope.Var('imf_debt').GetValue|nd]$GLOBAL_CURRENCY_ICON$ | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]\n$TOOLTIP_DELIMITER$\n#header Current #gold IMF#! Interest Rate:#!\n$TAB$#v [GetPlayer.MakeScope.Var('imf_interest_rate_domestic').GetValue]%#!\n$TOOLTIP_DELIMITER$\n#header Current #gold IMF#! Loan Type:#!\n$TAB$#v [GetPlayer.GetCustom('imf_debt_type_loc')]#!\n$TOOLTIP_DELIMITER$\n#header Monthly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value')|nD]$GLOBAL_CURRENCY_ICON$#!\n#header Weekly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value')|nD]$GLOBAL_CURRENCY_ICON$#!\n$TOOLTIP_DELIMITER$\n#header IMF Monthly Debt Growth from Interest#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_interest_growth')|nD]$GLOBAL_CURRENCY_ICON$#!\n$TOOLTIP_DELIMITER$\n#header IMF Monthly Loan Change#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_change')|-D]$GLOBAL_CURRENCY_ICON$#!\n$TOOLTIP_DELIMITER$\n#header Debt will be paid in:#!\n$TAB$#v [GetPlayer.GetCustom('imf_debt_pay_off_in_years_loc')]#!" +je_imf_nonconcessionary_loan_reason: "#header Current #gold IMF#! Debt:#!\n$TAB$[GetPlayer.MakeScope.Var('imf_debt').GetValue|nd] $imr$ | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]\n$TOOLTIP_DELIMITER$\n#header Current #gold IMF#! Interest Rate:#!\n$TAB$#v [GetPlayer.MakeScope.Var('imf_interest_rate_domestic').GetValue]%#!\n$TOOLTIP_DELIMITER$\n#header Current #gold IMF#! Loan Type:#!\n$TAB$#v [GetPlayer.GetCustom('imf_debt_type_loc')]#!\n$TOOLTIP_DELIMITER$\n#header Monthly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value')|nD] $imr$#!\n#header Weekly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value')|nD] $imr$#!\n$TOOLTIP_DELIMITER$\n#header IMF Monthly Debt Growth from Interest#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_interest_growth')|nD] $imr$#!\n$TOOLTIP_DELIMITER$\n#header IMF Monthly Loan Change#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_change')|-D] $imr$#!\n$TOOLTIP_DELIMITER$\n#header Debt will be paid in:#!\n$TAB$#v [GetPlayer.GetCustom('imf_debt_pay_off_in_years_loc')]#!" -IMF_LOAN_PAID: "[GetPlayer.GetName] has paid off its #gold IMF#! Loan of [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] | [GetPlayer.MakeScope.Var('imf_debt').GetValue|nd]$GLOBAL_CURRENCY_ICON$" +IMF_LOAN_PAID: "[GetPlayer.GetName] has paid off its #gold IMF#! Loan of [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] | [GetPlayer.MakeScope.Var('imf_debt').GetValue|nd] $imr$" IMF_LOAN_PAID_CONCLUSION: "Will conclude our current loan with the #gold IMF#!" imf_loan_will_pay_off_in_years: "[GetPlayer.MakeScope.ScriptValue('imf_loan_will_pay_off_in_years_floor')] Years and [GetPlayer.MakeScope.ScriptValue('imf_loan_will_pay_off_in_months')|0] Months" imf_loan_will_pay_off_in_years_never: "#n Never#!" je_imf_austerity_measures: "#gold IMF#! Austerity Measures" -je_imf_austerity_measures_reason: "We have failed to pay our debt to the [concept_imf], and as such the #gold IMF#! has implemented austerity measures in [GetPlayer.GetNameNoFlag] in order to repair our financial situation and repay our debt.\n\n#t Current Effects of Austerity:#!\n[GetScriptedGui('showmodifier_austerity').ExecuteTooltip( GuiScope.SetRoot(GetPlayer.MakeScope).End)]\n$TAB$$TAB$#gold Minimum IMF Debt Payment Per Month:#! #v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_percentage')]%#!\n$TOOLTIP_DELIMITER$\nCurrent #gold IMF#! Debt: [GetPlayer.MakeScope.Var('imf_debt').GetValue|nd]$GLOBAL_CURRENCY_ICON$ | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]\n#header Monthly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value')|nD]$GLOBAL_CURRENCY_ICON$#!\n#header Weekly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value')|nD]$GLOBAL_CURRENCY_ICON$#!\nIMF Monthly Loan Change: #v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_change')|-D]$GLOBAL_CURRENCY_ICON$#!\nDebt will be paid in: #v [GetPlayer.GetCustom('imf_debt_pay_off_in_years_loc')]#!\n$TOOLTIP_DELIMITER$\nCurrent Tax Level: #v [GetPlayer.GetCustom('tax_level_loc')]#!\nCurrent Construction Status: #v [GetPlayer.GetCustom('is_construction_loc')]#!" +je_imf_austerity_measures_reason: "We have failed to pay our debt to the [concept_imf], and as such the #gold IMF#! has implemented austerity measures in [GetPlayer.GetNameNoFlag] in order to repair our financial situation and repay our debt.\n\n#t Current Effects of Austerity:#!\n[GetScriptedGui('showmodifier_austerity').ExecuteTooltip( GuiScope.SetRoot(GetPlayer.MakeScope).End)]\n$TAB$$TAB$#gold Minimum IMF Debt Payment Per Month:#! #v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_percentage')]%#!\n$TOOLTIP_DELIMITER$\nCurrent #gold IMF#! Debt: [GetPlayer.MakeScope.Var('imf_debt').GetValue|nd] $imr$ | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]\n#header Monthly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value')|nD] $imr$#!\n#header Weekly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value')|nD] $imr$#!\nIMF Monthly Loan Change: #v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_change')|-D] $imr$#!\nDebt will be paid in: #v [GetPlayer.GetCustom('imf_debt_pay_off_in_years_loc')]#!\n$TOOLTIP_DELIMITER$\nCurrent Tax Level: #v [GetPlayer.GetCustom('tax_level_loc')]#!\nCurrent Construction Status: #v [GetPlayer.GetCustom('is_construction_loc')]#!" je_imf_bailout_loan: "#gold IMF#! Bailout" -je_imf_bailout_loan_reason: "We have requested a bailout from the [concept_imf], and as such the #gold IMF#! has implemented measures in [GetPlayer.GetNameNoFlag] in order to repair our financial situation and repay our debt.\n\n#t Current Effects of #gold IMF#! Bailout:#!\n[GetScriptedGui('showmodifier_bailout').ExecuteTooltip( GuiScope.SetRoot(GetPlayer.MakeScope).End)]\n$TOOLTIP_DELIMITER$\nCurrent #gold IMF#! Debt: [GetPlayer.MakeScope.Var('imf_debt').GetValue|nd]$GLOBAL_CURRENCY_ICON$ | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]\n#header Monthly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value')|nD]$GLOBAL_CURRENCY_ICON$#!\n#header Weekly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value')|nD]$GLOBAL_CURRENCY_ICON$#!\nIMF Monthly Loan Change: #v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_change')|-D]$GLOBAL_CURRENCY_ICON$#!\nDebt will be paid in: #v [GetPlayer.GetCustom('imf_debt_pay_off_in_years_loc')]#!\n$TOOLTIP_DELIMITER$\nCurrent Tax Level: #v [GetPlayer.GetCustom('tax_level_loc')]#!\nCurrent Construction Status: #v [GetPlayer.GetCustom('is_construction_loc')]#!" +je_imf_bailout_loan_reason: "We have requested a bailout from the [concept_imf], and as such the #gold IMF#! has implemented measures in [GetPlayer.GetNameNoFlag] in order to repair our financial situation and repay our debt.\n\n#t Current Effects of #gold IMF#! Bailout:#!\n[GetScriptedGui('showmodifier_bailout').ExecuteTooltip( GuiScope.SetRoot(GetPlayer.MakeScope).End)]\n$TOOLTIP_DELIMITER$\nCurrent #gold IMF#! Debt: [GetPlayer.MakeScope.Var('imf_debt').GetValue|nd] $imr$ | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]\n#header Monthly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value')|nD] $imr$#!\n#header Weekly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value')|nD] $imr$#!\nIMF Monthly Loan Change: #v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_change')|-D] $imr$#!\nDebt will be paid in: #v [GetPlayer.GetCustom('imf_debt_pay_off_in_years_loc')]#!\n$TOOLTIP_DELIMITER$\nCurrent Tax Level: #v [GetPlayer.GetCustom('tax_level_loc')]#!\nCurrent Construction Status: #v [GetPlayer.GetCustom('is_construction_loc')]#!" @@ -127,7 +129,7 @@ IMF_APPROVAL_LONG_TERM_LOAN: "Long Term Loan" IMF_LOAN_APPROVAL_TOOLTIP: "#header Submit this application to the [concept_imf]#!\n\nThe #gold IMF#! will review our application and return to us with an answer in a few weeks\n$TOOLTIP_DELIMITER$\nThe #gold IMF's#! current chance of accepting our application is: [GetPlayer.MakeScope.ScriptValue('imf_application_loan_approval_chance_div')|+1%]\nThis is due to:\n[GetPlayer.MakeScope.GetScriptValueDesc('imf_application_loan_approval_chance')]" ################### -IMF_APPLICATION_GDP_TOOLTIP_FORMAT: "$TAB$$GLOBAL_CURRENCY_ICON$$VALUE|+d$ from $KEY$" +IMF_APPLICATION_GDP_TOOLTIP_FORMAT: "$TAB$$imr$ $VALUE|+d$ from $KEY$" IMF_APPLICATION_GDP: "[concept_gdp]" IMF_APPLICATION_AT_WAR: "#t Being at War#!" IMF_APPLICATION_REQUIREMENTS: "#tooltippable #tooltip:CURRENT_ECONOMIC_LAWS_POLICIES Current Economic Laws and Policies#!#!" @@ -136,9 +138,9 @@ IMF_CURRENT_ECONOMT_LAW_POLICIES_TOOLTIP_FORMAT: "#v $VALUE|$%#! from $KEY$" CURRENT_ECONOMIC_LAWS_POLICIES: "[GetPlayer.MakeScope.GetScriptValueDesc('imf_requirements_meeting')]" IMF_CURRENT_ECONOMY_SOL: "Average [concept_sol]" -IMF_LOAN_APPLICATION_INCREASE_VALUE_TOOLTIP: "Increase the amount of money we are applying for from the [concept_imf]\n\nThe maximum amount of money we can request is [GetPlayer.MakeScope.ScriptValue('imf_application_loan_max_value')|pd]$GLOBAL_CURRENCY_ICON$\n$TOOLTIP_DELIMITER$\nOur limit is due to:\n[GetPlayer.MakeScope.GetScriptValueDesc('imf_application_loan_max_value')]" +IMF_LOAN_APPLICATION_INCREASE_VALUE_TOOLTIP: "Increase the amount of money we are applying for from the [concept_imf]\n\nThe maximum amount of money we can request is [GetPlayer.MakeScope.ScriptValue('imf_application_loan_max_value')|pd] $imr$\n$TOOLTIP_DELIMITER$\nOur limit is due to:\n[GetPlayer.MakeScope.GetScriptValueDesc('imf_application_loan_max_value')]" -IMF_LOAN_APPLICATION_DECREASE_VALUE_TOOLTIP: "Decrease the amount of money we are applying for from the [concept_imf]\n\nThe maximum amount of money we can request is [GetPlayer.MakeScope.ScriptValue('imf_application_loan_max_value')|pd]$GLOBAL_CURRENCY_ICON$\n$TOOLTIP_DELIMITER$\nOur limit is due to:\n[GetPlayer.MakeScope.GetScriptValueDesc('imf_application_loan_max_value')]" +IMF_LOAN_APPLICATION_DECREASE_VALUE_TOOLTIP: "Decrease the amount of money we are applying for from the [concept_imf]\n\nThe maximum amount of money we can request is [GetPlayer.MakeScope.ScriptValue('imf_application_loan_max_value')|pd] $imr$\n$TOOLTIP_DELIMITER$\nOur limit is due to:\n[GetPlayer.MakeScope.GetScriptValueDesc('imf_application_loan_max_value')]" ################### IMF_DUE_DATE_INCREASE_TOOLTIP: "Increase the amount of years in which we will be expected to pay off our debt.\n\n#i Failing to pay our debt after this period may cause economic turmoil and austerity measures put in place.#!" @@ -190,9 +192,9 @@ DECREASE_UPFRONT_PRINCIPAL_IMF_TOOLTIP: "Decrease the amount of money transfered IMF_ACTION_NOTIFICATION_GROUP: "[concept_imf] Issues" IMF_ACTION_NOTIFICATION_GROUP_desc: "Issues related to the #gold IMF#!" notification_IMF_DEBT_TAKEN_NOTIFICATION_tooltip: "#header $notification_IMF_DEBT_TAKEN_NOTIFICATION_name$#!\n$TOOLTIP_DELIMITER$\n$notification_IMF_DEBT_TAKEN_NOTIFICATION_desc$" -notification_IMF_DEBT_TAKEN_NOTIFICATION_name: "[SCOPE.sC('originator').GetName] took a loan of [SCOPE.sC('originator').MakeScope.Var('imf_loan_application_amount').GetValue|pd]$GLOBAL_CURRENCY_ICON$" -notification_IMF_DEBT_TAKEN_NOTIFICATION_desc: "[SCOPE.sC('originator').GetName] has taken a loan of [SCOPE.sC('originator').MakeScope.Var('imf_loan_application_amount').GetValue|pd]$GLOBAL_CURRENCY_ICON$ from the [concept_imf]" +notification_IMF_DEBT_TAKEN_NOTIFICATION_name: "[SCOPE.sC('originator').GetName] took a loan of [SCOPE.sC('originator').MakeScope.Var('imf_loan_application_amount').GetValue|pd] $imr$" +notification_IMF_DEBT_TAKEN_NOTIFICATION_desc: "[SCOPE.sC('originator').GetName] has taken a loan of [SCOPE.sC('originator').MakeScope.Var('imf_loan_application_amount').GetValue|pd] $imr$ from the [concept_imf]" notification_IMF_BAILOUT_TAKEN_NOTIFICATION_tooltip: "#header $notification_IMF_DEBT_TAKEN_NOTIFICATION_name$#!\n$TOOLTIP_DELIMITER$\n$notification_IMF_DEBT_TAKEN_NOTIFICATION_desc$" -notification_IMF_BAILOUT_TAKEN_NOTIFICATION_name: "[SCOPE.sC('originator').GetName] bailed out of [SCOPE.sC('originator').MakeScope.ScriptValue('country_debt')|pd]$GLOBAL_CURRENCY_ICON$ debt" -notification_IMF_BAILOUT_TAKEN_NOTIFICATION_desc: "[SCOPE.sC('originator').GetName] has been bailed out of [SCOPE.sC('originator').MakeScope.ScriptValue('country_debt')|pd]$GLOBAL_CURRENCY_ICON$ debt via the [concept_imf]" \ No newline at end of file +notification_IMF_BAILOUT_TAKEN_NOTIFICATION_name: "[SCOPE.sC('originator').GetName] bailed out of [SCOPE.sC('originator').MakeScope.ScriptValue('country_debt')|pd] $imr$ debt" +notification_IMF_BAILOUT_TAKEN_NOTIFICATION_desc: "[SCOPE.sC('originator').GetName] has been bailed out of [SCOPE.sC('originator').MakeScope.ScriptValue('country_debt')|pd] $imr$ debt via the [concept_imf]" \ No newline at end of file From 83b893f6a3c2741329074edc984be756d34cd83a Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 05:34:44 +0300 Subject: [PATCH 29/45] fixed some values --- common/script_values/fiscal_ai_values.txt | 5 +++++ common/script_values/imf_values.txt | 6 +++--- common/scripted_effects/cwp_onaction_fiscal_ai.txt | 4 ++-- common/scripted_guis/fiscal_sgui.txt | 4 ++-- gui/imf_panel.gui | 2 +- localization/english/CWP/CWP_fiscal_l_english.yml | 2 +- localization/english/CWP/CWP_imf_l_english.yml | 6 +++--- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/common/script_values/fiscal_ai_values.txt b/common/script_values/fiscal_ai_values.txt index e17db9671..b46b1a8db 100644 --- a/common/script_values/fiscal_ai_values.txt +++ b/common/script_values/fiscal_ai_values.txt @@ -4,6 +4,11 @@ max = 100 min = -1.5 } +player_ideal_interest_rate = { + value = ai_ideal_interest_rate + round = yes +} + ai_interest_from_inflation = { # Reduce existing inflation/deflation value = 0 if = { diff --git a/common/script_values/imf_values.txt b/common/script_values/imf_values.txt index 1e793b785..2486ee1bb 100644 --- a/common/script_values/imf_values.txt +++ b/common/script_values/imf_values.txt @@ -295,12 +295,12 @@ imf_reserves_growth = { every_in_global_list = { # From member contribution variable = imf_members add = { - value = imf_contribution_money_to_usd + value = imf_contribution_money_to_imr desc = IMF_APPLICATION_GDP format = "IMF_APPLICATION_GDP_TOOLTIP_FORMAT" } add = { - value = imf_contribution_natural_growth + value = imf_contribution_money_to_imr desc = IMF_APPLICATION_GDP format = "IMF_APPLICATION_GDP_TOOLTIP_FORMAT" } @@ -310,7 +310,7 @@ imf_reserves_growth_gui = { value = { every_in_global_list = { # From member contribution variable = imf_members - add = imf_contribution_money_to_usd + add = imf_contribution_money_to_imr } desc = IMF_RESERVES_GROWTH_MEMBER_CONTRIBUTION format = "IMF_APPLICATION_GDP_TOOLTIP_FORMAT" diff --git a/common/scripted_effects/cwp_onaction_fiscal_ai.txt b/common/scripted_effects/cwp_onaction_fiscal_ai.txt index 29a7bd8d9..39b4ac570 100644 --- a/common/scripted_effects/cwp_onaction_fiscal_ai.txt +++ b/common/scripted_effects/cwp_onaction_fiscal_ai.txt @@ -285,7 +285,7 @@ onaction_ai_devalue_revalue_calculation = { } set_variable = { name = altered_currency - months = 12 + years = 5 } } 1 = { @@ -310,7 +310,7 @@ onaction_ai_devalue_revalue_calculation = { } set_variable = { name = altered_currency - months = 12 + years = 5 } } } diff --git a/common/scripted_guis/fiscal_sgui.txt b/common/scripted_guis/fiscal_sgui.txt index 78a64acaa..240b938ef 100644 --- a/common/scripted_guis/fiscal_sgui.txt +++ b/common/scripted_guis/fiscal_sgui.txt @@ -273,7 +273,7 @@ revalue_currency = { } set_variable = { name = altered_currency - months = 12 + years = 5 } } } @@ -301,7 +301,7 @@ redenominate_currency = { } set_variable = { name = altered_currency - months = 12 + years = 5 } } } diff --git a/gui/imf_panel.gui b/gui/imf_panel.gui index 108ffa5bd..eee9d4d90 100644 --- a/gui/imf_panel.gui +++ b/gui/imf_panel.gui @@ -365,7 +365,7 @@ types imf textbox = { margin_top = 20 using = tooltip_above - raw_text = "#gold IMF Contribution Percent#! | [GetPlayer.MakeScope.ScriptValue('imf_contribution_money')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] > [GetPlayer.MakeScope.ScriptValue('imf_contribution_money_to_usd')|pd] #gold #bold IMR#!#!" + raw_text = "#gold IMF Contribution Percent#! | [GetPlayer.MakeScope.ScriptValue('imf_contribution_money')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] > [GetPlayer.MakeScope.ScriptValue('imf_contribution_money_to_imr')|pd] #gold #bold IMR#!#!" using = fontsize_large } flowcontainer = { diff --git a/localization/english/CWP/CWP_fiscal_l_english.yml b/localization/english/CWP/CWP_fiscal_l_english.yml index 0ffd4af85..ae428f422 100644 --- a/localization/english/CWP/CWP_fiscal_l_english.yml +++ b/localization/english/CWP/CWP_fiscal_l_english.yml @@ -17,7 +17,7 @@ BLOCKED_DUE_TO_HEAD: "[concept_central_bank] is not the leading bank for the cur ALTERED_CURRENCY: "#i You have recently altered your currency. You may alter it again every year." -ALTER_INTEREST_RATES: "#t Change your [concept_interest_rate]#!\n\nInterest Rates affect your inflation rate and the strength of your currency, higher interest rates will decrease inflation growth and increase your currency's value over time.\n\n[SelectLocalization(GetScriptedGui('can_set_interest_rates_law').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_FROM_GOLD_STANDARD', '')]\n[SelectLocalization(GetScriptedGui('can_set_interest_rates_variable').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_FROM_CHANGE_INTEREST', '')]\n#i Once you set an interest rate, click the middle button to submit the rate#!" +ALTER_INTEREST_RATES: "#t Change your [concept_interest_rate]#!\nRecommended [concept_interest_rate]: [GetPlayer.MakeScope.ScriptValue('player_ideal_interest_rate')|vd%]\n$TOOLTIP_DELIMITER$\nInterest Rates affect your inflation rate and the strength of your currency, higher interest rates will decrease inflation growth and increase your currency's value over time.\n\n[SelectLocalization(GetScriptedGui('can_set_interest_rates_law').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_FROM_GOLD_STANDARD', '')]\n[SelectLocalization(GetScriptedGui('can_set_interest_rates_variable').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_FROM_CHANGE_INTEREST', '')]\n#i Once you set an interest rate, click the middle button to submit the rate#!" BLOCKED_FROM_GOLD_STANDARD: "Does not have #v $law_gold_standard$#! or #v Pegged Currency#! law @red_cross!" BLOCKED_FROM_CHANGE_INTEREST: "Did not change interest rates this quarter @red_cross!" diff --git a/localization/english/CWP/CWP_imf_l_english.yml b/localization/english/CWP/CWP_imf_l_english.yml index e9a313ac4..f0aa9b400 100644 --- a/localization/english/CWP/CWP_imf_l_english.yml +++ b/localization/english/CWP/CWP_imf_l_english.yml @@ -8,10 +8,10 @@ is_imf_member: "[GetPlayer.GetName] is an #gold IMF#! Member" imr: "#gold #bold IMR#!#!" -IMF_GDP_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF GDP Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_member_gdp_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d] $imr$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d] $imr$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_usd')|+0d] $imr$#!" -IMF_CONTRIBUTION_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d] $imr$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d] $imr$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_usd')|+0d] $imr$#!\n$TAB$Credit Revenue per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_credit_returns_mult')|+0d][Scope.GetCountry.MakeScope.Var('cwp_currency').GetFlagName]#!" +IMF_GDP_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF GDP Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_member_gdp_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d] $imr$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d] $imr$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_imr')|+0d] $imr$#!" +IMF_CONTRIBUTION_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d] $imr$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d] $imr$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_imr')|+0d] $imr$#!\n$TAB$Credit Revenue per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_credit_returns_mult')|+0d][Scope.GetCountry.MakeScope.Var('cwp_currency').GetFlagName]#!" -IMF_DEBT_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d] $imr$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d] $imr$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_usd')|+0d] $imr$#!" +IMF_DEBT_PIECHART_TOOLTIP: "#header [Scope.GetCountry.GetName]#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Percentage: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_share')|%]#!\n$TAB$IMF Contribution Total: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_value')|0d] $imr$#!\n$TAB$IMF Debt: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_debt_value')|n0d] $imr$#!\n$TOOLTIP_DELIMITER$\n$TAB$IMF Contribution Per Month: #variable [Scope.GetCountry.MakeScope.ScriptValue('imf_contribution_money_to_imr')|+0d] $imr$#!" From bff6c2f5c4279e0486d1d8b30bdb36a7a480221a Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 05:53:41 +0300 Subject: [PATCH 30/45] reduced imf reserves at start --- common/history/countries/bel - belgium.txt | 2 +- common/history/countries/bol - bolivia.txt | 2 +- common/history/countries/brz - brazil.txt | 2 +- common/history/countries/can - canada.txt | 2 +- common/history/countries/chl - chile.txt | 2 +- common/history/countries/clm - colombia.txt | 2 +- common/history/countries/cos - costa rica.txt | 2 +- common/history/countries/cub - cuba.txt | 2 +- common/history/countries/czh - czechoslovakia.txt | 2 +- common/history/countries/dcr - dominican rep.txt | 2 +- common/history/countries/den - denmark.txt | 2 +- common/history/countries/egy - egypt.txt | 2 +- common/history/countries/els - el salvador.txt | 2 +- common/history/countries/eth - ethiopia.txt | 2 +- common/history/countries/fra - france.txt | 2 +- common/history/countries/gbr - great britain.txt | 2 +- common/history/countries/gre - greece.txt | 2 +- common/history/countries/gua - guatemala.txt | 2 +- common/history/countries/hnd - india.txt | 2 +- common/history/countries/hon - honduras.txt | 2 +- common/history/countries/icl - iceland.txt | 2 +- common/history/countries/irq - iraq.txt | 2 +- common/history/countries/ity - italy.txt | 2 +- common/history/countries/leb - lebanon.txt | 2 +- common/history/countries/lux - luxembourg.txt | 2 +- common/history/countries/mex - mexico.txt | 2 +- common/history/countries/net - netherlands.txt | 2 +- common/history/countries/nic - nicaragua.txt | 2 +- common/history/countries/nor - norway.txt | 2 +- common/history/countries/per - persia.txt | 2 +- common/history/countries/peu - peru.txt | 2 +- common/history/countries/phi - philippines.txt | 2 +- common/history/countries/pnm - panama.txt | 2 +- common/history/countries/pol - poland.txt | 2 +- common/history/countries/prg - paraguay.txt | 2 +- common/history/countries/roc - nationalist china.txt | 2 +- common/history/countries/saf - south africa.txt | 2 +- common/history/countries/syr - syria.txt | 2 +- common/history/countries/tur - turkey.txt | 2 +- common/history/countries/uru - uruguay.txt | 2 +- common/history/countries/usa - usa.txt | 2 +- common/history/countries/vnz - venezuela.txt | 2 +- common/history/countries/yug - yugoslavia.txt | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/common/history/countries/bel - belgium.txt b/common/history/countries/bel - belgium.txt index afdf7a37a..f54033ef0 100644 --- a/common/history/countries/bel - belgium.txt +++ b/common/history/countries/bel - belgium.txt @@ -42,7 +42,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 55386230 + contributionValue = 5538623 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/bol - bolivia.txt b/common/history/countries/bol - bolivia.txt index 54b82f441..0987374d6 100644 --- a/common/history/countries/bol - bolivia.txt +++ b/common/history/countries/bol - bolivia.txt @@ -41,7 +41,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 2461610 + contributionValue = 246161 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/brz - brazil.txt b/common/history/countries/brz - brazil.txt index 473353fae..cc41c4f4f 100644 --- a/common/history/countries/brz - brazil.txt +++ b/common/history/countries/brz - brazil.txt @@ -47,7 +47,7 @@ set_imf_starting_values = { debtValue = 3692046 creditValue = 1230682 - contributionValue = 2461610 + contributionValue = 246161 debtYearsValue = 20 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/can - canada.txt b/common/history/countries/can - canada.txt index 106ce26b4..54fc88de8 100644 --- a/common/history/countries/can - canada.txt +++ b/common/history/countries/can - canada.txt @@ -43,7 +43,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 73848300 + contributionValue = 7384830 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/chl - chile.txt b/common/history/countries/chl - chile.txt index fe89c2ea5..37f6044b3 100644 --- a/common/history/countries/chl - chile.txt +++ b/common/history/countries/chl - chile.txt @@ -29,7 +29,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 12308050 + contributionValue = 1230805 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/clm - colombia.txt b/common/history/countries/clm - colombia.txt index 1d209bae2..b2f9fa647 100644 --- a/common/history/countries/clm - colombia.txt +++ b/common/history/countries/clm - colombia.txt @@ -39,7 +39,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 12308050 + contributionValue = 1230805 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/cos - costa rica.txt b/common/history/countries/cos - costa rica.txt index b94d3c8d9..2681dede4 100644 --- a/common/history/countries/cos - costa rica.txt +++ b/common/history/countries/cos - costa rica.txt @@ -42,7 +42,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 1230800 + contributionValue = 123080 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/cub - cuba.txt b/common/history/countries/cub - cuba.txt index 1b1467d2d..ddfd5b010 100644 --- a/common/history/countries/cub - cuba.txt +++ b/common/history/countries/cub - cuba.txt @@ -31,7 +31,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 12308050 + contributionValue = 1230805 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/czh - czechoslovakia.txt b/common/history/countries/czh - czechoslovakia.txt index 438d5a82c..5b0a0c275 100644 --- a/common/history/countries/czh - czechoslovakia.txt +++ b/common/history/countries/czh - czechoslovakia.txt @@ -39,7 +39,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 30770120 + contributionValue = 3077012 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/dcr - dominican rep.txt b/common/history/countries/dcr - dominican rep.txt index 06f2de54c..d834e4ea3 100644 --- a/common/history/countries/dcr - dominican rep.txt +++ b/common/history/countries/dcr - dominican rep.txt @@ -38,7 +38,7 @@ set_imf_starting_values = { debtValue = 123068 creditValue = 41022 - contributionValue = 1230800 + contributionValue = 123080 debtYearsValue = 10 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/den - denmark.txt b/common/history/countries/den - denmark.txt index 25d5965ed..127f096ed 100644 --- a/common/history/countries/den - denmark.txt +++ b/common/history/countries/den - denmark.txt @@ -48,7 +48,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 16738940 + contributionValue = 1673894 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/egy - egypt.txt b/common/history/countries/egy - egypt.txt index 6aed2aa93..9719bcae8 100644 --- a/common/history/countries/egy - egypt.txt +++ b/common/history/countries/egy - egypt.txt @@ -27,7 +27,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 11077240 + contributionValue = 1107724 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/els - el salvador.txt b/common/history/countries/els - el salvador.txt index c344fd07b..0cc5ee089 100644 --- a/common/history/countries/els - el salvador.txt +++ b/common/history/countries/els - el salvador.txt @@ -46,7 +46,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 615400 + contributionValue = 61540 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/eth - ethiopia.txt b/common/history/countries/eth - ethiopia.txt index 290920094..a3ff14162 100644 --- a/common/history/countries/eth - ethiopia.txt +++ b/common/history/countries/eth - ethiopia.txt @@ -15,7 +15,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 1476960 + contributionValue = 147696 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/fra - france.txt b/common/history/countries/fra - france.txt index 216e0c5f8..71da1c32c 100644 --- a/common/history/countries/fra - france.txt +++ b/common/history/countries/fra - france.txt @@ -48,7 +48,7 @@ set_imf_starting_values = { debtValue = 68000000 creditValue = 32000000 - contributionValue = 129234530 + contributionValue = 12923453 debtYearsValue = 30 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/gbr - great britain.txt b/common/history/countries/gbr - great britain.txt index 54bb7be61..3d0157818 100644 --- a/common/history/countries/gbr - great britain.txt +++ b/common/history/countries/gbr - great britain.txt @@ -64,7 +64,7 @@ set_imf_starting_values = { debtValue = 227000000 creditValue = 6350000 - contributionValue = 320009330 + contributionValue = 32000933 debtYearsValue = 25 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/gre - greece.txt b/common/history/countries/gre - greece.txt index 204d82cc4..5b336e97d 100644 --- a/common/history/countries/gre - greece.txt +++ b/common/history/countries/gre - greece.txt @@ -39,7 +39,7 @@ set_imf_starting_values = { debtValue = 984545 creditValue = 328181 - contributionValue = 9846440 + contributionValue = 984644 debtYearsValue = 15 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/gua - guatemala.txt b/common/history/countries/gua - guatemala.txt index 622c6e5c8..df73841b6 100644 --- a/common/history/countries/gua - guatemala.txt +++ b/common/history/countries/gua - guatemala.txt @@ -39,7 +39,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 1230800 + contributionValue = 123080 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/hnd - india.txt b/common/history/countries/hnd - india.txt index 919c98521..ee4c3e27d 100644 --- a/common/history/countries/hnd - india.txt +++ b/common/history/countries/hnd - india.txt @@ -61,7 +61,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 98464410 + contributionValue = 9846441 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/hon - honduras.txt b/common/history/countries/hon - honduras.txt index 8558bb9a2..fa1a532bd 100644 --- a/common/history/countries/hon - honduras.txt +++ b/common/history/countries/hon - honduras.txt @@ -39,7 +39,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 615400 + contributionValue = 61540 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/icl - iceland.txt b/common/history/countries/icl - iceland.txt index 279ab576a..20ba9890f 100644 --- a/common/history/countries/icl - iceland.txt +++ b/common/history/countries/icl - iceland.txt @@ -39,7 +39,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 246160 + contributionValue = 24616 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/irq - iraq.txt b/common/history/countries/irq - iraq.txt index aa3ce7fef..30b0b23f7 100644 --- a/common/history/countries/irq - iraq.txt +++ b/common/history/countries/irq - iraq.txt @@ -40,7 +40,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 1969280 + contributionValue = 196928 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/ity - italy.txt b/common/history/countries/ity - italy.txt index 04e023953..7596f1d2d 100644 --- a/common/history/countries/ity - italy.txt +++ b/common/history/countries/ity - italy.txt @@ -34,7 +34,7 @@ set_imf_starting_values = { debtValue = 4430455 creditValue = 1476818 - contributionValue = 44308980 + contributionValue = 4430898 debtYearsValue = 15 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/leb - lebanon.txt b/common/history/countries/leb - lebanon.txt index 39300bc21..022606e31 100644 --- a/common/history/countries/leb - lebanon.txt +++ b/common/history/countries/leb - lebanon.txt @@ -39,7 +39,7 @@ set_imf_starting_values = { debtValue = 110761 creditValue = 36920 - contributionValue = 1107720 + contributionValue = 110772 debtYearsValue = 5 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/lux - luxembourg.txt b/common/history/countries/lux - luxembourg.txt index ac0a4fdd4..9eb96d0dc 100644 --- a/common/history/countries/lux - luxembourg.txt +++ b/common/history/countries/lux - luxembourg.txt @@ -37,7 +37,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 2461610 + contributionValue = 246161 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/mex - mexico.txt b/common/history/countries/mex - mexico.txt index bb7daa3cf..880f1a47d 100644 --- a/common/history/countries/mex - mexico.txt +++ b/common/history/countries/mex - mexico.txt @@ -40,7 +40,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 22154490 + contributionValue = 2215449 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/net - netherlands.txt b/common/history/countries/net - netherlands.txt index 2a345bbea..4d6a3fd34 100644 --- a/common/history/countries/net - netherlands.txt +++ b/common/history/countries/net - netherlands.txt @@ -48,7 +48,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 67694280 + contributionValue = 6769428 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/nic - nicaragua.txt b/common/history/countries/nic - nicaragua.txt index 6ac4045f2..a5dd6a5b4 100644 --- a/common/history/countries/nic - nicaragua.txt +++ b/common/history/countries/nic - nicaragua.txt @@ -38,7 +38,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 492320 + contributionValue = 49232 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/nor - norway.txt b/common/history/countries/nor - norway.txt index fe5893122..d18fa5f55 100644 --- a/common/history/countries/nor - norway.txt +++ b/common/history/countries/nor - norway.txt @@ -40,7 +40,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 12308050 + contributionValue = 1230805 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/per - persia.txt b/common/history/countries/per - persia.txt index a4947babb..4d6ad2311 100644 --- a/common/history/countries/per - persia.txt +++ b/common/history/countries/per - persia.txt @@ -38,7 +38,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 6154020 + contributionValue = 615402 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/peu - peru.txt b/common/history/countries/peu - peru.txt index 8fa624922..4f4185c10 100644 --- a/common/history/countries/peu - peru.txt +++ b/common/history/countries/peu - peru.txt @@ -42,7 +42,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 6154020 + contributionValue = 615402 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/phi - philippines.txt b/common/history/countries/phi - philippines.txt index a5f218c85..06876c228 100644 --- a/common/history/countries/phi - philippines.txt +++ b/common/history/countries/phi - philippines.txt @@ -30,7 +30,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 3692410 + contributionValue = 369241 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/pnm - panama.txt b/common/history/countries/pnm - panama.txt index ed3b25fe5..e3e307d54 100644 --- a/common/history/countries/pnm - panama.txt +++ b/common/history/countries/pnm - panama.txt @@ -18,7 +18,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 12300 + contributionValue = 1230 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/pol - poland.txt b/common/history/countries/pol - poland.txt index 8512838cb..344dd6a86 100644 --- a/common/history/countries/pol - poland.txt +++ b/common/history/countries/pol - poland.txt @@ -39,7 +39,7 @@ set_imf_starting_values = { debtValue = 3076705 creditValue = 1025568 - contributionValue = 30770120 + contributionValue = 3077012 debtYearsValue = 15 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/prg - paraguay.txt b/common/history/countries/prg - paraguay.txt index 249cc9538..a0daef8b2 100644 --- a/common/history/countries/prg - paraguay.txt +++ b/common/history/countries/prg - paraguay.txt @@ -21,7 +21,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 492320 + contributionValue = 49232 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/roc - nationalist china.txt b/common/history/countries/roc - nationalist china.txt index d110787ea..b8b37931b 100644 --- a/common/history/countries/roc - nationalist china.txt +++ b/common/history/countries/roc - nationalist china.txt @@ -62,7 +62,7 @@ set_imf_starting_values = { debtValue = 13537502 creditValue = 4512500 - contributionValue = 135388560 + contributionValue = 13538856 debtYearsValue = 20 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/saf - south africa.txt b/common/history/countries/saf - south africa.txt index 4e5038af1..76a803cec 100644 --- a/common/history/countries/saf - south africa.txt +++ b/common/history/countries/saf - south africa.txt @@ -40,7 +40,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 24616100 + contributionValue = 2461610 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/syr - syria.txt b/common/history/countries/syr - syria.txt index 9178afc3f..accb66226 100644 --- a/common/history/countries/syr - syria.txt +++ b/common/history/countries/syr - syria.txt @@ -41,7 +41,7 @@ set_imf_starting_values = { debtValue = 159988 creditValue = 53329 - contributionValue = 1600040 + contributionValue = 160004 debtYearsValue = 5 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/tur - turkey.txt b/common/history/countries/tur - turkey.txt index a69154c69..afbd3c02f 100644 --- a/common/history/countries/tur - turkey.txt +++ b/common/history/countries/tur - turkey.txt @@ -42,7 +42,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 10584920 + contributionValue = 1058492 debtYearsValue = 0 interestRateValue = 2.5 loanType = 1 diff --git a/common/history/countries/uru - uruguay.txt b/common/history/countries/uru - uruguay.txt index a3e5eb818..c232671c9 100644 --- a/common/history/countries/uru - uruguay.txt +++ b/common/history/countries/uru - uruguay.txt @@ -41,7 +41,7 @@ set_imf_starting_values = { debtValue = 369204 creditValue = 123068 - contributionValue = 3692410 + contributionValue = 369241 debtYearsValue = 10 interestRateValue = 0 loanType = 1 diff --git a/common/history/countries/usa - usa.txt b/common/history/countries/usa - usa.txt index a0a4b5cf6..e2c5fe1d6 100644 --- a/common/history/countries/usa - usa.txt +++ b/common/history/countries/usa - usa.txt @@ -76,7 +76,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 676942820 + contributionValue = 67694282 debtYearsValue = 0 interestRateValue = 0 loanType = 1 diff --git a/common/history/countries/vnz - venezuela.txt b/common/history/countries/vnz - venezuela.txt index c2bc61413..f8b1fbc30 100644 --- a/common/history/countries/vnz - venezuela.txt +++ b/common/history/countries/vnz - venezuela.txt @@ -43,7 +43,7 @@ set_imf_starting_values = { debtValue = 0 creditValue = 0 - contributionValue = 3692410 + contributionValue = 369241 debtYearsValue = 0 interestRateValue = 0 loanType = 1 diff --git a/common/history/countries/yug - yugoslavia.txt b/common/history/countries/yug - yugoslavia.txt index f5c6b7f04..af81a56a9 100644 --- a/common/history/countries/yug - yugoslavia.txt +++ b/common/history/countries/yug - yugoslavia.txt @@ -40,7 +40,7 @@ set_imf_starting_values = { debtValue = 1476818 creditValue = 492272 - contributionValue = 14769660 + contributionValue = 1476966 debtYearsValue = 10 interestRateValue = 0 loanType = 1 From 41d3599e11fdd9cda868194698f77c4fda60101c Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 05:53:53 +0300 Subject: [PATCH 31/45] fixed double localization --- localization/english/CWP/CWP_fiscal_l_english.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/localization/english/CWP/CWP_fiscal_l_english.yml b/localization/english/CWP/CWP_fiscal_l_english.yml index ae428f422..a3ea768b1 100644 --- a/localization/english/CWP/CWP_fiscal_l_english.yml +++ b/localization/english/CWP/CWP_fiscal_l_english.yml @@ -9,13 +9,13 @@ CURRENT_INTEREST_RATE: "#v [GetPlayer.MakeScope.ScriptValue('interest_rate')|d%] TARGET_INTEREST_RATE: "#p [GetPlayer.MakeScope.ScriptValue('interest_rate_gui')|d%]#!" DEVALUE_CURRENCY_TOOLTIP: "Devalue your currency by #v [GetPlayer.MakeScope.ScriptValue('alter_currency_value_tooltip')|d%]#!, decreasing its value to #v [GetPlayer.MakeScope.ScriptValue('currency_difference_to_global_devalue')|+%]#! the global average\n\n[SelectLocalization(GetPlayer.MakeScope.Var('altered_currency').IsSet, 'ALTERED_CURRENCY', '')]\n[SelectLocalization(GetScriptedGui('alter_currency_blocked_due_pegged').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_DUE_TO_PEG', '')]\n[SelectLocalization(GetScriptedGui('alter_currency_blocked_due_head').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_DUE_TO_HEAD', '')]" -REVALUE_CURRENCY_TOOLTIP: "Revalue your currency by #v [GetPlayer.MakeScope.ScriptValue('alter_currency_value_tooltip')|d%]#!, increasing its value to #v [GetPlayer.MakeScope.ScriptValue('currency_difference_to_global_revalue')|+%]#! the global average\n\n[SelectLocalization(GetPlayer.MakeScope.Var('altered_currency').IsSet, 'ALTERED_CURRENCY', '')]\n[SelectLocalization(GetScriptedGui('alter_currency_blocked_due_pegged').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_DUE_TO_PEG', '')]\n[SelectLocalization(GetScriptedGui('alter_currency_blocked_due_head').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_DUE_TO_HEAD', '')][SelectLocalization(GetPlayer.MakeScope.Var('altered_currency').IsSet, 'ALTERED_CURRENCY', '')]" +REVALUE_CURRENCY_TOOLTIP: "Revalue your currency by #v [GetPlayer.MakeScope.ScriptValue('alter_currency_value_tooltip')|d%]#!, increasing its value to #v [GetPlayer.MakeScope.ScriptValue('currency_difference_to_global_revalue')|+%]#! the global average\n\n[SelectLocalization(GetPlayer.MakeScope.Var('altered_currency').IsSet, 'ALTERED_CURRENCY', '')]\n[SelectLocalization(GetScriptedGui('alter_currency_blocked_due_pegged').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_DUE_TO_PEG', '')]\n[SelectLocalization(GetScriptedGui('alter_currency_blocked_due_head').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_DUE_TO_HEAD', '')]" REDENOMINATE_CURRENCY_TOOLTIP: "#gold Redenominate#! your currency by reducing its currency unit by #v -90%#!.\n\n#i Redenominations can be done in order to reduce to inflated currency values.#!" BLOCKED_DUE_TO_PEG: "Does not have #t Pegged Currency#! @red_cross!" BLOCKED_DUE_TO_HEAD: "[concept_central_bank] is not the leading bank for the currency @red_cross!" -ALTERED_CURRENCY: "#i You have recently altered your currency. You may alter it again every year." +ALTERED_CURRENCY: "#i You have recently altered your currency. You may alter it again every 5 years." ALTER_INTEREST_RATES: "#t Change your [concept_interest_rate]#!\nRecommended [concept_interest_rate]: [GetPlayer.MakeScope.ScriptValue('player_ideal_interest_rate')|vd%]\n$TOOLTIP_DELIMITER$\nInterest Rates affect your inflation rate and the strength of your currency, higher interest rates will decrease inflation growth and increase your currency's value over time.\n\n[SelectLocalization(GetScriptedGui('can_set_interest_rates_law').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_FROM_GOLD_STANDARD', '')]\n[SelectLocalization(GetScriptedGui('can_set_interest_rates_variable').IsShown( GuiScope.SetRoot(GetPlayer.MakeScope).End), 'BLOCKED_FROM_CHANGE_INTEREST', '')]\n#i Once you set an interest rate, click the middle button to submit the rate#!" From ac25bb484d41b5ef8d7fd54b65f82fced347c975 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 05:54:21 +0300 Subject: [PATCH 32/45] expansionary scaled based on income and pegged currency fixes money supply --- common/script_values/fiscal_values.txt | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/common/script_values/fiscal_values.txt b/common/script_values/fiscal_values.txt index a0a9a271c..e79e25e70 100644 --- a/common/script_values/fiscal_values.txt +++ b/common/script_values/fiscal_values.txt @@ -323,8 +323,8 @@ monetary_policy_mult = { has_variable = contractionary_monetary_policy } value = { - value = gdp - divide = 500 + value = income + multiply = 0.3 } } if = { @@ -332,8 +332,8 @@ monetary_policy_mult = { has_variable = expansionary_monetary_policy } value = { - value = gdp - divide = 500 + value = income + multiply = 0.3 } } if = { @@ -590,12 +590,6 @@ money_supply_growth = { format = "MONEY_SUPPLY_TOOLTIP_FORMAT" } } - if = { - limit = { - has_variable = pegged_currency - } - value = var:pegged_currency.money_supply_growth - } } base_money_supply = { From 5c53249b33f7e4490319f3b4cbd5ff7770d66496 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 06:00:10 +0300 Subject: [PATCH 33/45] nzd and aud can be adopted --- common/scripted_triggers/cwp_fiscal_triggers.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common/scripted_triggers/cwp_fiscal_triggers.txt b/common/scripted_triggers/cwp_fiscal_triggers.txt index 2a5964c14..651ddc633 100644 --- a/common/scripted_triggers/cwp_fiscal_triggers.txt +++ b/common/scripted_triggers/cwp_fiscal_triggers.txt @@ -20,5 +20,19 @@ can_adopt_currency = { } c:GER ?= THIS } + and = { + not = { + var:cwp_currency = flag:currency_aud + } + year >= 1960 + c:AST ?= THIS + } + and = { + not = { + var:cwp_currency = flag:currency_nzd + } + year >= 1960 + c:NZL ?= THIS + } } } From 1cbfdd670af2441147452275c2df263d10a71c66 Mon Sep 17 00:00:00 2001 From: raxo2222 <54320715+raxo2222@users.noreply.github.com> Date: Tue, 1 Aug 2023 09:33:47 +0200 Subject: [PATCH 34/45] This localization doesn't work, would need new variable to tell you third party peg --- localization/english/CWP/CWP_fiscal_l_english.yml | 2 +- localization/japanese/CWP/CWP_fiscal_l_japanese.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/localization/english/CWP/CWP_fiscal_l_english.yml b/localization/english/CWP/CWP_fiscal_l_english.yml index a3ea768b1..da007283c 100644 --- a/localization/english/CWP/CWP_fiscal_l_english.yml +++ b/localization/english/CWP/CWP_fiscal_l_english.yml @@ -84,7 +84,7 @@ BNK_ALTERED_CURRENCY: "Recently Altering Currency" CUR_TOOLTIP_FORMAT: "$VALUE|+d%$ from $KEY$" CUR_MONEY_SUPPLY: "Money Supply Growth Percentage" CUR_INTEREST_RATE: "Interest Rates" -CUR_PEGGED_CURRENCY: "Currency Peg to [GetPlayer.MakeScope.Var('pegged_currency').GetCountry.GetCustom('currency_text_loc')][GetPlayer.MakeScope.Var('pegged_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" +CUR_PEGGED_CURRENCY: "Currency Peg" CURRENCY_VALUE_TOOLTIP: "#v 1.00[GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]#! is\n#v [SelectLocalization(LessThan_CFixedPoint(Country.MakeScope.ScriptValue('currency_difference_to_exchange_currency_denomination'), '(CFixedPoint)0.01'), 'CURRENCY_VALUE_LESSTHANONE', 'CURRENCY_VALUE_MORETHANONE')][Country.MakeScope.Var('cwp_currency').GetFlagName]#" CURRENCY_VALUE_MORETHANONE: "[Country.MakeScope.ScriptValue('currency_difference_to_exchange_currency_denomination')|vd]" CURRENCY_VALUE_LESSTHANONE: "[Country.MakeScope.ScriptValue('currency_difference_to_exchange_currency_denomination')|5]" diff --git a/localization/japanese/CWP/CWP_fiscal_l_japanese.yml b/localization/japanese/CWP/CWP_fiscal_l_japanese.yml index b19de5ddc..c698fd1f0 100644 --- a/localization/japanese/CWP/CWP_fiscal_l_japanese.yml +++ b/localization/japanese/CWP/CWP_fiscal_l_japanese.yml @@ -62,7 +62,7 @@ CUR_TOOLTIP_FORMAT:0 "$VALUE|+d%$ from $KEY$" CUR_MONEY_SUPPLY:0 "Money Supply Percentage" CUR_INTEREST_RATE:0 "Interest Rates" - CUR_PEGGED_CURRENCY:0 "Currency Peg to [GetPlayer.MakeScope.Var('pegged_currency').GetCountry.GetCustom('currency_text_loc')][GetPlayer.MakeScope.Var('pegged_currency').GetCountry.MakeScope.Var('cwp_currency').GetFlagName]" + CUR_PEGGED_CURRENCY:0 "Currency Peg" CURRENCY_VALUE_TOOLTIP:0 "#v 1.00[GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]#! is\n#v [SelectLocalization(LessThan_CFixedPoint(Country.MakeScope.ScriptValue('currency_difference_to_exchange_currency_denomination'), '(CFixedPoint)0.01'), 'CURRENCY_VALUE_LESSTHANONE', 'CURRENCY_VALUE_MORETHANONE')][Country.MakeScope.Var('cwp_currency').GetFlagName]#" CURRENCY_VALUE_MORETHANONE:0 "[Country.MakeScope.ScriptValue('currency_difference_to_exchange_currency_denomination')|vd]" CURRENCY_VALUE_LESSTHANONE:0 "[Country.MakeScope.ScriptValue('currency_difference_to_exchange_currency_denomination')|5]" From 1b0e66a9e381f1b33c35c7eb9e78480e4ff22f6d Mon Sep 17 00:00:00 2001 From: raxo2222 <54320715+raxo2222@users.noreply.github.com> Date: Tue, 1 Aug 2023 09:43:11 +0200 Subject: [PATCH 35/45] fixed small typo in loc --- localization/english/CWP/CWP_currency_l_english.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localization/english/CWP/CWP_currency_l_english.yml b/localization/english/CWP/CWP_currency_l_english.yml index 0af051937..e64d63c73 100644 --- a/localization/english/CWP/CWP_currency_l_english.yml +++ b/localization/english/CWP/CWP_currency_l_english.yml @@ -120,5 +120,5 @@ WILL_ADOPT_NEW_CURRENCY: "Will adopt a new [concept_currency]" WILL_BECOME_LEADING_BANK_FOR_CURRENCY: "Will become leading [concept_central_bank] for new [concept_currency]" take_over_currency_central_bank: "Take over leadership of [GetPlayer.GetCustom('currency_text_loc')]" -take_over_currency_central_bank_desc: "Our GDP has surpassed the [GetPlayer.GetCustom('currency_text_loc')]'s leading [concept_central_bank]'s GDP. It's only fair that we become take over and manage it ourselves." +take_over_currency_central_bank_desc: "Our GDP has surpassed the [GetPlayer.GetCustom('currency_text_loc')]'s leading [concept_central_bank]'s GDP. It's only fair that we take over and manage it ourselves." GDP_LARGER_THAN_LEADING_BANK: "[GetPlayer.GetName]'s GDP (#s Currently: $CWP_GDP_PLAYERSCOPE$$GLOBAL_CURRENCY_ICON$#!) is larger than the [GetPlayer.GetCustom('currency_text_loc')]'s leading [concept_central_bank]'s GDP (#s Currently: [GetPlayer.MakeScope.ScriptValue('leading_central_bank_gdp')|vd]#!)" From e7f7e7bac0b0badcf2e80689b6f72464ce19be96 Mon Sep 17 00:00:00 2001 From: raxo2222 <54320715+raxo2222@users.noreply.github.com> Date: Tue, 1 Aug 2023 13:05:55 +0200 Subject: [PATCH 36/45] Added back fail goals for loan JEs --- common/journal_entries/CWP_IMF_JEs.txt | 14 ++++++++++++-- localization/english/CWP/CWP_imf_l_english.yml | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/common/journal_entries/CWP_IMF_JEs.txt b/common/journal_entries/CWP_IMF_JEs.txt index c16fc2818..df84cbc59 100644 --- a/common/journal_entries/CWP_IMF_JEs.txt +++ b/common/journal_entries/CWP_IMF_JEs.txt @@ -61,7 +61,12 @@ } } fail = { - has_modifier = defaulted_on_international_loan + or = { + scope:journal_entry = { + is_goal_complete = yes + } + has_modifier = defaulted_on_international_loan + } } on_complete = { custom_tooltip = { @@ -145,7 +150,12 @@ je_imf_nonconcessionary_loan = { } } fail = { - has_modifier = defaulted_on_international_loan + or = { + scope:journal_entry = { + is_goal_complete = yes + } + has_modifier = defaulted_on_international_loan + } } on_complete = { custom_tooltip = { diff --git a/localization/english/CWP/CWP_imf_l_english.yml b/localization/english/CWP/CWP_imf_l_english.yml index f0aa9b400..4c98e618b 100644 --- a/localization/english/CWP/CWP_imf_l_english.yml +++ b/localization/english/CWP/CWP_imf_l_english.yml @@ -96,6 +96,9 @@ je_imf_concessionary_loan_reason: "$je_imf_nonconcessionary_loan_reason$" je_imf_nonconcessionary_loan_reason: "#header Current #gold IMF#! Debt:#!\n$TAB$[GetPlayer.MakeScope.Var('imf_debt').GetValue|nd] $imr$ | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]\n$TOOLTIP_DELIMITER$\n#header Current #gold IMF#! Interest Rate:#!\n$TAB$#v [GetPlayer.MakeScope.Var('imf_interest_rate_domestic').GetValue]%#!\n$TOOLTIP_DELIMITER$\n#header Current #gold IMF#! Loan Type:#!\n$TAB$#v [GetPlayer.GetCustom('imf_debt_type_loc')]#!\n$TOOLTIP_DELIMITER$\n#header Monthly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value')|nD] $imr$#!\n#header Weekly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value')|nD] $imr$#!\n$TOOLTIP_DELIMITER$\n#header IMF Monthly Debt Growth from Interest#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_interest_growth')|nD] $imr$#!\n$TOOLTIP_DELIMITER$\n#header IMF Monthly Loan Change#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_change')|-D] $imr$#!\n$TOOLTIP_DELIMITER$\n#header Debt will be paid in:#!\n$TAB$#v [GetPlayer.GetCustom('imf_debt_pay_off_in_years_loc')]#!" +je_imf_concessionary_loan_goal: "[GetPlayer.GetName] has exceeded the allotted payment time - [GetPlayer.MakeScope.ScriptValue('imf_loan_payment_years_left')|v1] Years Left" +je_imf_nonconcessionary_loan_goal: "[GetPlayer.GetName] has exceeded the allotted payment time - [GetPlayer.MakeScope.ScriptValue('imf_loan_payment_years_left')|v1] Years Left" + IMF_LOAN_PAID: "[GetPlayer.GetName] has paid off its #gold IMF#! Loan of [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] | [GetPlayer.MakeScope.Var('imf_debt').GetValue|nd] $imr$" IMF_LOAN_PAID_CONCLUSION: "Will conclude our current loan with the #gold IMF#!" From 7e62b0acc25a5b01ba81c1826c5b0959f43aa5a9 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 14:23:24 +0300 Subject: [PATCH 37/45] fixed loans not ending(smh max) --- common/journal_entries/CWP_IMF_JEs.txt | 14 ++++++++++++-- .../english/CWP/CWP_currency_l_english.yml | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/common/journal_entries/CWP_IMF_JEs.txt b/common/journal_entries/CWP_IMF_JEs.txt index c16fc2818..df84cbc59 100644 --- a/common/journal_entries/CWP_IMF_JEs.txt +++ b/common/journal_entries/CWP_IMF_JEs.txt @@ -61,7 +61,12 @@ } } fail = { - has_modifier = defaulted_on_international_loan + or = { + scope:journal_entry = { + is_goal_complete = yes + } + has_modifier = defaulted_on_international_loan + } } on_complete = { custom_tooltip = { @@ -145,7 +150,12 @@ je_imf_nonconcessionary_loan = { } } fail = { - has_modifier = defaulted_on_international_loan + or = { + scope:journal_entry = { + is_goal_complete = yes + } + has_modifier = defaulted_on_international_loan + } } on_complete = { custom_tooltip = { diff --git a/localization/english/CWP/CWP_currency_l_english.yml b/localization/english/CWP/CWP_currency_l_english.yml index 0af051937..e64d63c73 100644 --- a/localization/english/CWP/CWP_currency_l_english.yml +++ b/localization/english/CWP/CWP_currency_l_english.yml @@ -120,5 +120,5 @@ WILL_ADOPT_NEW_CURRENCY: "Will adopt a new [concept_currency]" WILL_BECOME_LEADING_BANK_FOR_CURRENCY: "Will become leading [concept_central_bank] for new [concept_currency]" take_over_currency_central_bank: "Take over leadership of [GetPlayer.GetCustom('currency_text_loc')]" -take_over_currency_central_bank_desc: "Our GDP has surpassed the [GetPlayer.GetCustom('currency_text_loc')]'s leading [concept_central_bank]'s GDP. It's only fair that we become take over and manage it ourselves." +take_over_currency_central_bank_desc: "Our GDP has surpassed the [GetPlayer.GetCustom('currency_text_loc')]'s leading [concept_central_bank]'s GDP. It's only fair that we take over and manage it ourselves." GDP_LARGER_THAN_LEADING_BANK: "[GetPlayer.GetName]'s GDP (#s Currently: $CWP_GDP_PLAYERSCOPE$$GLOBAL_CURRENCY_ICON$#!) is larger than the [GetPlayer.GetCustom('currency_text_loc')]'s leading [concept_central_bank]'s GDP (#s Currently: [GetPlayer.MakeScope.ScriptValue('leading_central_bank_gdp')|vd]#!)" From 58d845c8e3ae340cd83a8458f2f2ee714595abee Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 14:41:59 +0300 Subject: [PATCH 38/45] added loc --- localization/english/CWP/CWP_imf_l_english.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/localization/english/CWP/CWP_imf_l_english.yml b/localization/english/CWP/CWP_imf_l_english.yml index f0aa9b400..b048dc4eb 100644 --- a/localization/english/CWP/CWP_imf_l_english.yml +++ b/localization/english/CWP/CWP_imf_l_english.yml @@ -86,6 +86,8 @@ imf_events.6.a: "Rejoice!" #Jes je_imf_concessionary_loan: "#gold IMF#! Loan" je_imf_nonconcessionary_loan: "#gold IMF#! Loan" +je_imf_concessionary_loan_goal: "The allotted time has run out." +je_imf_nonconcessionary_loan_goal: "The allotted time has run out." not_paying_imf_loans_status: "#n Not Paying #gold IMF#! Debt#! | [GetPlayer.MakeScope.ScriptValue('imf_loan_payment_years_left')|v1] Years Left" paying_imf_loans_status: "#p Paying #gold IMF#! Debt#! | [GetPlayer.MakeScope.ScriptValue('imf_loan_payment_years_left')|v1] Years Left" From 96c2e160c33574ccf04867e8afd949f11fcf5580 Mon Sep 17 00:00:00 2001 From: raxo2222 <54320715+raxo2222@users.noreply.github.com> Date: Tue, 1 Aug 2023 13:44:13 +0200 Subject: [PATCH 39/45] SMH Arcady not checking stuff --- localization/english/CWP/CWP_imf_l_english.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/localization/english/CWP/CWP_imf_l_english.yml b/localization/english/CWP/CWP_imf_l_english.yml index 754d505c8..b048dc4eb 100644 --- a/localization/english/CWP/CWP_imf_l_english.yml +++ b/localization/english/CWP/CWP_imf_l_english.yml @@ -98,9 +98,6 @@ je_imf_concessionary_loan_reason: "$je_imf_nonconcessionary_loan_reason$" je_imf_nonconcessionary_loan_reason: "#header Current #gold IMF#! Debt:#!\n$TAB$[GetPlayer.MakeScope.Var('imf_debt').GetValue|nd] $imr$ | [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]\n$TOOLTIP_DELIMITER$\n#header Current #gold IMF#! Interest Rate:#!\n$TAB$#v [GetPlayer.MakeScope.Var('imf_interest_rate_domestic').GetValue]%#!\n$TOOLTIP_DELIMITER$\n#header Current #gold IMF#! Loan Type:#!\n$TAB$#v [GetPlayer.GetCustom('imf_debt_type_loc')]#!\n$TOOLTIP_DELIMITER$\n#header Monthly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_payment_value')|nD] $imr$#!\n#header Weekly IMF Debt Payment#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value_domestic')|nD][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] - [GetPlayer.MakeScope.ScriptValue('imf_debt_weekly_payment_value')|nD] $imr$#!\n$TOOLTIP_DELIMITER$\n#header IMF Monthly Debt Growth from Interest#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_interest_growth')|nD] $imr$#!\n$TOOLTIP_DELIMITER$\n#header IMF Monthly Loan Change#!\n$TAB$#v [GetPlayer.MakeScope.ScriptValue('imf_debt_monthly_change')|-D] $imr$#!\n$TOOLTIP_DELIMITER$\n#header Debt will be paid in:#!\n$TAB$#v [GetPlayer.GetCustom('imf_debt_pay_off_in_years_loc')]#!" -je_imf_concessionary_loan_goal: "[GetPlayer.GetName] has exceeded the allotted payment time - [GetPlayer.MakeScope.ScriptValue('imf_loan_payment_years_left')|v1] Years Left" -je_imf_nonconcessionary_loan_goal: "[GetPlayer.GetName] has exceeded the allotted payment time - [GetPlayer.MakeScope.ScriptValue('imf_loan_payment_years_left')|v1] Years Left" - IMF_LOAN_PAID: "[GetPlayer.GetName] has paid off its #gold IMF#! Loan of [GetPlayer.MakeScope.ScriptValue('imf_domestic_currency_debt')|nd][GetPlayer.MakeScope.Var('cwp_currency').GetFlagName] | [GetPlayer.MakeScope.Var('imf_debt').GetValue|nd] $imr$" IMF_LOAN_PAID_CONCLUSION: "Will conclude our current loan with the #gold IMF#!" From 8f63aecdce2405edce13b8ea56f76164a7718678 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 14:54:17 +0300 Subject: [PATCH 40/45] independent monetary policy limits revalue again --- common/scripted_effects/cwp_onaction_fiscal_ai.txt | 1 + common/scripted_guis/fiscal_sgui.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/scripted_effects/cwp_onaction_fiscal_ai.txt b/common/scripted_effects/cwp_onaction_fiscal_ai.txt index 39b4ac570..f87f1e631 100644 --- a/common/scripted_effects/cwp_onaction_fiscal_ai.txt +++ b/common/scripted_effects/cwp_onaction_fiscal_ai.txt @@ -258,6 +258,7 @@ onaction_ai_devalue_revalue_calculation = { has_variable = pegged_currency has_variable = altered_currency has_law = law_type:law_gold_standard + has_law = law_type:law_independent_monetary_policy } is_leading_central_bank = yes } diff --git a/common/scripted_guis/fiscal_sgui.txt b/common/scripted_guis/fiscal_sgui.txt index 240b938ef..64b9ad863 100644 --- a/common/scripted_guis/fiscal_sgui.txt +++ b/common/scripted_guis/fiscal_sgui.txt @@ -323,7 +323,7 @@ can_alter_currency = { has_variable = pegged_currency has_variable = altered_currency has_law = law_type:law_gold_standard - #has_law = law_type:law_independent_monetary_policy + has_law = law_type:law_independent_monetary_policy } is_target_in_global_variable_list = { name = central_bank_list @@ -339,7 +339,7 @@ can_redenominate_currency = { nor = { has_variable = pegged_currency has_variable = altered_currency - #has_law = law_type:law_independent_monetary_policy + has_law = law_type:law_independent_monetary_policy } is_target_in_global_variable_list = { name = central_bank_list From 3e7a3b3121e46706c9696050b4fcd2bef4f9e44c Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 14:57:44 +0300 Subject: [PATCH 41/45] fixed missing thing --- common/script_values/imf_values.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/script_values/imf_values.txt b/common/script_values/imf_values.txt index 2486ee1bb..c37f8d5ca 100644 --- a/common/script_values/imf_values.txt +++ b/common/script_values/imf_values.txt @@ -784,7 +784,7 @@ imf_requirements_meeting = { } if = { limit = { - average_sol <= 10 + average_sol < 10 } subtract = { value = average_sol From 1d52911875eb3a218726385e79085312a1cdebe2 Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 15:10:02 +0300 Subject: [PATCH 42/45] imf debt interest growth is monthly --- common/script_values/imf_values.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/common/script_values/imf_values.txt b/common/script_values/imf_values.txt index c37f8d5ca..9d6017db3 100644 --- a/common/script_values/imf_values.txt +++ b/common/script_values/imf_values.txt @@ -335,6 +335,7 @@ imf_debt_interest_growth_global = { imf_debt_interest_growth = { value = imf_debt_value multiply = imf_interest_rate + divide = 12 } imf_debt_monthly_change = { From 85705ec798e6d1fe376f7493120449c2121e509e Mon Sep 17 00:00:00 2001 From: JackEPepper <100242026+JackEPepper@users.noreply.github.com> Date: Tue, 1 Aug 2023 08:12:11 -0400 Subject: [PATCH 43/45] adopting aussiebucks now works --- common/scripted_effects/cwp_currency_adoption_effects.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/scripted_effects/cwp_currency_adoption_effects.txt b/common/scripted_effects/cwp_currency_adoption_effects.txt index 7b4f4a3c3..dc66659d9 100644 --- a/common/scripted_effects/cwp_currency_adoption_effects.txt +++ b/common/scripted_effects/cwp_currency_adoption_effects.txt @@ -22,10 +22,10 @@ text = "WILL_ADOPT_NEW_CURRENCY" effect_currency_aud = yes } - if = { limit = { not = { currency_leader_exists = { currency = dem } } } + if = { limit = { not = { currency_leader_exists = { currency = aud } } } custom_tooltip = { text = "WILL_BECOME_LEADING_BANK_FOR_CURRENCY" - set_currency = { currency = dem value = foreign_avg centralBank = THIS denominationValue = 1 } + set_currency = { currency = aud value = foreign_avg centralBank = THIS denominationValue = 1 } } } } @@ -37,10 +37,10 @@ text = "WILL_ADOPT_NEW_CURRENCY" effect_currency_nzd = yes } - if = { limit = { not = { currency_leader_exists = { currency = dem } } } + if = { limit = { not = { currency_leader_exists = { currency = nzd } } } custom_tooltip = { text = "WILL_BECOME_LEADING_BANK_FOR_CURRENCY" - set_currency = { currency = dem value = foreign_avg centralBank = THIS denominationValue = 1 } + set_currency = { currency = nzd value = foreign_avg centralBank = THIS denominationValue = 1 } } } } From b763f2b6354dbf3d773d45f84d7a9d572bd9730d Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Tue, 1 Aug 2023 22:48:13 +0300 Subject: [PATCH 44/45] currency buying now notifies player --- common/messages/cwp_messages.txt | 8 ++++++++ common/scripted_effects/cwp_onaction_fiscal_ai.txt | 2 ++ common/scripted_guis/fiscal_sgui.txt | 2 ++ localization/english/CWP/CWP_currency_l_english.yml | 6 ++++++ 4 files changed, 18 insertions(+) diff --git a/common/messages/cwp_messages.txt b/common/messages/cwp_messages.txt index 264614d37..697721962 100644 --- a/common/messages/cwp_messages.txt +++ b/common/messages/cwp_messages.txt @@ -13,3 +13,11 @@ IMF_BAILOUT_TAKEN_NOTIFICATION = { notification_type = toast } + +CURRENCY_BOUGHT_NOTIFICATION = { + type = country + texture = "gfx/interface/icons/cwp_icons/imf_seal.dds" + group = "MONETARY_ACTION_NOTIFICATION_GROUP" + + notification_type = toast +} diff --git a/common/scripted_effects/cwp_onaction_fiscal_ai.txt b/common/scripted_effects/cwp_onaction_fiscal_ai.txt index f87f1e631..4f70608ba 100644 --- a/common/scripted_effects/cwp_onaction_fiscal_ai.txt +++ b/common/scripted_effects/cwp_onaction_fiscal_ai.txt @@ -133,6 +133,7 @@ onaction_ai_buy_foreign_currency_calculation = { limit = { has_variable = ai_currency_buy_country } + save_scope_as = originator add_treasury = { # Remove from AI treasury value = { value = var:ai_currency_buy_country.money_supply_5 @@ -170,6 +171,7 @@ onaction_ai_buy_foreign_currency_calculation = { } } var:ai_currency_buy_country = { + post_notification = CURRENCY_BOUGHT_NOTIFICATION on_action_change_domestic_currency_value = { mathAction = add mathAction2 = currency_value_growth_by_exchange diff --git a/common/scripted_guis/fiscal_sgui.txt b/common/scripted_guis/fiscal_sgui.txt index 64b9ad863..d2c983c71 100644 --- a/common/scripted_guis/fiscal_sgui.txt +++ b/common/scripted_guis/fiscal_sgui.txt @@ -38,6 +38,7 @@ buy_foreign_currency = { value = foreign_reserves_max } } + save_scope_as = originator # Increases Bought Currency Value scope:currency_exchange_country = { on_action_change_domestic_currency_value = { @@ -68,6 +69,7 @@ buy_foreign_currency = { name = currency_bought months = 1 } + post_notification = CURRENCY_BOUGHT_NOTIFICATION } } } diff --git a/localization/english/CWP/CWP_currency_l_english.yml b/localization/english/CWP/CWP_currency_l_english.yml index e64d63c73..e22822337 100644 --- a/localization/english/CWP/CWP_currency_l_english.yml +++ b/localization/english/CWP/CWP_currency_l_english.yml @@ -122,3 +122,9 @@ WILL_BECOME_LEADING_BANK_FOR_CURRENCY: "Will become leading [concept_central_ban take_over_currency_central_bank: "Take over leadership of [GetPlayer.GetCustom('currency_text_loc')]" take_over_currency_central_bank_desc: "Our GDP has surpassed the [GetPlayer.GetCustom('currency_text_loc')]'s leading [concept_central_bank]'s GDP. It's only fair that we take over and manage it ourselves." GDP_LARGER_THAN_LEADING_BANK: "[GetPlayer.GetName]'s GDP (#s Currently: $CWP_GDP_PLAYERSCOPE$$GLOBAL_CURRENCY_ICON$#!) is larger than the [GetPlayer.GetCustom('currency_text_loc')]'s leading [concept_central_bank]'s GDP (#s Currently: [GetPlayer.MakeScope.ScriptValue('leading_central_bank_gdp')|vd]#!)" + +MONETARY_ACTION_NOTIFICATION_GROUP: "Monetary Issues" +MONETARY_ACTION_NOTIFICATION_GROUP_desc: "Issues related to monetary policy and currency" +notification_CURRENCY_BOUGHT_NOTIFICATION_tooltip: "#header $notification_CURRENCY_BOUGHT_NOTIFICATION_name$#!\n$TOOLTIP_DELIMITER$\n$notification_CURRENCY_BOUGHT_NOTIFICATION_desc$" +notification_CURRENCY_BOUGHT_NOTIFICATION_name: "[SCOPE.sC('originator').GetName] has bought our currency" +notification_CURRENCY_BOUGHT_NOTIFICATION_desc: "[SCOPE.sC('originator').GetName] has bought our currency" \ No newline at end of file From dbac009d459325e40739c39c9521481dcb1c383f Mon Sep 17 00:00:00 2001 From: Arcady <35745557+Arcadyi@users.noreply.github.com> Date: Wed, 2 Aug 2023 03:18:56 +0300 Subject: [PATCH 45/45] gdp affects currency now --- common/script_values/currency_values.txt | 51 ++++++++++++++++++- .../cwp_onaction_fiscal_ai.txt | 10 +++- .../english/CWP/CWP_fiscal_l_english.yml | 3 +- 3 files changed, 59 insertions(+), 5 deletions(-) diff --git a/common/script_values/currency_values.txt b/common/script_values/currency_values.txt index 3c7b05e4e..1360aa2d5 100644 --- a/common/script_values/currency_values.txt +++ b/common/script_values/currency_values.txt @@ -8,6 +8,10 @@ currency_value_growth = { money_supply > 5 money_supply < 5 } + nor = { + has_variable = expansionary_monetary_policy + has_variable = contractionary_monetary_policy + } } subtract = { value = money_supply_growth_percentage @@ -41,6 +45,9 @@ currency_value_growth = { if = { limit = { interest_rate >= 1 + not = { + has_variable = pegged_currency + } } add = { value = interest_rate @@ -53,6 +60,24 @@ currency_value_growth = { if = { limit = { interest_rate < 1 + not = { + has_variable = pegged_currency + } + } + subtract = { + value = interest_rate + divide = 4 + divide = 10 + desc = CUR_INTEREST_RATE + format = "CUR_TOOLTIP_FORMAT" + } + } + if = { + limit = { + interest_rate < 1 + not = { + has_variable = pegged_currency + } } subtract = { value = interest_rate @@ -64,9 +89,17 @@ currency_value_growth = { } if = { limit = { - country_currency_val <= 0.01 + not = { + has_variable = pegged_currency + } + currency_average_difference_to_global_AI > currency_value_max + } + subtract = { + value = currency_value_ratio + divide = 2 + desc = CUR_SIZE_OF_ECONOMY + format = "CUR_TOOLTIP_FORMAT" } - min = 0.01 } if = { limit = { @@ -86,9 +119,23 @@ currency_value_growth = { } } +currency_value_max = { + value = gdp + divide = { + value = { every_country = { add = gdp } } + divide = { every_country = { add = 1 } } + } + multiply = 10 +} + +currency_value_ratio = { + value = currency_average_difference_to_global_AI + divide = currency_value_max +} currency_value_change = { value = foreign_avg multiply = currency_value_growth + max = 1000 } global_currency_value = { value = global_var:currency_usd_v diff --git a/common/scripted_effects/cwp_onaction_fiscal_ai.txt b/common/scripted_effects/cwp_onaction_fiscal_ai.txt index 4f70608ba..92e7ec5c7 100644 --- a/common/scripted_effects/cwp_onaction_fiscal_ai.txt +++ b/common/scripted_effects/cwp_onaction_fiscal_ai.txt @@ -88,6 +88,9 @@ onaction_ai_buy_foreign_currency_calculation = { has_variable = currency_bought } or = { + not = { + has_variable = pegged_currency + } and = { ROOT = { has_variable = pegged_currency @@ -114,7 +117,7 @@ onaction_ai_buy_foreign_currency_calculation = { } if = { limit = { - is_set = scope:currency_exchange_country + exists = scope:currency_exchange_country } set_variable = { name = ai_currency_buy_country @@ -124,7 +127,7 @@ onaction_ai_buy_foreign_currency_calculation = { if = { limit = { not = { - is_set = scope:currency_exchange_country + exists = scope:currency_exchange_country } } remove_variable = ai_currency_buy_country @@ -132,6 +135,9 @@ onaction_ai_buy_foreign_currency_calculation = { if = { limit = { has_variable = ai_currency_buy_country + var:ai_currency_buy_country = { + is_country_alive = yes + } } save_scope_as = originator add_treasury = { # Remove from AI treasury diff --git a/localization/english/CWP/CWP_fiscal_l_english.yml b/localization/english/CWP/CWP_fiscal_l_english.yml index da007283c..a50d8d9fd 100644 --- a/localization/english/CWP/CWP_fiscal_l_english.yml +++ b/localization/english/CWP/CWP_fiscal_l_english.yml @@ -40,7 +40,7 @@ currency_blocked_due_to_reserve_max: "\n$TAB$[GetPlayer.GetAdjective] [concept_f currency_blocked_due_to_already_bought: "\n$TAB$[Country.GetAdjective] [Country.GetCustom('currency_text_loc')][Country.MakeScope.Var('cwp_currency').GetFlagName] has not been bought this month @red_cross!" currency_blocked_due_target_isolationist: "\n$TAB$[Country.GetName] has $law_isolationism$ @red_cross!" -CURRENCY_TOOLTIP: "The [Country.GetAdjectiveNoFlag] [concept_central_bank]'s currency is the [Country.MakeScope.Var('cwp_currency').GetFlagName][Country.GetCustom('currency_text_loc')] which is currently valued at #v [Country.MakeScope.ScriptValue('currency_average_difference_to_global_AI')|+d%]#! the global average.\n$TOOLTIP_DELIMITER$\nIts value is currently changing by [Country.MakeScope.ScriptValue('currency_value_growth')|+d%] per month due to:\n[Country.MakeScope.GetScriptValueDesc('currency_value_growth')]" +CURRENCY_TOOLTIP: "The [Country.GetAdjectiveNoFlag] [concept_central_bank]'s currency is the [Country.MakeScope.Var('cwp_currency').GetFlagName][Country.GetCustom('currency_text_loc')] which is currently valued at #v [Country.MakeScope.ScriptValue('currency_average_difference_to_global_AI')|+d%]#! the global average.\n\nThe maximum value compared to the global average [Country.GetCustom('currency_text_loc')] can reach is [Country.MakeScope.ScriptValue('currency_value_max')|goldd%] and its value will slowy depreciate to that maximum\n\nThis is due to the size of the [Country.GetAdjectiveNoFlag] economy.\n$TOOLTIP_DELIMITER$\nIts value is currently changing by [Country.MakeScope.ScriptValue('currency_value_growth')|+d%] per month due to:\n[Country.MakeScope.GetScriptValueDesc('currency_value_growth')]" CREDIT_RATING_TOOLTIP: "The [Country.GetAdjective] [concept_central_bank] is the highest banking institution in [Country.GetNameNoFlag]\n\nIt currently follows a #v [Country.GetCustom('bank_independence_loc')]#! monetary policy and has credibility rating of [Country.GetCustom('bank_credibility_loc_desc')] | [Country.GetCustom('bank_credibility_loc')]\n\nThe [concept_central_bank] credit rating may change to [Country.GetCustom('bank_credibility_forecast_loc')] which is considered [Country.GetCustom('bank_credibility_forecast_desc')] in the next evaluation period\n$TOOLTIP_DELIMITER$\n[Country.GetAdjective] [concept_central_bank] Credibility value is [Country.MakeScope.ScriptValue('bank_credibility_val')|v0]#v /24#! and is affected by:\n[Country.MakeScope.GetScriptValueDesc('bank_credibility_val')]" @@ -84,6 +84,7 @@ BNK_ALTERED_CURRENCY: "Recently Altering Currency" CUR_TOOLTIP_FORMAT: "$VALUE|+d%$ from $KEY$" CUR_MONEY_SUPPLY: "Money Supply Growth Percentage" CUR_INTEREST_RATE: "Interest Rates" +CUR_SIZE_OF_ECONOMY: "Size of Economy" CUR_PEGGED_CURRENCY: "Currency Peg" CURRENCY_VALUE_TOOLTIP: "#v 1.00[GetPlayer.MakeScope.Var('cwp_currency').GetFlagName]#! is\n#v [SelectLocalization(LessThan_CFixedPoint(Country.MakeScope.ScriptValue('currency_difference_to_exchange_currency_denomination'), '(CFixedPoint)0.01'), 'CURRENCY_VALUE_LESSTHANONE', 'CURRENCY_VALUE_MORETHANONE')][Country.MakeScope.Var('cwp_currency').GetFlagName]#" CURRENCY_VALUE_MORETHANONE: "[Country.MakeScope.ScriptValue('currency_difference_to_exchange_currency_denomination')|vd]"