faction_template_generic = {
	# name = defensive_democratic_faction
	manifest = faction_manifest_strength_in_unity
	can_leader_join_other_factions = yes
	# color = { 179 183 235 } # this should default to faction leader's color
	icon = GFX_faction_logo_generic
	visible = {
		always = no # Fallback template, should not be selectable 
	}
	available = {
		has_government = democratic
	}

	goals = {
		# Short term goals
		# faction_goal_growing_the_faction
		# faction_goal_military_infrastructure

		# Medium term goals
		faction_goal_a_military_base

		# Long terms
	}

	default_rules = {
		joining_rule_neighbors_only
		joining_rule_has_no_offensive_war
		dismissal_rule_offensive_war
		change_leader_rule_manpower
	}
	
}

# Generic Conquest Faction - for overrides only 
faction_template_generic_dominance = {
	name = generic_dominance_faction
	manifest = faction_manifest_regional_expansionism
	can_leader_join_other_factions = yes
	icon = GFX_faction_logo_generic_15
	visible = {
		always = no 
	}
	
	goals = {
		# Short term
		# faction_goal_growing_the_faction

		# Medium term

		# Long term
	}

	default_rules = {
		joining_rule_same_continent_only
		generate_wargoal_threat_reduction_20
	}

}

# Defensive Democratic Faction Type
faction_template_defensive_democratic = {
	name = defensive_democratic_faction
	manifest = faction_manifest_defense_of_democracy
	#color = { 179 183 235 }
	icon = GFX_faction_logo_generic_democratic
	can_leader_join_other_factions = yes
	visible = {
		always = yes 
	}
	available = {
		has_government = democratic
	}

	goals = {
		# Short term goals
		# faction_goal_spy_master

		# Medium term goals

		# Long terms
	}

	default_rules = {
		joining_rule_democratic_non_aligned
		joining_rule_same_continent_only
		joining_rule_has_no_offensive_war
		war_declaration_threat_75
		change_leader_rule_industry
		dismissal_rule_offensive_war
		government_in_exile_allowed
	}
	
}

# Suppression of Communism
faction_template_anti_communist = {
	name = coalition_of_liberty_faction
	manifest = faction_manifest_containment_of_communism
	icon = GFX_faction_logo_generic_10
	can_leader_join_other_factions = yes
	visible = {
		always = yes 
	}
	available = {
		NOT = { has_government = communism }
	}

	goals = {
		# Short term goals
		#faction_goal_ensure_military_r_d

		# Medium term goals
		faction_goal_a_military_base

		
	}

	default_rules = {
		faction_peace_rule_ideology_focus
		dismissal_rule_ideology_communist
		joining_rule_non_communist
		guarantee_threat_reduction_15
		change_leader_rule_industry
	}

	
}

# Suppression of Fascism
faction_template_anti_fascist = {
	name = bulwark_pact_faction
	manifest = faction_manifest_suppress_regional_fascism
	icon = GFX_faction_logo_generic_11
	can_leader_join_other_factions = yes
	visible = {
		always = yes 
		any_other_country = {
			has_government = fascism
			is_on_same_continent_as = ROOT
		}
	}
	available = {
		NOT = { has_government = fascism }
		any_other_country = {
			has_government = fascism
			is_on_same_continent_as = ROOT
		}
	}

	goals = {
		# Short term goals
		# faction_goal_preemptive_strike_on_fascism

		# Medium term goals
		faction_goal_aggressive_defense
	}

	default_rules = {
		joining_rule_non_fascist
		generate_wargoal_threat_reduction_20
		change_leader_rule_manpower
		change_leader_rule_industry
	}

	
}

# Suppression of communism at our doorstep 
faction_template_regional_anti_communist = {
	name = regional_anti_communist_faction
	manifest = faction_manifest_suppress_regional_communism
	icon = GFX_faction_logo_generic_11
	can_leader_join_other_factions = yes
	visible = {
		always = yes 
		any_other_country = {
			has_government = communism
			is_on_same_continent_as = ROOT
		}
	}
	available = {
		NOT = { has_government = communism }
		any_other_country = {
			has_government = communism
			is_on_same_continent_as = ROOT
		}
	}

	goals = {
		# Short term goals
		# faction_goal_spy_master

		# Medium term goals
		faction_goal_aggressive_defense

	}

	default_rules = {
		joining_rule_non_communist
		generate_wargoal_threat_reduction_20
		change_leader_rule_manpower
		change_leader_rule_industry
	}

	
}

# Suppression of Democracy locally
faction_template_regional_anti_democratic = {
	name = regional_anti_democratic_faction
	manifest = faction_manifest_suppress_regional_democracy
	icon = GFX_faction_logo_generic_11
	can_leader_join_other_factions = yes
	visible = {
		always = yes 
		any_other_country = {
			has_government = democratic
			is_on_same_continent_as = ROOT
		}
	}
	available = {
		NOT = { has_government = democratic }
		any_other_country = {
			has_government = democratic
			is_on_same_continent_as = ROOT
		}
	}

	goals = {
		# Short term goals
		# faction_goal_war_on_democracy

		# Medium term goals

		# Long terms
	}

	default_rules = {
		joining_rule_non_democratic
		change_leader_rule_manpower
		change_leader_rule_industry
	}

	
}

# Regional Defense Pact 
faction_template_regional = {
	name = regional_faction
	manifest = faction_manifest_strength_in_unity
	icon = GFX_faction_logo_generic
	# color = { 255 0 255 }
	can_leader_join_other_factions = yes
	visible = {
		NOT = { has_government = communism }
		NOT = { has_government = fascism }
		NOT = { capital_scope = { is_on_continent = europe } } # There is a European one so no need to use the generic one there
	}

	goals = {
		# Short term goals
		# faction_goal_growing_the_faction
		# faction_goal_ensure_military_r_d

		# Medium term goals
		faction_goal_industrial_expansion

		# Long terms
		
	}

	default_rules = {
		joining_rule_has_no_war
		joining_rule_same_ideology
		joining_rule_neighbors_only
		faction_peace_take_claimed_focus
		change_leader_rule_manpower
		war_declaration_threat_25
	}
	
	
}

# World Revolution
faction_template_world_revolution = {
	name = world_revolution_faction
	manifest = faction_manifest_spread_of_communism
	can_leader_join_other_factions = yes
	icon = GFX_faction_logo_generic_14
	visible = {
		always = yes 
	}
	available = {
		has_government = communism 
	}

	goals = {
		# Short term goals
		#faction_goal_spy_master

		# Medium term goals

		# Long terms


	}

	default_rules = {
		faction_peace_rule_ideology_focus
		joining_rule_communist_only
		dismissal_rule_ideology_not_communism
		change_leader_rule_manpower
		war_declaration_threat_25
	}
	
}


# Industrial Powerhouse
faction_template_industrial_focus = {
	name = industrial_powerhouse_faction
	manifest = faction_manifest_strategic_resource_control
	can_leader_join_other_factions = yes
	icon = GFX_faction_logo_generic_16
	visible = {
		always = yes 
	}
	available = {
		
	}

	goals = {
		# Short term
		# faction_goal_military_infrastructure

		# Medium term
		faction_goal_industrial_research

		# Long term

	}

	default_rules = {
		joining_rule_same_ideology
		joining_rule_same_continent_only
		joining_rule_has_no_war
		faction_peace_rule_ideology_focus
		change_leader_rule_industry
		war_declaration_threat_50
	}
	
}

# African Unity 
faction_template_african_unity = {
	name = african_unity_faction
	manifest = faction_manifest_african_domination
	can_leader_join_other_factions = yes
	icon = GFX_faction_logo_generic_18
	visible = {
		capital_scope = {
			is_on_continent = africa
		}
	}
	
	goals = {
		# Short term
		# faction_goal_growing_the_faction

		# Medium term

		# Long term

	}

	default_rules = {
		joining_rule_africa_only
		faction_peace_rule_liberation_focus
		generate_wargoal_threat_reduction_20
		change_leader_rule_industry
	}

}

# Pan-American 
faction_template_pan_american = {
	name = pan_american_faction
	manifest = faction_manifest_pan_americanism
	can_leader_join_other_factions = yes
	icon = GFX_faction_logo_generic_17
	visible = {
		capital_scope = {
			OR = {
				is_on_continent = north_america
				is_on_continent = south_america
			}
		}
	}
	
	goals = {
		# Short term
		# faction_goal_spy_master

		# Medium term
		
		# Long term
	}

	default_rules = {
		joining_rule_americas_only
		faction_peace_rule_liberation_focus
		guarantee_threat_reduction_15
		change_leader_rule_manpower
	}

}

# Hispanic Alliance 
faction_template_hipanic_alliance_faction = {
	name = CHL_hipanic_alliance_faction
	manifest = faction_manifest_pan_americanism
	can_leader_join_other_factions = no
	icon = GFX_faction_logo_generic_17
	visible = {
		OR = {
			original_tag = MEX
			original_tag = RIG
			original_tag = YUC
			original_tag = ARG
			original_tag = CHL
			original_tag = PRU
			original_tag = PAR
			original_tag = URG
			original_tag = BOL
			original_tag = ECU
			original_tag = COL
			original_tag = VEN
			original_tag = PAN
			original_tag = PUE
			original_tag = DOM
			original_tag = CUB
			original_tag = PAN
			original_tag = COS
			original_tag = NIC
			original_tag = HON
			original_tag = ELS
			original_tag = EQG
			original_tag = SPR
		}
	}
	
	goals = {
		# Short term

		# Medium term
		# Long term
	}

	default_rules = {
		joining_rule_hispanic_only
		change_leader_rule_manpower
	}

}

# European Unity 
faction_template_european_unity = {
	name = european_unity_faction
	manifest = faction_manifest_strength_in_unity
	can_leader_join_other_factions = yes
	icon = GFX_faction_logo_generic_13
	visible = {
		capital_scope = {
			is_on_continent = europe
		}
		NOT = {
			has_government = fascism 
		}
	}
	available = {
		NOT = {
			has_government = fascism 
		}
	}
	
	goals = {
		# Short term
		# faction_goal_ensure_military_r_d

		# Medium term
		faction_goal_convoy_escort_force
		
		# Long term
	}

	default_rules = {
		joining_rule_same_continent_only
		faction_peace_rule_liberation_focus
		guarantee_threat_reduction_15
		change_leader_rule_manpower
	}

}

# European Dominance 
faction_template_european_dominance = {
	name = european_dominance_faction
	manifest = faction_manifest_european_dominance
	can_leader_join_other_factions = yes
	icon = GFX_faction_logo_generic_fascist
	visible = {
		capital_scope = {
			is_on_continent = europe
		}
		has_government = fascism
	}
	
	goals = {
		# Short term
		# faction_goal_military_infrastructure

		# Medium term
		
		# Long term
	}

	default_rules = {
		joining_rule_neighbors_only
		faction_peace_take_claimed_focus
		change_leader_rule_manpower
	}

}

# European Dominance (monarchist)
faction_template_european_dominance_monarchist = {
	name = european_dominance_faction
	manifest = faction_manifest_european_dominance
	can_leader_join_other_factions = yes
	icon = GFX_faction_logo_generic_7
	visible = {
		capital_scope = {
			is_on_continent = europe
		}
		has_government = neutrality
	}
	
	goals = {
		# Short term
		# faction_goal_military_infrastructure

		# Medium term
		
	}

	default_rules = {
		joining_rule_neighbors_only
		faction_peace_take_claimed_focus
		change_leader_rule_manpower
	}

}

# Asian Dominance 
faction_template_asian_dominance = {
	name = asian_dominance_faction
	manifest = faction_manifest_asian_dominance
	can_leader_join_other_factions = yes
	icon = GFX_faction_logo_generic_15
	visible = {
		capital_scope = {
			is_on_continent = asia
		}
	}
	
	goals = {
		# Short term

		# Medium term
		
		# Long term
	}

	default_rules = {
		joining_rule_same_continent_only
		faction_peace_rule_puppeting_focus
		generate_wargoal_threat_reduction_20
		change_leader_rule_manpower
	}

}

# Middle Eastern Dominance 
faction_template_middle_east_dominance = {
	name = middle_east_dominance_faction
	manifest = faction_manifest_middle_east_dominance
	can_leader_join_other_factions = yes
	icon = GFX_faction_logo_generic_15
	visible = {
		capital_scope = {
			is_on_continent = middle_east
		}
	}
	
	goals = {
		# Short term

		# Medium term

		# Long term
	}

	default_rules = {
		joining_rule_same_continent_only
		faction_peace_rule_puppeting_focus
		generate_wargoal_threat_reduction_20
		change_leader_rule_manpower
	}

}

