SWE_estonia_is_protected = { # If Estonia is protected, do not attack. allowed = { original_tag = SWE } enable = { OR = { has_wargoal_against = EST has_completed_focus = SWE_unification_baltiska } EST = { OR = { # Check if EST is member of major bloc, or is too strong on its own to attack has_idea = EU_member has_idea = NATO_member strength_ratio = { tag = SWE ratio > 0.8 } } } } abort_when_not_enabled = yes ai_strategy = { type = declare_war id = EST value = -4000 } } SWE_finland_is_protected = { # If Finland is protected, do not attack. allowed = { original_tag = SWE } enable = { OR = { has_wargoal_against = FIN has_completed_focus = SWE_rikshalvan_reunited } FIN = { OR = { has_idea = EU_member has_idea = NATO_member strength_ratio = { tag = SWE ratio > 0.8 } } } NOT = { SWE = { is_in_faction_with = GER } } } abort_when_not_enabled = yes ai_strategy = { type = declare_war id = FIN value = -4000 } } SWE_prepare_to_attack_FIN = { allowed = { original_tag = SWE } enable = { country_exists = FIN NOT = { # If Finland is too protected, don't bother preparing for war; move onto next targets. FIN = { OR = { has_idea = NATO_member has_idea = EU_member is_in_faction_with = SOV is_in_faction_with = GER is_in_faction_with = USA } } } has_war = no OR = { has_wargoal_against = FIN has_completed_focus = SWE_rikshalvan_reunited } } abort_when_not_enabled = yes ai_strategy = { type = prepare_for_war id = FIN value = 4000 } } SWE_prepare_to_attack_estonia = { allowed = { original_tag = SWE } enable = { country_exists = EST has_war = no OR = { has_wargoal_against = EST has_completed_focus = SWE_unification_baltiska } } abort_when_not_enabled = yes ai_strategy = { type = prepare_for_war id = EST value = 4000 } } SWE_prepare_to_attack_norway = { # After Finland is conquered or pacified (or is too protected), move on to Norway allowed = { original_tag = SWE } enable = { country_exists = NRY has_war = no OR = { FIN = { OR = { exists = no is_in_faction_with = SWE is_subject_of = SWE has_idea = NATO_member has_idea = EU_member is_in_faction_with = SOV # If Finland too protected, move on to attack Norway instead is_in_faction_with = GER is_in_faction_with = USA } } SWE = { owns_state = 111 owns_state = 145 owns_state = 149 } } } abort_when_not_enabled = yes ai_strategy = { type = prepare_for_war id = NRY value = 4000 } ai_strategy = { type = conquer id = NRY value = 400 } } SWE_norway_too_stronk = { # Norway is too strong to attack allowed = { original_tag = SWE } enable = { country_exists = NRY NRY = { OR = { strength_ratio = { tag = SWE ratio > 1 } has_idea = NATO_member has_idea = EU_member } } } abort_when_not_enabled = yes ai_strategy = { type = declare_war id = NRY value = -4000 } } SWE_denmark_too_stronk = { # Denmark is too strong to attack allowed = { original_tag = SWE } enable = { country_exists = DEN DEN = { OR = { strength_ratio = { tag = SWE ratio > 1 } has_idea = NATO_member has_idea = EU_member } } } abort_when_not_enabled = yes ai_strategy = { type = declare_war id = DEN value = -4000 } } SWE_prepare_to_attack_denmark = { # After Norway and Finland are conquered or pacified, move on to Denmark allowed = { original_tag = SWE } enable = { country_exists = DEN has_war = no OR = { FIN = { OR = { exists = no is_in_faction_with = SWE is_subject_of = SWE } } SWE = { owns_state = 111 owns_state = 145 owns_state = 149 } } OR = { NRY = { OR = { exists = no is_in_faction_with = SWE is_subject_of = SWE } } SWE = { owns_state = 30 owns_state = 31 owns_state = 32 owns_state = 542 } } } abort_when_not_enabled = yes ai_strategy = { type = prepare_for_war id = DEN value = 4000 } ai_strategy = { type = conquer id = DEN value = 400 } } ##Sweden unique AI for combat units SWE_default_naval_breakdown = { allowed = { original_tag = SWE } enable = { original_tag = SWE } abort_when_not_enabled = yes ai_strategy = { type = role_ratio id = naval_corvettes value = 25 } ai_strategy = { type = role_ratio id = naval_frigate value = 30 } ai_strategy = { type = role_ratio id = naval_destroyer value = 15 } ai_strategy = { type = role_ratio id = naval_stealth_destroyer value = 2 } ai_strategy = { type = role_ratio id = naval_attack_submarine value = 20 } ai_strategy = { type = role_ratio id = naval_missile_submarine value = 2 } ai_strategy = { type = role_ratio id = naval_helicopter_operator value = 4 } ai_strategy = { type = role_ratio id = naval_carrier value = 1 } ai_strategy = { type = role_ratio id = naval_cruiser value = 1 } } SWE_support_bosnian_against_rsk = { allowed = { original_tag = SWE } enable = { BOS = { has_country_flag = BOS_defeat_all_serbs OR = { has_idea = BOS_EUFOR has_idea = BOS_SFOR } } RSK = { has_war_with = BOS } has_idea = BOS_sfor_vol_troops } abort_when_not_enabled = yes ai_strategy = { type = send_volunteers_desire id = BOS value = 200 } ai_strategy = { type = befriend id = BOS value = 200 } ai_strategy = { type = support id = BOS value = 200 } } SWE_dont_like_russia = { allowed = { original_tag = SWE } enable = { OR = { has_government = democratic has_government = neutrality } country_exists = SOV SOV = { OR = { has_government = communism has_government = nationalist } } } abort_when_not_enabled = yes ai_strategy = { type = antagonize id = "SOV" value = 80 } } SWE_spy_on_SOV = { #Spy on SOV, infiltrate Russian army allowed = { original_tag = SWE } enable = { NOT = { SOV = { is_subject_of = SWE } } NOT = { is_in_faction_with = SOV } } abort_when_not_enabled = yes ai_strategy = { type = operative_mission value = 80 mission = build_intel_network mission_target = SOV } ai_strategy = { type = operative_operation value = 80 operation = operation_capture_cipher operation_target = SOV } # ai_strategy = { type = operative_operation value = 80 operation = operation_infiltrate_armed_forces_navy operation_target = SOV } } SWE_like_scandianvians = { allowed = { original_tag = SWE } enable = { has_idea = EU_member OR = { has_government = democratic has_government = neutrality } } abort_when_not_enabled = yes ai_strategy = { type = befriend id = "DEN" value = 70 } ai_strategy = { type = support id = "DEN" value = 70 } ai_strategy = { type = befriend id = "NRY" value = 70 } ai_strategy = { type = support id = "NRY" value = 70 } ai_strategy = { type = befriend id = "FIN" value = 70 } ai_strategy = { type = support id = "FIN" value = 70 } } SWE_Neutrality = { allowed = { original_tag = SWE } enable = { threat < 0.5 OR = { has_government = democratic has_government = neutrality } } abort_when_not_enabled = yes ai_strategy = { type = alliance id = "USA" value = -100 } ai_strategy = { type = alliance id = "SOV" value = -100 } ai_strategy = { type = alliance id = "CHI" value = -100 } ai_strategy = { type = alliance id = "GER" value = -100 } } SWE_end_Neutrality = { allowed = { original_tag = SWE } enable = { threat > 0.5 OR = { has_government = democratic has_government = neutrality } } abort_when_not_enabled = yes ai_strategy = { type = alliance id = "USA" value = 100 } ai_strategy = { type = alliance id = "SOV" value = -100 } ai_strategy = { type = alliance id = "CHI" value = -100 } ai_strategy = { type = alliance id = "GER" value = 100 } } ## Losing-war brakes for the SWE_royalist_revival "Greater Sweden" conquest branch - back off from a war SWE itself started instead of fighting to the last man