From 158be08156fe4e5eedb6c6e39e87ecc8e6c0627f Mon Sep 17 00:00:00 2001 From: sbmunch Date: Thu, 11 Mar 2021 09:30:23 +0100 Subject: [PATCH 1/3] Make grants more flexible --- icen_PUIR/events/grants 1.txt | 78 +++++++--- icen_PUIR/events/grants 2.txt | 276 ++++++++++++++++++++++++---------- 2 files changed, 260 insertions(+), 94 deletions(-) diff --git a/icen_PUIR/events/grants 1.txt b/icen_PUIR/events/grants 1.txt index 3c95405..c23f56e 100644 --- a/icen_PUIR/events/grants 1.txt +++ b/icen_PUIR/events/grants 1.txt @@ -46,14 +46,14 @@ country_event = { ai = no - money = 1000000 + money = 500000 NOT = { money = 10000000 } } - country_event = {id = 100011 days = 0} + country_event = {id = 100002 days = 0} - } + } any_country = { @@ -63,11 +63,27 @@ country_event = { ai = no - money = 10000000 + money = 2000000 } - country_event = {id = 100012 days = 0} + country_event = {id = 100003 days = 0} + + } + + any_country = { + + limit = { + + has_country_flag = will_give_grants + + ai = no + + money = 6000000 + + } + + country_event = {id = 100004 days = 0} } @@ -80,7 +96,7 @@ country_event = { country_event = { -id = 100002 +id = 100005 title = "$FROMCOUNTRY$ Grants Aid" @@ -95,9 +111,9 @@ id = 100002 ai_chance = {factor = 100} - FROM = { country_event = {id = 100013 days = 0}} + FROM = { country_event = {id = 100010 days = 0}} - FROM = { country_event = {id = 100003 days = 0}} + FROM = { country_event = {id = 100011 days = 0}} } @@ -106,7 +122,7 @@ id = 100002 country_event = { - id = 100004 + id = 100006 title = "$FROMCOUNTRY$ Grants Aid" @@ -122,9 +138,9 @@ country_event = { FROM = { - country_event = {id = 100003 days = 0} + country_event = {id = 100011 days = 0} - country_event = {id = 100005 days = 0} + country_event = {id = 100012 days = 0} } @@ -135,7 +151,7 @@ FROM = { country_event = { - id = 100006 + id = 100007 title = "$FROMCOUNTRY$ Grants Aid" @@ -151,21 +167,47 @@ country_event = { ai_chance = {factor = 100} FROM = { - country_event = {id = 100005 days = 0} + country_event = {id = 100012 days = 0} - country_event = {id = 100007 days = 0} + country_event = {id = 100013 days = 0} } } +} + +country_event = { + + id = 100008 + + title = "$FROMCOUNTRY$ Grants Aid" + + is_triggered_only = yes + desc = "$FROMCOUNTRY$ has decided to give us aid on the order of millions of pounds." + + allow_multiple_instances = yes + + option = { + + name = "Great!" + ai_chance = {factor = 100} + + FROM = { + country_event = {id = 100012 days = 0} + + country_event = {id = 100014 days = 0} + + } + + } + } - country_event = { - id = 100008 + id = 100009 title = "$FROMCOUNTRY$ Grants Aid" @@ -180,9 +222,9 @@ country_event = { ai_chance = {factor = 100} FROM = { - country_event = {id = 100007 days = 0} + country_event = {id = 100013 days = 0} - country_event = {id = 100009 days = 0} + country_event = {id = 100015 days = 0} } diff --git a/icen_PUIR/events/grants 2.txt b/icen_PUIR/events/grants 2.txt index 20dce17..632fbd8 100644 --- a/icen_PUIR/events/grants 2.txt +++ b/icen_PUIR/events/grants 2.txt @@ -14,14 +14,14 @@ country_event = { option = { ai_chance={factor=100} name = "Our money is better spent at home." - FROM = { country_event = {id = 100010 days = 0} } + FROM = { country_event = {id = 100016 days = 0} } } option = { name = "Thousands of Pounds" FROM = { - country_event = {id = 100002 days = 0} + country_event = {id = 100005 days = 0} } ai_chance = {factor = 100} @@ -31,28 +31,29 @@ country_event = { name = "Tens of Thousands of Pounds" FROM = { - country_event = {id = 100004 days = 0} + country_event = {id = 100006 days = 0} } } } + country_event = { is_triggered_only = yes - id = 100011 + id = 100002 title = "$FROMCOUNTRY$ Requests Aid" desc = "$FROMCOUNTRY$ has asked we give them a grant. How much should we give?" allow_multiple_instances = yes option = { ai_chance={factor=100} name = "Our money is better spent at home." - FROM = { country_event = {id = 100010 days = 0} } + FROM = { country_event = {id = 100016 days = 0} } } option = { name = "Thousands of Pounds" FROM = { - country_event = {id = 100002 days = 0} + country_event = {id = 100005 days = 0} } ai_chance = {factor = 100} @@ -62,7 +63,7 @@ country_event = { name = "Tens of Thousands of Pounds" FROM = { - country_event = {id = 100004 days = 0} + country_event = {id = 100006 days = 0} } } @@ -70,28 +71,29 @@ country_event = { name = "Hundreds of Thousands of Pounds" FROM = { - country_event = {id = 100006 days = 0} + country_event = {id = 100007 days = 0} } } } + country_event = { is_triggered_only = yes - id = 100012 + id = 100003 title = "$FROMCOUNTRY$ Requests Aid" desc = "$FROMCOUNTRY$ has asked we give them a grant. How much should we give?" allow_multiple_instances = yes option = { ai_chance={factor=100} name = "Our money is better spent at home." - FROM = { country_event = {id = 100010 days = 0} } + FROM = { country_event = {id = 100016 days = 0} } } option = { name = "Thousands of Pounds" FROM = { - country_event = {id = 100002 days = 0} + country_event = {id = 100005 days = 0} } ai_chance = {factor = 100} @@ -101,7 +103,7 @@ country_event = { name = "Tens of Thousands of Pounds" FROM = { - country_event = {id = 100004 days = 0} + country_event = {id = 100006 days = 0} } } @@ -109,7 +111,7 @@ country_event = { name = "Hundreds of Thousands of Pounds" FROM = { - country_event = {id = 100006 days = 0} + country_event = {id = 100007 days = 0} } } option = { @@ -122,8 +124,113 @@ country_event = { } country_event = { + is_triggered_only = yes - id = 100003 + id = 100004 + title = "$FROMCOUNTRY$ Requests Aid" + desc = "$FROMCOUNTRY$ has asked we give them a grant. How much should we give?" + allow_multiple_instances = yes + option = { + ai_chance={factor=100} + name = "Our money is better spent at home." + FROM = { country_event = {id = 100016 days = 0} } + + } + option = { + name = "Thousands of Pounds" + + FROM = { + country_event = {id = 100005 days = 0} + + } + ai_chance = {factor = 100} + } + + option = { + name = "Tens of Thousands of Pounds" + + FROM = { + country_event = {id = 100006 days = 0} + } + } + + option = { + name = "Hundreds of Thousands of Pounds" + + FROM = { + country_event = {id = 100007 days = 0} + } + } + option = { + name = "Millions of Pounds" + + FROM = { + country_event = {id = 100009 days = 0} + } + } +} + +country_event = { + id = 100010 + title = "Choose Aid for $FROMCOUNTRY$" + desc = "How much aid would you like to give $FROMCOUNTRY$ (hundreds of pounds)" + allow_multiple_instances = yes + is_triggered_only = yes + option = { + name = "0 pounds" + } + option = { + name = "100 pounds" + ai_chance = {factor = 100} + treasury = -100 + FROM = {treasury = 100} + } + option = { + name = "200 pounds" + treasury = -200 + FROM = {treasury = 200} + } + option = { + name = "300 pounds" + treasury = -300 + FROM = {treasury = 300} + } + option = { + name = "400 pounds" + treasury = -400 + FROM = {treasury = 400} + } + option = { + name = "500 pounds" + treasury = -500 + FROM = {treasury = 500} + } + option = { + name = "600 pounds" + treasury = -600 + FROM = {treasury = 600} + } + option = { + name = "700 pounds" + treasury = -700 + FROM = {treasury = 700} + } + option = { + name = "800 pounds" + treasury = -800 + FROM = {treasury = 800} + } + option = { + name = "900 pounds" + treasury = -900 + FROM = {treasury = 900} + } + +} + +country_event = { + is_triggered_only = yes + id = 100011 title = "Choose Aid for $FROMCOUNTRY$" desc = "How much money would you like to give $FROMCOUNTRY$ (thousands)?" allow_multiple_instances = yes @@ -179,7 +286,7 @@ country_event = { } country_event = { - id = 100005 + id = 100012 title = "Choose Aid for $FROMCOUNTRY$" desc = "How much money would you like to give $FROMCOUNTRY$ (tens of thousands)?" allow_multiple_instances = yes @@ -236,7 +343,7 @@ country_event = { } country_event = { - id = 100007 + id = 100013 title = "Choose Aid for $FROMCOUNTRY$" desc = "How much money would you like to give $FROMCOUNTRY$ (hundreds of thousands)?" allow_multiple_instances = yes @@ -292,8 +399,83 @@ country_event = { } } +#small million country_event = { - id = 100009 + id = 100014 + title = "Choose Aid for $FROMCOUNTRY$" + desc = "How much money would you like to give $FROMCOUNTRY$ (millions)?" + allow_multiple_instances = yes + is_triggered_only = yes + option = { + name = "0 pounds" + } + option = { + name = "1000000 pounds" + ai_chance = {factor = 100} + money = -1000000 + FROM = {money = 1000000} + } + option = { + name = "1500000 pounds" + money = -1500000 + FROM = {money = 1500000} + } + option = { + name = "2000000 pounds" + money = -2000000 + FROM = {money = 2000000} + } + option = { + name = "2500000 pounds" + money = -2000000 + FROM = {money = 2000000} + money = -500000 + FROM = {money = 500000} + } + option = { + name = "3000000 pounds" + money = -2000000 + FROM = {money = 2000000} + money = -1000000 + FROM = {money = 1000000} + } + option = { + name = "3500000 pounds" + money = -2000000 + FROM = {money = 2000000} + money = -1500000 + FROM = {money = 1500000} + } + option = { + name = "4000000 pounds" + money = -2000000 + FROM = {money = 2000000} + money = -2000000 + FROM = {money = 2000000} + } + option = { + name = "4500000 pounds" + money = -2000000 + FROM = {money = 2000000} + money = -2000000 + FROM = {money = 2000000} + money = -500000 + FROM = {money = 500000} + } + option = { + name = "5000000 pounds" + money = -2000000 + FROM = {money = 2000000} + money = -2000000 + FROM = {money = 2000000} + money = -1000000 + FROM = {money = 1000000} + } +} + +#large million +country_event = { + id = 100015 title = "Choose Aid for $FROMCOUNTRY$" desc = "How much money would you like to give $FROMCOUNTRY$ (millions)?" allow_multiple_instances = yes @@ -382,7 +564,7 @@ country_event = { } country_event = { - id = 100010 + id = 100016 title = "$FROMCOUNTRY$ Declines Aid Request" desc = "$FROMCOUNTRY$ decided against giving us a grant" allow_multiple_instances = yes @@ -392,61 +574,3 @@ country_event = { name = "I guess we just have to print more money..." } } - -country_event = { - id = 100013 - title = "Choose Aid for $FROMCOUNTRY$" - desc = "How much aid would you like to give $FROMCOUNTRY$ (hundreds of pounds)" - allow_multiple_instances = yes - is_triggered_only = yes - option = { - name = "0 pounds" - } - option = { - name = "100 pounds" - ai_chance = {factor = 100} - treasury = -100 - FROM = {treasury = 100} - } - option = { - name = "200 pounds" - treasury = -200 - FROM = {treasury = 200} - } - option = { - name = "300 pounds" - treasury = -300 - FROM = {treasury = 300} - } - option = { - name = "400 pounds" - treasury = -400 - FROM = {treasury = 400} - } - option = { - name = "500 pounds" - treasury = -500 - FROM = {treasury = 500} - } - option = { - name = "600 pounds" - treasury = -600 - FROM = {treasury = 600} - } - option = { - name = "700 pounds" - treasury = -700 - FROM = {treasury = 700} - } - option = { - name = "800 pounds" - treasury = -800 - FROM = {treasury = 800} - } - option = { - name = "900 pounds" - treasury = -900 - FROM = {treasury = 900} - } - -} From e004c1e96852cc51b594e48b9156844d8de415dc Mon Sep 17 00:00:00 2001 From: sbmunch Date: Thu, 11 Mar 2021 09:33:04 +0100 Subject: [PATCH 2/3] Bug fix --- icen_PUIR/events/grants 1.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/icen_PUIR/events/grants 1.txt b/icen_PUIR/events/grants 1.txt index c23f56e..dfc3ab3 100644 --- a/icen_PUIR/events/grants 1.txt +++ b/icen_PUIR/events/grants 1.txt @@ -30,7 +30,7 @@ country_event = { ai = no money = 10000 - NOT = { money = 1000000 } + NOT = { money = 500000 } } @@ -47,7 +47,7 @@ country_event = { ai = no money = 500000 - NOT = { money = 10000000 } + NOT = { money = 2000000 } } @@ -64,6 +64,7 @@ country_event = { ai = no money = 2000000 + NOT = { money = 6000000 } } From e7d6c618b20607e7ba465622817f31bc7e3c6bf5 Mon Sep 17 00:00:00 2001 From: sbmunch Date: Fri, 12 Mar 2021 09:11:02 +0100 Subject: [PATCH 3/3] Allow take cores when over infamy --- icen_PUIR/common/cb_types.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/icen_PUIR/common/cb_types.txt b/icen_PUIR/common/cb_types.txt index c9cd17e..0f83342 100644 --- a/icen_PUIR/common/cb_types.txt +++ b/icen_PUIR/common/cb_types.txt @@ -400,7 +400,7 @@ acquire_core_state = { good_relation_militancy_factor = 1 can_use = { - this = { NOT = { badboy = 1 } } + #this = { NOT = { badboy = 1 } } NOT = { is_our_vassal = THIS } number_of_states = 2 # annex if you want their last state any_owned_province = { @@ -451,7 +451,7 @@ annex_core_country = { good_relation_militancy_factor = 1 can_use = { - this = { NOT = { badboy = 1 } } + #this = { NOT = { badboy = 1 } } NOT = { is_our_vassal = THIS } any_owned_province = { is_core = THIS @@ -993,7 +993,7 @@ liberate_country = { tag = SCA tag = ITA tag = YUG - #tag = ROM # TODO: shoudl we let the rest be liberated too? + #tag = ROM # TODO: should we let the rest be liberated too? tag = CZH } } @@ -2119,6 +2119,8 @@ acquire_treaty_port = { tag = CHI number_of_states = 2 OR = { + owns = 1496 + owns = 1498 owns = 1566 owns = 1569 owns = 1481 @@ -2126,15 +2128,18 @@ acquire_treaty_port = { owns = 1606 owns = 1608 owns = 3249 + owns = 3256 } } - + allowed_states = { any_owned_province = { is_colonial = no } any_owned_province = { OR = { + province_id = 1496 + province_id = 1498 province_id = 1566 province_id = 1569 province_id = 1481 @@ -2142,6 +2147,7 @@ acquire_treaty_port = { province_id = 1606 province_id = 1608 province_id = 3249 + province_id = 3256 } } not = { any_owned_province = { is_capital = yes } }