joining_rule_non_fascist = { type = joining_rules visible = { NOT = { has_government = nationalist } } ai_will_do = { base = 0 modifier = { add = 1 NOT = { has_government = nationalist } } modifier = { add = 1 has_government = communism } } available = { is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { NOT = { has_government = nationalist } } } joining_rule_non_democratic = { type = joining_rules visible = { NOT = { has_government = democratic } } ai_will_do = { base = 0 modifier = { add = 1 NOT = { has_government = democratic } } modifier = { add = 1 has_government = communism } } available = { is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { NOT = { has_government = democratic } } } joining_rule_non_communist = { type = joining_rules visible = { NOT = { has_government = communism } } ai_will_do = { base = 0 modifier = { add = 1 NOT = { has_government = communism } } modifier = { add = 1 has_government = democratic } } available = { is_locked_faction = no if = { limit = { has_faction_template = faction_template_allies } NOT = { any_enemy_country = { is_major = yes has_government = nationalist } } } } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } if = { limit = { ROOT = { original_tag = JAP } } always = no } else = { always = yes } } trigger = { NOT = { has_government = communism } } } joining_rule_fascist_only = { type = joining_rules ai_will_do = { base = 0 } available = { has_government = fascism is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_government = fascism } } joining_rule_democratic_non_aligned = { type = joining_rules ai_will_do = { base = 0 } available = { has_government = democratic is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { OR = { has_government = democratic has_government = neutrality } } } joining_rule_shia = { type = joining_rules ai_will_do = { base = 0 } available = { has_government = communism has_idea = shia is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_government = communism has_idea = shia } } joining_rule_islamic_only = { type = joining_rules ai_will_do = { base = 0 } available = { OR = { has_idea = shia has_idea = sunni } is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { OR = { has_idea = shia has_idea = sunni } } } joining_rule_same_ideology = { type = joining_rules ai_will_do = { base = 0 } available = { is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_government = FROM } } joining_rule_communist_only = { type = joining_rules ai_will_do = { base = 0 } available = { has_government = communism is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_government = communism } } joining_rule_has_no_war = { type = joining_rules ai_will_do = { base = 0 modifier = { add = 3 has_government = neutrality has_war = no } } available = { is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_war = no } modifier = { improve_relations_maintain_cost_factor = -0.1 } } joining_rule_has_no_offensive_war = { type = joining_rules ai_will_do = { base = 0 } available = { is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_offensive_war = no } modifier = { defensive_war_stability_factor = 0.15 } } joining_rule_sco = { type = joining_rules ai_will_do = { base = 0 modifier = { add = 100 has_idea = CHI_sco_member } modifier = { add = 5 CHI = { check_variable = { var = CHI_chinese_aggression value < -9 } } } } available = { is_locked_faction = no CHI = { has_completed_focus = CHI_Form_the_SCO } NOT = { CHI = { OR = { has_completed_focus = CHI_Emphasize_Economic_Cooperation has_completed_focus = CHI_Emphasize_Political_Cooperation has_completed_focus = CHI_Emphasize_Military_Cooperation } } } } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_idea = CHI_sco_member } modifier = { political_power_gain = 0.2 trade_opinion_factor = 0.2 } } joining_rule_sco_eco = { type = joining_rules ai_will_do = { base = 0 modifier = { add = 100 has_idea = CHI_sco_member } modifier = { add = 5 CHI = { check_variable = { var = CHI_chinese_aggression value < -9 } } } } available = { is_locked_faction = no CHI = { has_completed_focus = CHI_Emphasize_Economic_Cooperation } } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_idea = CHI_sco_member } modifier = { political_power_gain = 0.2 trade_opinion_factor = 0.2 production_speed_buildings_factor = 0.1 research_speed_factor = 0.1 generate_wargoal_tension = 0.05 receiving_investment_duration_modifier = -0.075 receiving_investment_cost_modifier = -0.075 } } joining_rule_sco_political = { type = joining_rules ai_will_do = { base = 0 modifier = { add = 100 has_idea = CHI_sco_member } modifier = { add = 5 CHI = { check_variable = { var = CHI_chinese_aggression value < -9 } } } } available = { is_locked_faction = no CHI = { has_completed_focus = CHI_Emphasize_Political_Cooperation } } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_idea = CHI_sco_member } modifier = { political_power_gain = 0.2 trade_opinion_factor = 0.2 political_power_factor = 0.1 corruption_cost_factor = -0.1 foreign_subversive_activites = -0.1 communism_drift = 0.02 } } joining_rule_sco_mil = { type = joining_rules ai_will_do = { base = 0 modifier = { add = 100 has_idea = CHI_sco_member } modifier = { add = 5 CHI = { check_variable = { var = CHI_chinese_aggression value < -9 } } } } available = { is_locked_faction = no CHI = { has_completed_focus = CHI_Emphasize_Military_Cooperation } } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_idea = CHI_sco_member } modifier = { political_power_gain = 0.2 trade_opinion_factor = 0.2 experience_gain_army = 0.05 max_planning = 0.1 command_power_gain = 0.1 max_command_power = 10 stability_factor = -0.02 } } # Geographical joining_rule_neighbors_only = { type = joining_rules ai_will_do = { base = 0 modifier = { add = 1 has_government = neutrality has_war = no } } available = { is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { any_neighbor_country = { is_in_faction_with = FROM } } modifier = { enemy_justify_war_goal_time = 0.2 } } joining_rule_same_continent_only = { type = joining_rules ai_will_do = { base = 0 } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } faction_manifest_fulfillment > 0.75 } available = { is_locked_faction = no } trigger = { ROOT = { is_on_same_continent_as = FROM } } modifier = { enemy_justify_war_goal_time = 0.1 } } joining_rule_africa_only = { type = joining_rules visible = { capital_scope = { is_on_continent = africa } } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } faction_manifest_fulfillment > 0.95 } ai_will_do = { base = 0 modifier = { add = 1 is_faction_leader = yes capital_scope = { is_on_continent = africa } } } available = { is_locked_faction = no } trigger = { capital_scope = { is_on_continent = africa } } modifier = { enemy_justify_war_goal_time = 0.1 } } joining_rule_americas_only = { type = joining_rules visible = { capital_scope = { OR = { is_on_continent = north_america is_on_continent = south_america } } } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } faction_manifest_fulfillment > 0.95 } ai_will_do = { base = 0 } available = { is_locked_faction = no } trigger = { capital_scope = { OR = { is_on_continent = north_america is_on_continent = south_america } } } modifier = { enemy_justify_war_goal_time = 0.1 } } joining_rule_puppets_only = { type = joining_rules can_remove = { NOT = { ROOT = { is_locked_faction = yes } } faction_manifest_fulfillment > 0.95 } ai_will_do = { base = 0 } available = { is_locked_faction = no } trigger = { ROOT = { is_subject_of = FROM } } modifier = { subjects_autonomy_gain = -0.05 } } joining_rule_east_asia_only = { type = joining_rules ai_will_do = { base = 0 } visible = { OR = { original_tag = JAP original_tag = KOR original_tag = NKR original_tag = MON original_tag = HKG original_tag = MAC } } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } faction_manifest_fulfillment > 0.95 } available = { is_locked_faction = no } trigger = { OR = { original_tag = JAP original_tag = KOR original_tag = NKR original_tag = MON original_tag = HKG original_tag = MAC } } } joining_rule_asia_pacific_ocenania_only = { type = joining_rules ai_will_do = { base = 0 } visible = { OR = { capital_scope = { is_on_continent = asia } capital_scope = { is_on_continent = australia } } } available = { is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { OR = { capital_scope = { is_on_continent = asia } capital_scope = { is_on_continent = australia } } } } joining_rule_asia_only = { type = joining_rules ai_will_do = { base = 0 } visible = { capital_scope = { is_on_continent = asia } } available = { is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { capital_scope = { is_on_continent = asia } } } joining_rule_commonwealth_nation_only = { type = joining_rules ai_will_do = { base = 0 } visible = { has_dynamic_modifier = { modifier = Commonwealth_member_modifier } } available = { is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { has_dynamic_modifier = { modifier = Commonwealth_member_modifier } } } joining_rule_muslim_brotherhood_nations_only = { type = joining_rules ai_will_do = { base = 0 } visible = { neutrality_neutral_muslim_brotherhood_are_in_power = yes } available = { is_locked_faction = no } can_remove = { NOT = { ROOT = { is_locked_faction = yes } } } trigger = { neutrality_neutral_muslim_brotherhood_are_in_power = yes } }