diff --git a/common/autonomous_states/floddstatt.txt b/common/autonomous_states/floddstatt.txt new file mode 100644 index 0000000..54bfe7a --- /dev/null +++ b/common/autonomous_states/floddstatt.txt @@ -0,0 +1,135 @@ +autonomy_state = { + id = fs_core_member + + default = no #Will be a possible option for peace deals + is_puppet = yes + + use_overlord_color = yes + + min_freedom_level = 0.5 #Puts it as 0.2 on the autonomy level scale, which is the same as an integrated puppet. + + manpower_influence = 0.5 + + rule = { + can_not_declare_war = yes + can_decline_call_to_war = no + units_deployed_to_overlord = no + can_be_spymaster = no + contributes_operatives = yes + can_create_collaboration_government = no + } + + modifier = { + autonomy_manpower_share = 0.2 + can_master_build_for_us = 1 + extra_trade_to_overlord_factor = 0.5 + overlord_trade_cost_factor = -0.25 + cic_to_overlord_factor = 0.1 + mic_to_overlord_factor = 0.1 + research_sharing_per_country_bonus_factor = 0.05 + } + + ai_subject_wants_higher = { + factor = 0.0 + } + + ai_overlord_wants_lower = { + factor = 0.0 + } + + allowed = { + OVERLORD = { + has_idea = floddstatt_leader + } + } + + use_for_peace_conference_weight = { + base = 0 + modifier = { + add = 10 + FROM = { + has_wargoal_against = { target = ROOT type = puppet_wargoal_focus } + } # Adds 10 to the chance if the overlord has a wargoal to puppet the country. + } + modifier = { + factor = 2 + tag = ENG # Multiplies the chance by 2 if the subject is UK. + } + } + + can_take_level = { + always = no + } + + can_lose_level = { + always = no + } +} + +autonomy_state = { + id = fs_border_state + + default = no #Will be a possible option for peace deals + is_puppet = yes + + use_overlord_color = no + + min_freedom_level = 0.5 #Puts it as 0.2 on the autonomy level scale, which is the same as an integrated puppet. + + manpower_influence = 0.5 + + rule = { + can_not_declare_war = yes + can_decline_call_to_war = no + units_deployed_to_overlord = no + can_be_spymaster = no + contributes_operatives = yes + can_create_collaboration_government = no + } + + modifier = { + autonomy_manpower_share = 0.2 + can_master_build_for_us = 1 + extra_trade_to_overlord_factor = 0.5 + overlord_trade_cost_factor = -0.25 + cic_to_overlord_factor = 0.1 + mic_to_overlord_factor = 0.1 + research_sharing_per_country_bonus_factor = 0.05 + } + + ai_subject_wants_higher = { + factor = 0.0 + } + + ai_overlord_wants_lower = { + factor = 0.0 + } + + allowed = { + OVERLORD = { + has_idea = floddstatt_leader + } + } + + use_for_peace_conference_weight = { + base = 0 + modifier = { + add = 10 + FROM = { + has_wargoal_against = { target = ROOT type = puppet_wargoal_focus } + } # Adds 10 to the chance if the overlord has a wargoal to puppet the country. + } + modifier = { + factor = 2 + tag = ENG # Multiplies the chance by 2 if the subject is UK. + } + } + + can_take_level = { + always = no + } + + can_lose_level = { + always = no + } +} \ No newline at end of file diff --git a/common/decisions/floddstatt.txt b/common/decisions/floddstatt.txt index 0068088..71ebfb9 100644 --- a/common/decisions/floddstatt.txt +++ b/common/decisions/floddstatt.txt @@ -1,4 +1,14 @@ floddstatt_general = { + + fg_debug_checkelectiontimeout = { + available = { + has_idea = floddstatt_member + is_debug = yes + } + complete_effect = { + country_event = { id = floddstatt.1 } + } + } fg_capital_encouragement = { available = { has_idea = floddstatt_leader @@ -21,7 +31,7 @@ floddstatt_general = { icon = mission_icon is_good = yes days_mission_timeout = 180 - complete_effect = { + timeout_effect = { add_political_power = 100 country_event = { id = floddstatt.1 } } diff --git a/common/on_actions/00_on_actions_floddstatt.txt b/common/on_actions/00_on_actions_floddstatt.txt index fe8481f..0827835 100644 --- a/common/on_actions/00_on_actions_floddstatt.txt +++ b/common/on_actions/00_on_actions_floddstatt.txt @@ -3,11 +3,16 @@ on_actions = { effect = { every_country = { limit = { - has_idea = floddstatt_member + has_idea = floddstatt_leader } flod_set_election_standard = yes - country_event = { id = floddstatt.1 } + } + every_country = { + limit = { + has_idea = floddstatt_member + } activate_mission = fg_election + country_event = { id = floddstatt.0 } } } } diff --git a/common/scripted_effects/floddstatt.txt b/common/scripted_effects/floddstatt.txt index 9676aab..f12194b 100644 --- a/common/scripted_effects/floddstatt.txt +++ b/common/scripted_effects/floddstatt.txt @@ -1,10 +1,128 @@ flod_set_election_standard = { - set_country_flag = flod_elections_in_motion_flag - set_variable = { GRT_ele_support = 1 } - set_variable = { BRK_ele_support = 1 } - set_variable = { CUM_ele_support = 1 } - set_variable = { LAN_ele_support = 1 } - set_variable = { AVI_ele_support = 1 } + set_global_flag = flod_elections_in_motion_flag + set_variable = { global.GRT_ele_support = 1 } + set_variable = { global.BRK_ele_support = 1 } + set_variable = { global.CUM_ele_support = 1 } + set_variable = { global.LAN_ele_support = 1 } + set_variable = { global.AVI_ele_support = 1 } +} + +flod_election_result = { + if = { + limit = { + check_variable = { var = global.GRT_ele_support value = global.BRK_ele_support compare = greater_than } + check_variable = { var = global.GRT_ele_support value = global.CUM_ele_support compare = greater_than } + check_variable = { var = global.GRT_ele_support value = global.LAN_ele_support compare = greater_than } + check_variable = { var = global.GRT_ele_support value = global.AVI_ele_support compare = greater_than } + } + GRT = { + add_ideas = floddstatt_leader + puppet = BRK + puppet = CUM + puppet = LAN + puppet = AVI + puppet = BOR + + set_autonomy = { target = BRK autonomy_state = fs_core_member } + set_autonomy = { target = CUM autonomy_state = fs_core_member } + set_autonomy = { target = LAN autonomy_state = fs_core_member } + set_autonomy = { target = AVI autonomy_state = fs_core_member } + set_autonomy = { target = BOR autonomy_state = fs_border_state } + } + } + + if = { + limit = { + check_variable = { var = global.BRK_ele_support value = global.GRT_ele_support compare = greater_than } + check_variable = { var = global.BRK_ele_support value = global.CUM_ele_support compare = greater_than } + check_variable = { var = global.BRK_ele_support value = global.LAN_ele_support compare = greater_than } + check_variable = { var = global.BRK_ele_support value = global.AVI_ele_support compare = greater_than } + } + BRK = { + add_ideas = floddstatt_leader + puppet = GRT + puppet = CUM + puppet = LAN + puppet = AVI + puppet = BOR + + set_autonomy = { target = GRT autonomy_state = fs_core_member } + set_autonomy = { target = CUM autonomy_state = fs_core_member } + set_autonomy = { target = LAN autonomy_state = fs_core_member } + set_autonomy = { target = AVI autonomy_state = fs_core_member } + set_autonomy = { target = BOR autonomy_state = fs_border_state } + } + } + + if = { + limit = { + check_variable = { var = global.CUM_ele_support value = global.GRT_ele_support compare = greater_than } + check_variable = { var = global.CUM_ele_support value = global.BRK_ele_support compare = greater_than } + check_variable = { var = global.CUM_ele_support value = global.LAN_ele_support compare = greater_than } + check_variable = { var = global.CUM_ele_support value = global.AVI_ele_support compare = greater_than } + } + CUM = { + add_ideas = floddstatt_leader + puppet = BRK + puppet = GRT + puppet = LAN + puppet = AVI + puppet = BOR + + set_autonomy = { target = BRK autonomy_state = fs_core_member } + set_autonomy = { target = GRT autonomy_state = fs_core_member } + set_autonomy = { target = LAN autonomy_state = fs_core_member } + set_autonomy = { target = AVI autonomy_state = fs_core_member } + set_autonomy = { target = BOR autonomy_state = fs_border_state } + } + } + + if = { + limit = { + check_variable = { var = global.LAN_ele_support value = global.GRT_ele_support compare = greater_than } + check_variable = { var = global.LAN_ele_support value = global.BRK_ele_support compare = greater_than } + check_variable = { var = global.LAN_ele_support value = global.CUM_ele_support compare = greater_than } + check_variable = { var = global.LAN_ele_support value = global.AVI_ele_support compare = greater_than } + } + LAN = { + add_ideas = floddstatt_leader + puppet = BRK + puppet = CUM + puppet = GRT + puppet = AVI + puppet = BOR + + set_autonomy = { target = BRK autonomy_state = fs_core_member } + set_autonomy = { target = CUM autonomy_state = fs_core_member } + set_autonomy = { target = GRT autonomy_state = fs_core_member } + set_autonomy = { target = AVI autonomy_state = fs_core_member } + set_autonomy = { target = BOR autonomy_state = fs_border_state } + } + } + + if = { + limit = { + check_variable = { var = global.AVI_ele_support value = global.GRT_ele_support compare = greater_than } + check_variable = { var = global.AVI_ele_support value = global.BRK_ele_support compare = greater_than } + check_variable = { var = global.AVI_ele_support value = global.CUM_ele_support compare = greater_than } + check_variable = { var = global.AVI_ele_support value = global.LAN_ele_support compare = greater_than } + } + AVI = { + add_ideas = floddstatt_leader + puppet = GRT + puppet = BRK + puppet = CUM + puppet = LAN + puppet = BOR + + set_autonomy = { target = GRT autonomy_state = fs_core_member } + set_autonomy = { target = BRK autonomy_state = fs_core_member } + set_autonomy = { target = CUM autonomy_state = fs_core_member } + set_autonomy = { target = LAN autonomy_state = fs_core_member } + set_autonomy = { target = BOR autonomy_state = fs_border_state } + } + } + flod_set_election_standard = yes } ### Add Support For Nation In Floddstatt @@ -12,69 +130,69 @@ flod_set_election_standard = { # GRT flod_grt_support_grow_s = { - add_to_variable = { GRT_ele_support = 1} + add_to_variable = { global.GRT_ele_support = 1} } flod_grt_support_grow_m = { - add_to_variable = { GRT_ele_support = 3} + add_to_variable = { global.GRT_ele_support = 3} } flod_grt_support_grow_l = { - add_to_variable = { GRT_ele_support = 5} + add_to_variable = { global.GRT_ele_support = 5} } # BRK flod_brk_support_grow_s = { - add_to_variable = { BRK_ele_support = 1} + add_to_variable = { global.BRK_ele_support = 1} } flod_brk_support_grow_m = { - add_to_variable = { BRK_ele_support = 3} + add_to_variable = { global.BRK_ele_support = 3} } flod_brk_support_grow_l = { - add_to_variable = { BRK_ele_support = 5} + add_to_variable = { global.BRK_ele_support = 5} } # CUM ;3 flod_cum_support_grow_s = { - add_to_variable = { CUM_ele_support = 1} + add_to_variable = { global.CUM_ele_support = 1} } flod_cum_support_grow_m = { - add_to_variable = { CUM_ele_support = 3} + add_to_variable = { global.CUM_ele_support = 3} } flod_cum_support_grow_l = { - add_to_variable = { CUM_ele_support = 5} + add_to_variable = { global.CUM_ele_support = 5} } # LAN flod_lan_support_grow_s = { - add_to_variable = { LAN_ele_support = 1} + add_to_variable = { global.LAN_ele_support = 1} } flod_lan_support_grow_m = { - add_to_variable = { LAN_ele_support = 3} + add_to_variable = { global.LAN_ele_support = 3} } flod_lan_support_grow_l = { - add_to_variable = { LAN_ele_support = 5} + add_to_variable = { global.LAN_ele_support = 5} } # AVI flod_avi_support_grow_s = { - add_to_variable = { AVI_ele_support = 1} + add_to_variable = { global.AVI_ele_support = 1} } flod_avi_support_grow_m = { - add_to_variable = { AVI_ele_support = 3} + add_to_variable = { global.AVI_ele_support = 3} } flod_avi_support_grow_l = { - add_to_variable = { AVI_ele_support = 5} + add_to_variable = { global.AVI_ele_support = 5} } \ No newline at end of file diff --git a/events/floddstatt_common.txt b/events/floddstatt_common.txt index 3abaace..5c2dad7 100644 --- a/events/floddstatt_common.txt +++ b/events/floddstatt_common.txt @@ -1,9 +1,31 @@ add_namespace = floddstatt +country_event = { + id = floddstatt.0 + title = floddstatt.0.t + desc = floddstatt.0.d + picture = GFX_report_event_generic_picture + + is_triggered_only = yes + + trigger = { + always = no + } + + immediate = { + # Add any immediate effects here + } + + option = { + name = floddstatt.0.a + add_political_power = 5 + } +} + country_event = { id = floddstatt.1 title = floddstatt.1.t - desc = floddstatt.1.desc + desc = floddstatt.1.d picture = GFX_report_event_generic_picture is_triggered_only = yes @@ -13,12 +35,29 @@ country_event = { } immediate = { - # Add any immediate effects here + clr_global_flag = flod_elections_in_motion_flag + every_country = { + limit = { + OR = { + has_idea = floddstatt_member + has_idea = floddstatt_border + } + NOT = { + has_idea = floddstatt_leader + } + } + overlord = { + add_political_power = 300 + set_autonomy = { + target = PREV + autonomous_state = autonomy_free + } + } + } } option = { name = floddstatt.1.a - flod_set_election_standard = yes - activate_mission = fg_election + flod_election_result = yes } } \ No newline at end of file diff --git a/history/countries/GRT - Gartiva.txt b/history/countries/GRT - Gartiva.txt index fdeafc0..9e1bc07 100644 --- a/history/countries/GRT - Gartiva.txt +++ b/history/countries/GRT - Gartiva.txt @@ -42,3 +42,28 @@ puppet = CUM puppet = LAN puppet = AVI puppet = BOR + +set_autonomy = { + target = BRK + autonomy_state = fs_core_member +} + +set_autonomy = { + target = CUM + autonomy_state = fs_core_member +} + +set_autonomy = { + target = LAN + autonomy_state = fs_core_member +} + +set_autonomy = { + target = AVI + autonomy_state = fs_core_member +} + +set_autonomy = { + target = BOR + autonomy_state = fs_core_member +} \ No newline at end of file diff --git a/localisation/english/decisions_l_english.yml b/localisation/english/decisions_l_english.yml index 6f5c477..93da5c9 100644 --- a/localisation/english/decisions_l_english.yml +++ b/localisation/english/decisions_l_english.yml @@ -141,5 +141,5 @@ ### Floddstatt: - fg_election_desc:0 "The Floddstatt has long been known for it's decentralized and elective ruling system, whereby the many states are elected and take turns governing the foreign policy and the policies of the union's capital. The elections are held twice a year, and it's up to the individual nations to rally support behind their cause and win the votes of the people! Current support is:\n [GRT.GetName] ([?GRT_ele_support])\n [BRK.GetName] ([?BRK_ele_support])\n [CUM.GetName] ([?CUM_ele_support])\n [LAN.GetName] ([?LAN_ele_support])\n [AVI.GetName] ([?AVI_ele_support])\n" + fg_election_desc:0 "The Floddstatt has long been known for it's decentralized and elective ruling system, whereby the many states are elected and take turns governing the foreign policy and the policies of the union's capital. The elections are held twice a year, and it's up to the individual nations to rally support behind their cause and win the votes of the people! Current support is:\n [GRT.GetName] ([?global.GRT_ele_support])\n [BRK.GetName] ([?global.BRK_ele_support])\n [CUM.GetName] ([?global.CUM_ele_support])\n [LAN.GetName] ([?global.LAN_ele_support])\n [AVI.GetName] ([?global.AVI_ele_support])\n" flod_add_support_s:0 "Add §G1§! support for [ROOT.GetName]" \ No newline at end of file