Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imf fixes improvements #446

Merged
merged 30 commits into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7f00802
fix: improved calculations and can now pay imf debts with domestic cr…
Arcadyi Jul 27, 2023
2c2336c
fix: bailout now affects central bank rating
Arcadyi Jul 27, 2023
073a550
fix: fixed global gdp divider
Arcadyi Jul 27, 2023
7deb647
fix: currency growth calculations improved
Arcadyi Jul 27, 2023
cf6aa88
fix: monetary policy changes currency value less
Arcadyi Jul 27, 2023
f1bc1ce
fix: missing concept loc for ideologies, desc is TODO
raxo2222 Jul 27, 2023
1098ba8
fix: local variable trick because you can't modify "chance = " within…
raxo2222 Jul 27, 2023
fc47913
fix: missing loc
Arcadyi Jul 27, 2023
caee2b4
fix: fixed div/0 error
Arcadyi Jul 27, 2023
bd0697b
fix: loc issue - is_goal_complete = yes can't be on fail condition is…
raxo2222 Jul 27, 2023
dd6d1a7
fix: i did it on a wrong branch, what are you gonna do about it?
Max200012 Jul 27, 2023
6dca9a7
fix: made alerts more alertful
Arcadyi Jul 27, 2023
663ad69
fix: changed denomination change to be chance
Arcadyi Jul 28, 2023
c52b1f5
feat: inflation rate now visible on topbar
Arcadyi Jul 28, 2023
7e94dec
fix: nato approvals disappearing
Arcadyi Jul 28, 2023
651aec4
fix: moved inflation topbar to lower topbar
Arcadyi Jul 28, 2023
d6cdedc
fix: moved button
Arcadyi Jul 28, 2023
c6b6701
Merge branch 'dev' into imf_fixes_improvements
JackEPepper Jul 28, 2023
4eb1cc7
fix: those two do not exist
raxo2222 Jul 28, 2023
57a74be
fix: those two were removed by accident
raxo2222 Jul 28, 2023
f9a617f
Inflation warning should happen when effects are start to being felt,…
raxo2222 Jul 28, 2023
5be85ee
fixed error and lowered currency value growth 10x
Arcadyi Jul 28, 2023
e156594
Merge branch 'imf_fixes_improvements' of https://github.com/Cold-War-…
Arcadyi Jul 28, 2023
daba582
imf bailouts redesigned & fixed
Arcadyi Jul 29, 2023
9c3e780
fixed being unable to pay anglo american loans
Arcadyi Jul 29, 2023
4104341
added ai values to anglo american je
Arcadyi Jul 29, 2023
db4f9e0
superpowers dont want to get imf loans anymore
Arcadyi Jul 29, 2023
206fe59
interest rate issues #452 fixed
Arcadyi Jul 29, 2023
2031388
ai wont bankrupt itself paying the imf
Arcadyi Jul 29, 2023
0001985
ai made more competent with monetary policy
Arcadyi Jul 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions common/alert_types/cwp_alerts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ dangerous_inflation = {
texture = "gfx/interface/icons/alert_icons/bankruptcy.dds"

valid = {
inflation_value >= 30
inflation_value >= 5
}

open_panel = budget|fiscal
type = angry_important_action
type = alert
alert_group = alert_group_monetary
}

Expand All @@ -92,11 +92,11 @@ dangerous_deflation = {
texture = "gfx/interface/icons/alert_icons/bankruptcy.dds"

valid = {
inflation_value <= -30
inflation_value <= -0.1
}

open_panel = budget|fiscal
type = angry_important_action
type = alert
alert_group = alert_group_monetary
}

Expand All @@ -105,7 +105,7 @@ dangerous_inflation_growth = {
texture = "gfx/interface/icons/alert_icons/bankruptcy.dds"

valid = {
inflation_growth >= 3
inflation_growth >= 0.2
}

open_panel = budget|fiscal
Expand All @@ -118,7 +118,7 @@ dangerous_deflation_growth = {
texture = "gfx/interface/icons/alert_icons/bankruptcy.dds"

valid = {
inflation_growth <= -3
inflation_growth <= -0.2
}

open_panel = budget|fiscal
Expand Down
14 changes: 2 additions & 12 deletions common/journal_entries/CWP_IMF_JEs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@
}
}
fail = {
or = {
scope:journal_entry = {
is_goal_complete = yes
}
has_modifier = defaulted_on_international_loan
}
has_modifier = defaulted_on_international_loan
}
on_complete = {
custom_tooltip = {
Expand Down Expand Up @@ -150,12 +145,7 @@ je_imf_nonconcessionary_loan = {
}
}
fail = {
or = {
scope:journal_entry = {
is_goal_complete = yes
}
has_modifier = defaulted_on_international_loan
}
has_modifier = defaulted_on_international_loan
}
on_complete = {
custom_tooltip = {
Expand Down
8 changes: 8 additions & 0 deletions common/messages/cwp_messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@

notification_type = toast
}

IMF_BAILOUT_TAKEN_NOTIFICATION = {
type = country
texture = "gfx/interface/icons/cwp_icons/imf_seal.dds"
group = "IMF_ACTION_NOTIFICATION_GROUP"

notification_type = toast
}
61 changes: 23 additions & 38 deletions common/script_values/currency_values.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,37 @@ currency_value_growth = {
value = 0
if = {
limit = {
money_supply_percentage >= 5
or = {
money_supply > 5
money_supply < 5
}
}
subtract = {
value = money_supply_growth_percentage
divide = 100
divide = 10
desc = CUR_MONEY_SUPPLY
format = "CUR_TOOLTIP_FORMAT"
}
}
if = {
limit = {
money_supply_percentage < 0
has_variable = expansionary_monetary_policy
}
subtract = {
value = money_supply_growth_percentage
divide = 10
desc = MNS_EXPANSIONARY
format = "CUR_TOOLTIP_FORMAT"
}
}
if = {
limit = {
has_variable = contractionary_monetary_policy
}
add = {
value = money_supply_growth_percentage
divide = 100
desc = CUR_MONEY_SUPPLY
divide = 10
desc = MNS_CONTRACTIONARY
format = "CUR_TOOLTIP_FORMAT"
}
}
Expand All @@ -30,7 +44,8 @@ currency_value_growth = {
}
add = {
value = interest_rate
divide = 2
divide = 4
divide = 10
desc = CUR_INTEREST_RATE
format = "CUR_TOOLTIP_FORMAT"
}
Expand All @@ -41,7 +56,8 @@ currency_value_growth = {
}
subtract = {
value = interest_rate
divide = 2
divide = 4
divide = 10
desc = CUR_INTEREST_RATE
format = "CUR_TOOLTIP_FORMAT"
}
Expand Down Expand Up @@ -159,37 +175,6 @@ country_currency_denomination = {
if = { limit = { var:cwp_currency = flag:currency_php } value = global_var:currency_php_d }
}

currency_denomination_growth = {
value = 0
if = {
limit = {
inflation_value <= -5
not = {
has_variable = pegged_currency
}
}
add = country_currency_denomination
multiply = {
value = inflation_value
divide = 3
divide = 100
}
}
if = {
limit = {
inflation_value >= 20
not = {
has_variable = pegged_currency
}
}
add = country_currency_denomination
multiply = {
value = inflation_value
divide = 2
divide = 100
}
}
}
country_currency_with_denomination = {
value = country_currency_val
multiply = country_currency_denomination
Expand Down
17 changes: 11 additions & 6 deletions common/script_values/fiscal_values.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,16 @@ bank_credibility_val = {
format = "BNK_TOOLTIP_FORMAT"
}
}
if = {
limit = {
has_journal_entry = je_imf_bailout_loan
}
subtract = {
value = 5
desc = BNK_BAILOUT
format = "BNK_TOOLTIP_FORMAT"
}
}
if = {
limit = {
has_modifier = declared_bankruptcy
Expand Down Expand Up @@ -364,9 +374,7 @@ country_payment_ability = {
gold_reserve_value >= 1
}
add = credit
}


}
}

gold_reserve_limit = {
Expand Down Expand Up @@ -811,9 +819,6 @@ inflation_growth = {
if = {
limit = {
interest_rate > -100
not = {
interest_rate = 0
}
}
subtract = {
value = interest_rate_effect
Expand Down
49 changes: 43 additions & 6 deletions common/script_values/imf_ai_values.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,57 @@
limit = {
weekly_net_fixed_income > 0
}
add = 5
}
if = {
limit = {
weekly_net_fixed_income > 50000
}
add = 5
}
if = {
limit = {
weekly_net_fixed_income > 100000
}
add = 5
}
if = {
limit = {
weekly_net_fixed_income > 500000
}
add = 10
}
if = {
limit = {
weekly_net_fixed_income > 25000
weekly_net_fixed_income > 1000000
}
add = 15
add = 10
}
if = {
limit = {
weekly_net_fixed_income > 50000
weekly_net_fixed_income > 2500000
}
add = 20
add = 10
}
if = {
limit = {
weekly_net_fixed_income > 100000
weekly_net_fixed_income > 5000000
}
add = 10
}
if = {
limit = {
weekly_net_fixed_income > 10000000
}
add = 15
}
if = {
limit = {
gold_reserve_ratio > 0.3
}
add = 30
multiply = 2
}
max = 75
}

imf_ai_debt_ideal_payment_percentage = {
Expand Down Expand Up @@ -110,6 +141,12 @@ imf_ai_wants_loan = {
}
subtract = 1
}
if = {
limit = {
country_rank = rank_value:superpower
}
subtract = -5
}
multiply = 100
}

Expand Down
Loading