﻿add_namespace = balkanized_usa

# country_event = { # Buy Foreign Equipment Hidden Event
# 	id = balkanized_usa.16
# 	hidden = yes
# 	is_triggered_only = yes
# 	immediate = {
# 		hidden_effect = { FROM = { country_event = { id = balkanized_usa.17 } } }
# 	}
# }

# country_event = { # Buy Newest Equipment
# 	id = balkanized_usa.17
# 	title = balkanized_usa.17.t
# 	desc = balkanized_usa.17.d
# 	is_triggered_only = yes
# 	option = {
# 		name = balkanized_usa.17.a
# 		trigger = { FROM = { has_tech = rifle_equipment1 } }
# 		ai_chance = { base = 100 }
# 		NA_B_buy_newest_rifles = yes
# 		FROM = {
# 			add_political_power = 50
# 			add_timed_idea = {
# 				idea = generic_Sold_Weapons_To_ASA
# 				days = 270
# 			}
# 		}
# 		add_ideas = NA_B_Buying_Foreign_Rifles
# 	}
# 	option = {
# 		name = balkanized_usa.17.b
# 		trigger = { FROM = { has_tech = tech_infantry_napoleonic_uniform } }
# 		ai_chance = { base = 100 }
# 		NA_B_buy_newest_uniforms = yes
# 		FROM = {
# 			add_political_power = 50
# 			add_timed_idea = {
# 				idea = generic_Sold_Uniforms_To_ASA
# 				days = 270
# 			}
# 		}
# 		add_ideas = NA_B_Buying_Foreign_Uniforms
# 	}
# 	option = {
# 		name = balkanized_usa.17.c
# 		trigger = { FROM = { has_tech = gw_artillery } }
# 		ai_chance = { base = 100 }
# 		NA_B_buy_newest_cannons = yes
# 		FROM = {
# 			add_political_power = 50
# 			add_timed_idea = {
# 				idea = generic_Sold_Cannons_To_ASA
# 				days = 270
# 			}
# 		}
# 		add_ideas = NA_B_Buying_Foreign_Cannons
# 	}
# 	option = {
# 		name = balkanized_usa.17.d
# 		ai_chance = { base = 100 }
# 		hidden_effect = { FROM = { country_event = { id = balkanized_usa.18 } } }
# 	}
# }

# country_event = { # Cycle To Second Oldest Equipment
# 	id = balkanized_usa.18
# 	hidden = yes
# 	is_triggered_only = yes
# 	immediate = {
# 		hidden_effect = { FROM = { country_event = { id = balkanized_usa.19 } } }
# 	}
# }

# country_event = { # Buy Second Oldest Equipment
# 	id = balkanized_usa.19
# 	title = balkanized_usa.19.t
# 	desc = balkanized_usa.19.d
# 	is_triggered_only = yes
# 	option = {
# 		name = balkanized_usa.19.a
# 		trigger = { FROM = { has_tech = rifle_equipment2 } }
# 		ai_chance = { base = 100 }
# 		NA_B_buy_second_oldest_rifles = yes
# 		FROM = {
# 			add_political_power = 50
# 			add_timed_idea = {
# 				idea = generic_Sold_Weapons_To_ASA
# 				days = 270
# 			}
# 		}
# 		add_ideas = NA_B_Buying_Foreign_Rifles
# 	}
# 	option = {
# 		name = balkanized_usa.19.b
# 		trigger = { FROM = { has_tech = vic_army_cloth } }
# 		ai_chance = { base = 100 }
# 		NA_B_buy_second_oldest_uniforms = yes
# 		FROM = {
# 			add_political_power = 50
# 			add_timed_idea = {
# 				idea = generic_Sold_Uniforms_To_ASA
# 				days = 270
# 			}
# 		}
# 		add_ideas = NA_B_Buying_Foreign_Uniforms
# 	}
# 	option = {
# 		name = balkanized_usa.19.c
# 		trigger = { FROM = { has_tech = improved_smoothbore } }
# 		ai_chance = { base = 100 }
# 		NA_B_buy_second_oldest_cannons = yes
# 		FROM = {
# 			add_political_power = 50
# 			add_timed_idea = {
# 				idea = generic_Sold_Cannons_To_ASA
# 				days = 270
# 			}
# 		}
# 		add_ideas = NA_B_Buying_Foreign_Cannons
# 	}
# 	option = {
# 		name = balkanized_usa.19.d
# 		ai_chance = { base = 100 }
# 		hidden_effect = { FROM = { country_event = { id = balkanized_usa.20 } } }
# 	}
# }

# country_event = { # Cycle To Newest Equipment
# 	id = balkanized_usa.20
# 	hidden = yes
# 	is_triggered_only = yes
# 	immediate = {
# 		hidden_effect = { FROM = { country_event = { id = balkanized_usa.21 } } }
# 	}
# }

# country_event = { # Buy Third Oldest Equipment
# 	id = balkanized_usa.21
# 	title = balkanized_usa.21.t
# 	desc = balkanized_usa.21.d
# 	is_triggered_only = yes
# 	option = {
# 		name = balkanized_usa.21.a
# 		trigger = { FROM = { has_tech = rifle_equipment3 } }
# 		ai_chance = { base = 100 }
# 		NA_B_buy_oldest_rifles = yes
# 		FROM = {
# 			add_political_power = 50
# 			add_timed_idea = {
# 				idea = generic_Sold_Weapons_To_ASA
# 				days = 270
# 			}
# 		}
# 		add_ideas = NA_B_Buying_Foreign_Rifles
# 	}
# 	option = {
# 		name = balkanized_usa.21.b
# 		trigger = { FROM = { has_tech = civil_army_cloth } }
# 		ai_chance = { base = 100 }
# 		NA_B_buy_oldest_uniforms = yes
# 		FROM = {
# 			add_political_power = 50
# 			add_timed_idea = {
# 				idea = generic_Sold_Uniforms_To_ASA
# 				days = 270
# 			}
# 		}
# 		add_ideas = NA_B_Buying_Foreign_Uniforms
# 	}
# 	option = {
# 		name = balkanized_usa.21.c
# 		trigger = { FROM = { has_tech = rml_field_gun } }
# 		ai_chance = { base = 100 }
# 		NA_B_buy_oldest_cannons = yes
# 		FROM = {
# 			add_political_power = 50
# 			add_timed_idea = {
# 				idea = generic_Sold_Cannons_To_ASA
# 				days = 270
# 			}
# 		}
# 		add_ideas = NA_B_Buying_Foreign_Cannons
# 	}
# 	option = {
# 		name = balkanized_usa.21.d
# 		ai_chance = { base = 100 }
# 		hidden_effect = { FROM = { country_event = { id = balkanized_usa.22 } } }
# 	}
# }

# country_event = { # Cycle To Third Oldest Equipment
# 	id = balkanized_usa.22
# 	hidden = yes
# 	is_triggered_only = yes
# 	immediate = {
# 		hidden_effect = { FROM = { country_event = { id = balkanized_usa.17 } } }
# 	}
# }


# ######################### Generic Balkanized Focus Tree #########################

# country_event = {
# 	id = balkanized_usa.13
# 	title = balkanized_usa.13.t
# 	desc = balkanized_usa.13.d

# 	is_triggered_only = yes
	
# 	immediate = {
# 		hidden_effect = {
# 			random_list = {
# 				50 = {
# 					set_country_flag = NA_B_generic_legislation_1_pass
# 				}
# 				50 = {
# 					set_country_flag = NA_B_generic_legislation_1_fail
# 				}
# 			}
# 		}
# 	}
# 	option = {
# 		name = balkanized_usa.13.a
# 		trigger = { has_country_flag = NA_B_generic_legislation_1_pass }
# 		ai_chance = { base = 100 }
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_1_pass }
# 	}
# 	option = {
# 		name = balkanized_usa.13.b
# 		trigger = { has_country_flag = NA_B_generic_legislation_1_pass }
# 		ai_chance = { base = 0 }
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_1_pass }
# 	}
# 	option = {
# 		name = balkanized_usa.13.c
# 		trigger = { has_country_flag = NA_B_generic_legislation_1_fail }
# 		ai_chance = { 
# 			base = 50 
# 		}
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_1_fail }
# 		country_event = { id = balkanized_usa.13 days = 120 random = 60 }
# 	}
# 	option = {
# 		name = balkanized_usa.13.e
# 		trigger = { has_country_flag = NA_B_generic_legislation_1_fail }
# 		ai_chance = { 
# 			base = 50 
# 		}
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_1_fail }
# 	}
# }

# country_event = {
# 	id = balkanized_usa.14
# 	title = balkanized_usa.14.t
# 	desc = balkanized_usa.14.d

# 	is_triggered_only = yes
	
# 	immediate = {
# 		hidden_effect = {
# 			random_list = {
# 				50 = {
# 					set_country_flag = NA_B_generic_legislation_2_pass
# 				}
# 				50 = {
# 					set_country_flag = NA_B_generic_legislation_2_fail
# 				}
# 			}
# 		}
# 	}
# 	option = {
# 		name = balkanized_usa.13.a
# 		trigger = { has_country_flag = NA_B_generic_legislation_2_pass }
# 		ai_chance = { base = 100 }
# 		set_country_flag = NA_B_taxation_legislation_passed_flag
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_2_pass }
# 	}
# 	option = {
# 		name = balkanized_usa.13.b
# 		trigger = { has_country_flag = NA_B_generic_legislation_2_pass }
# 		ai_chance = { base = 0 }
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_2_pass }
# 	}
# 	option = {
# 		name = balkanized_usa.13.c
# 		trigger = { has_country_flag = NA_B_generic_legislation_2_fail }
# 		ai_chance = { 
# 			base = 100 
# 		}
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_2_fail }
# 		country_event = { id = balkanized_usa.14 days = 120 random = 60 }
# 	}
# 	option = {
# 		name = balkanized_usa.13.e
# 		trigger = { has_country_flag = NA_B_generic_legislation_2_fail }
# 		ai_chance = { 
# 			base = 0 
# 		}
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_2_fail }
# 	}
# }

# country_event = {
# 	id = balkanized_usa.15
# 	title = balkanized_usa.15.t
# 	desc = balkanized_usa.15.d

# 	is_triggered_only = yes
	
# 	immediate = {
# 		hidden_effect = {
# 			random_list = {
# 				50 = {
# 					set_country_flag = NA_B_generic_legislation_3_pass
# 				}
# 				50 = {
# 					set_country_flag = NA_B_generic_legislation_3_fail
# 				}
# 			}
# 		}
# 	}
# 	option = {
# 		name = balkanized_usa.13.a
# 		trigger = { has_country_flag = NA_B_generic_legislation_3_pass }
# 		ai_chance = { base = 100 }
# 		hidden_effect = { 
# 			set_country_flag = NA_B_industry_subsidization_bill_passed_flag
# 			clr_country_flag = NA_B_generic_legislation_3_pass 
# 		}
# 	}
# 	option = {
# 		name = balkanized_usa.13.b
# 		trigger = { has_country_flag = NA_B_generic_legislation_3_pass }
# 		ai_chance = { base = 0 }
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_3_pass }
# 	}
# 	option = {
# 		name = balkanized_usa.13.c
# 		trigger = { has_country_flag = NA_B_generic_legislation_3_fail }
# 		ai_chance = { 
# 			base = 100 
# 		}
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_3_fail }
# 		country_event = { id = balkanized_usa.15 days = 120 random = 60 }
# 	}
# 	option = {
# 		name = balkanized_usa.13.e
# 		trigger = { has_country_flag = NA_B_generic_legislation_3_fail }
# 		ai_chance = { 
# 			base = 0 
# 		}
# 		hidden_effect = { clr_country_flag = NA_B_generic_legislation_3_fail }
# 	}
# }


# ################################# Worker Unrest #################################

country_event = {
	id = balkanized_usa.10
	hidden = yes
    is_triggered_only = yes

	immediate = {
		hidden_effect = {
			#NONE
			if = {
				limit = {
					check_variable = { var = ROOT.NA_B_idea_working_class_exploitation_score_var@ROOT value = 1 compare = less_than }
				}
				if = { limit = { has_idea = NA_B_idea_working_class_exploitation_low } remove_ideas = NA_B_idea_working_class_exploitation_low }
				if = { limit = { has_idea = NA_B_idea_working_class_exploitation_medium } remove_ideas = NA_B_idea_working_class_exploitation_medium }
				if = { limit = { has_idea = NA_B_idea_working_class_exploitation_high } remove_ideas = NA_B_idea_working_class_exploitation_high }
			}
			#LOW
			else_if = {
				limit = {
					check_variable = { var = ROOT.NA_B_idea_working_class_exploitation_score_var@ROOT value = 1 compare = greater_than_or_equals }
					check_variable = { var = ROOT.NA_B_idea_working_class_exploitation_score_var@ROOT value = 10 compare = less_than }
					NOT = { has_idea = NA_B_idea_working_class_exploitation_low }
				}
				if = { limit = { has_idea = NA_B_idea_working_class_exploitation_medium } remove_ideas = NA_B_idea_working_class_exploitation_medium }
				if = { limit = { has_idea = NA_B_idea_working_class_exploitation_high } remove_ideas = NA_B_idea_working_class_exploitation_high }
				add_ideas = NA_B_idea_working_class_exploitation_low
			}
			#MEDIUM
			else_if = {
				limit = {
					check_variable = { var = ROOT.NA_B_idea_working_class_exploitation_score_var@ROOT value = 10 compare = greater_than_or_equals }
					check_variable = { var = ROOT.NA_B_idea_working_class_exploitation_score_var@ROOT value = 20 compare = less_than }
					NOT = { has_idea = NA_B_idea_working_class_exploitation_medium }
				}
				if = { limit = { has_idea = NA_B_idea_working_class_exploitation_low } remove_ideas = NA_B_idea_working_class_exploitation_low }
				if = { limit = { has_idea = NA_B_idea_working_class_exploitation_high } remove_ideas = NA_B_idea_working_class_exploitation_high }
				add_ideas = NA_B_idea_working_class_exploitation_medium
			}
			#HIGH
			else_if = {
				limit = {
					check_variable = { var = ROOT.NA_B_idea_working_class_exploitation_score_var@ROOT value = 20 compare = greater_than_or_equals }
					NOT = { has_idea = NA_B_idea_working_class_exploitation_high }
				}
				if = { limit = { has_idea = NA_B_idea_working_class_exploitation_low } remove_ideas = NA_B_idea_working_class_exploitation_low }
				if = { limit = { has_idea = NA_B_idea_working_class_exploitation_medium } remove_ideas = NA_B_idea_working_class_exploitation_medium }
				add_ideas = NA_B_idea_working_class_exploitation_high
			}
		}
	}
}


# ################################# Debug Events ##################################

# country_event = {
# 	id = balkanized_usa.1
# 	title = balkanized_usa.1.t
# 	desc = balkanized_usa.1.d
# 	picture = GFX_report_event_election_vote

#   is_triggered_only = yes
# 	fire_only_once = yes

# 	#immediate = {
# 	#}

# 	option = {
# 		name = balkanized_usa.1.a
# 		custom_effect_tooltip =  balkanized_usa.1_tooltip
# 		hidden_effect = {
# 			USA = {
# 				set_country_flag = USA_ACW_Balkanization
# 				retire_country_leader = yes
# 				if = {
# 					limit = { NOT = { has_country_flag = USA_DouglasElected } }
# 					set_country_flag = USA_DouglasElected
# 				}
# 				news_event = { id = usa_slavery_debate.62 days = 6 } # CSA
# 				country_event = { id = acw_generic.62 days = 5 random_days = 25 } # Oregon
# 				country_event = { id = acw_generic.63 days = 5 random_days = 25 } # California
# 				country_event = { id = acw_generic.64 days = 5 random_days = 25 } # Utah
# 				country_event = { id = acw_generic.65 days = 5 random_days = 25 } # Pueblo
# 				country_event = { id = acw_generic.66 days = 5 random_days = 25 } # Texas
# 				country_event = { id = acw_generic.67 days = 5 random_days = 25 } # Oklahoma
# 				country_event = { id = acw_generic.68 days = 5 random_days = 25 } # Kansas
# 				country_event = { id = acw_generic.69 days = 5 random_days = 25 } # Dakota
# 				country_event = { id = acw_generic.70 days = 5 random_days = 25 } # Great Lakes
# 				country_event = { id = acw_generic.71 days = 5 random_days = 25 } # Missouri
# 				country_event = { id = acw_generic.72 days = 5 random_days = 25 } # Kentucky
# 				country_event = { id = acw_generic.74 days = 5 random_days = 25 } # Manhattan
# 				country_event = { id = acw_generic.76 days = 5 random_days = 25 } # New England
# 				country_event = { id = acw_generic.77 days = 5 random_days = 25 } # Alaska
# 				country_event = { id = acw_generic.78 days = 30 random_days = 3 } # Atlantics
# 				country_event = { id = acw_generic.73 days = 5 random_days = 25 } # West Virginia
# 			}
# 		}
# 	}
# 	option = {
# 		name = balkanized_usa.1.b
# 		custom_effect_tooltip =  balkanized_usa.1_tooltip
# 		hidden_effect = {
# 			USA = {
# 				set_country_flag = USA_ACW_Balkanization
# 				retire_country_leader = yes
# 				if = {
# 					limit = { NOT = { has_country_flag = USA_DouglasElected } }
# 					set_country_flag = USA_DouglasElected
# 				}
# 				set_country_flag = USA_LincolnorDouglas_Moderate_Appeal
# 				news_event = { id = usa_slavery_debate_secession.19 days = 6 } # CSA
# 				country_event = { id = acw_generic.62 days = 5 random_days = 25 } # Oregon
# 				country_event = { id = acw_generic.63 days = 5 random_days = 25 } # California
# 				country_event = { id = acw_generic.64 days = 5 random_days = 25 } # Utah
# 				country_event = { id = acw_generic.65 days = 5 random_days = 25 } # Pueblo
# 				country_event = { id = acw_generic.66 days = 5 random_days = 25 } # Texas
# 				country_event = { id = acw_generic.67 days = 5 random_days = 25 } # Oklahoma
# 				country_event = { id = acw_generic.68 days = 5 random_days = 25 } # Kansas
# 				country_event = { id = acw_generic.69 days = 5 random_days = 25 } # Dakota
# 				country_event = { id = acw_generic.70 days = 5 random_days = 25 } # Great Lakes
# 				country_event = { id = acw_generic.71 days = 5 random_days = 25 } # Missouri
# 				country_event = { id = acw_generic.72 days = 5 random_days = 25 } # Kentucky
# 				country_event = { id = acw_generic.75 days = 5 random_days = 25 } # Manhattan
# 				country_event = { id = acw_generic.76 days = 5 random_days = 25 } # New England
# 				country_event = { id = acw_generic.77 days = 5 random_days = 25 } # Alaska
# 				country_event = { id = acw_generic.78 days = 30 random_days = 3 } # Atlantic
# 				country_event = { id = acw_generic.73 days = 5 random_days = 25 } # West Virginia
# 			}
# 		}
# 	}
# 	option = {
# 		name = balkanized_usa.1.c
# 		custom_effect_tooltip =  balkanized_usa.1_tooltip
# 		hidden_effect = {
# 			USA = {
# 				set_country_flag = USA_ACW_Balkanization
# 				retire_country_leader = yes
# 				transfer_state = 463
# 				transfer_state = 315
# 				transfer_state = 1022
# 				if = {
# 					limit = { NOT = { has_country_flag = USA_DouglasElected } }
# 					set_country_flag = USA_DouglasElected
# 				}
# 				set_global_flag = NA_B_test_cuba_free
# 				set_country_flag = USA_LincolnorDouglas_Moderate_Appeal
# 				news_event = { id = usa_slavery_debate.62 days = 6 } # CSA
# 				country_event = { id = acw_generic.62 days = 5 random_days = 25 } # Oregon
# 				country_event = { id = acw_generic.63 days = 5 random_days = 25 } # California
# 				country_event = { id = acw_generic.64 days = 5 random_days = 25 } # Utah
# 				country_event = { id = acw_generic.65 days = 5 random_days = 25 } # Pueblo
# 				country_event = { id = acw_generic.66 days = 5 random_days = 25 } # Texas
# 				country_event = { id = acw_generic.67 days = 5 random_days = 25 } # Oklahoma
# 				country_event = { id = acw_generic.68 days = 5 random_days = 25 } # Kansas
# 				country_event = { id = acw_generic.69 days = 5 random_days = 25 } # Dakota
# 				country_event = { id = acw_generic.70 days = 5 random_days = 25 } # Great Lakes
# 				country_event = { id = acw_generic.71 days = 5 random_days = 25 } # Missouri
# 				country_event = { id = acw_generic.72 days = 5 random_days = 25 } # Kentucky
# 				country_event = { id = acw_generic.75 days = 5 random_days = 25 } # Manhattan
# 				country_event = { id = acw_generic.76 days = 5 random_days = 25 } # New England
# 				country_event = { id = acw_generic.77 days = 5 random_days = 25 } # Alaska
# 				country_event = { id = acw_generic.78 days = 30 random_days = 3 } # Atlantic
# 				country_event = { id = acw_generic.73 days = 5 random_days = 25 } # West Virginia
# 			}
# 		}
# 	}
# 	option = {
# 		name = balkanized_usa.1.e
# 	}
# }

# ############################## Balkan Setup Events ###############################



# country_event = {
# 	id = balkanized_usa.6
# 	hidden = yes

# 	is_triggered_only = yes

# 	immediate = {
# 		set_country_flag = American_System_Eligible
# 		add_ideas = NA_B_Spirit_New_World_Democracies
# 		hidden_effect = {
# 			inherit_technology = USA
# 		}
# 		if = {
# 			limit = {
# 				OR = {
# 					tag = ORE
# 					tag = DAK
# 					tag = UTA
# 					tag = KNS
# 					tag = NMX
# 				}
# 			}
# 			division_template = {
# 	    	name = "Provisional Irregulars"
# 	    	regiments = {
# 					irregular_infantry = { x = 0 y = 0 }
# 	      }
# 			}
# 			division_template = {
# 				name = "Provisional Militia"
# 				regiments = {
# 					light_infantry = { x = 0 y = 0 }
# 				}
# 			}
# 			division_template = {
# 				name = "Provisional Regiment"
# 				regiments = {
# 					light_infantry = { x = 0 y = 0 }
# 					light_infantry = { x = 0 y = 1 }
# 					light_infantry = { x = 0 y = 2 }
# 				}
# 			}
# 			division_template = {
# 				name = "Provisional Cavalry"
# 				regiments = {
# 					light_cavalry = { x = 0 y = 0 }
# 				}
# 			}
# 			every_owned_state = {
# 				if = {
# 					limit = { state_population > 200000 }
# 					create_unit = { division = "name = \"Provisional Regiment\" division_template = \"Provisional Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"Provisional Regiment\" division_template = \"Provisional Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"Provisional Regiment\" division_template = \"Provisional Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"Provisional Cavalry\" division_template = \"Provisional Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 500 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 1200 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 3000 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"Provisional Militia\" division_template = \"Provisional Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 100000 }
# 					create_unit = { division = "name = \"Provisional Regiment\" division_template = \"Provisional Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"Provisional Militia\" division_template = \"Provisional Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"Provisional Cavalry\" division_template = \"Provisional Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 250 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 700 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 1750 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"Provisional Irregulars\" division_template = \"Provisional Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 40000 }
# 					create_unit = { division = "name = \"Provisional Militia\" division_template = \"Provisional Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"Provisional Militia\" division_template = \"Provisional Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 150 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 400 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 1000 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"Provisional Cavalry\" division_template = \"Provisional Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 15000 }
# 					create_unit = { division = "name = \"Provisional Militia\" division_template = \"Provisional Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"Provisional Militia\" division_template = \"Provisional Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 70 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 220 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 560 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"Provisional Irregulars\" division_template = \"Provisional Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 9800 }
# 					create_unit = { division = "name = \"Provisional Irregulars\" division_template = \"Provisional Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 45 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 175 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 400 }
# 					}
# 				}
# 			}
# 		}
# 		else_if = {
# 			limit = {
# 				OR = {
# 					tag = CAL
# 					tag = TEX
# 					tag = OKL
# 					tag = MIO
# 					tag = KTY
# 					tag = WVG
# 					tag = CUB
# 				}
# 			}
# 			division_template = {
# 	    	name = "State Irregulars"
# 	    	regiments = {
# 					irregular_infantry = { x = 0 y = 0 }
# 					irregular_infantry = { x = 0 y = 1 }
# 	      }
# 			}
# 			division_template = {
# 				name = "State Militia"
# 				regiments = {
# 					light_infantry = { x = 0 y = 0 }
# 					light_infantry = { x = 0 y = 1 }
# 				}
# 			}
# 			division_template = {
# 				name = "State Regiment"
# 				regiments = {
# 					line_infantry = { x = 0 y = 0 }
# 					line_infantry = { x = 0 y = 1 }
# 					light_infantry = { x = 0 y = 2 }
# 				}
# 			}
# 			division_template = {
# 				name = "State Cavalry"
# 				regiments = {
# 					light_cavalry = { x = 0 y = 0 }
# 				}
# 			}
# 			division_template = {
# 				name = "State Guard"
# 				regiments = {
# 					line_infantry = { x = 0 y = 0 }
# 					line_infantry = { x = 0 y = 1 }
# 				}
# 				support = {
# 					cannon_artillery_support = { x = 0 y = 0 }
# 				}
# 			}
# 			every_owned_state = {
# 				if = {
# 					limit = { state_population > 1000000 }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 1800 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 4500 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 11250 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 						create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }

# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 200000 }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 600 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 1400 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 3500 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 						create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 100000 }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 400 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 900 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 2300 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 						create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 50000 }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 250 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 500 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 1300 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 						create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 20000 }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 130 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 300 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 780 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else = {
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 			}
# 		}
# 		else = {
# 			division_template = {
# 				name = "State Irregulars"
# 				regiments = {
# 					irregular_infantry = { x = 0 y = 0 }
# 					irregular_infantry = { x = 0 y = 1 }
# 				}
# 			}
# 			division_template = {
# 				name = "State Militia"
# 				regiments = {
# 					light_infantry = { x = 0 y = 0 }
# 					light_infantry = { x = 0 y = 1 }
# 					light_infantry = { x = 0 y = 1 }
# 				}
# 			}
# 			division_template = {
# 				name = "State Regiment"
# 				regiments = {
# 					line_infantry = { x = 0 y = 0 }
# 					line_infantry = { x = 0 y = 1 }
# 					light_infantry = { x = 0 y = 2 }
# 				}
# 				support = {
# 					cannon_artillery_support = { x = 0 y = 0 }
# 				}
# 			}
# 			division_template = {
# 				name = "State Cavalry"
# 				regiments = {
# 					light_cavalry = { x = 0 y = 0 }
# 					light_cavalry = { x = 0 y = 0 }
# 				}
# 			}
# 			division_template = {
# 				name = "State Guard"
# 				regiments = {
# 					line_infantry = { x = 0 y = 0 }
# 					line_infantry = { x = 0 y = 1 }
# 					line_infantry = { x = 0 y = 1 }
# 					line_infantry = { x = 0 y = 1 }
# 				}
# 				support = {
# 					cannon_artillery_support = { x = 0 y = 0 }
# 				}
# 			}
# 			every_owned_state = {
# 				if = {
# 					limit = { state_population > 2400000 }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 3850 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 11500 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 2500 }
# 						add_equipment_to_stockpile = { type = cannon_equipment_0 amount = 400 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 						create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 						create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 1500000 }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					if = {
# 						limit = { NOT = { OWNER = { has_idea = usa_slavery_law } } }
# 						create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 2300 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 7000 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 15400 }
# 						add_equipment_to_stockpile = { type = cannon_equipment_0 amount = 260 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 						create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 1000000 }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					if = {
# 						limit = { NOT = { OWNER = { has_idea = usa_slavery_law } } }
# 						create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 1400 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 4200 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 9000 }
# 						add_equipment_to_stockpile = { type = cannon_equipment_0 amount = 180 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 						create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 450000 }
# 					create_unit = { division = "name = \"State Regiment\" division_template = \"State Regiment\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Cavalry\" division_template = \"State Cavalry\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 850 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 2900 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 6400 }
# 					}
# 					if = {
# 						limit = { is_capital = yes }
# 						create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 200000 }
# 					create_unit = { division = "name = \"State Guard\" division_template = \"State Guard\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 550 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 1600 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 3500 }
# 					}
# 				}
# 				else_if = {
# 					limit = { state_population > 90000 }
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 550 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 900 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 2000 }
# 					}
# 				}
# 				else = {
# 					create_unit = { division = "name = \"State Militia\" division_template = \"State Militia\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					create_unit = { division = "name = \"State Irregulars\" division_template = \"State Irregulars\" start_experience_factor = 0.08 start_equipment_factor = 0.8" owner = OWNER }
# 					OWNER = {
# 						add_equipment_to_stockpile = { type = cavalry_equipment amount = 300 }
# 						add_equipment_to_stockpile = { type = infantry_equipment_rifle_0 amount = 700 }
# 						add_equipment_to_stockpile = { type = uniform_equipment_0 amount = 1600 }
# 					}
# 				}
# 			}
# 		}
# 		country_event = { id = balkanized_usa.2 hours = 12 }
# 	}
# }
# state_event = {
# 	id = balkanized_usa.7
# 	hidden = yes
# 	is_triggered_only = yes

# 	immediate = {
# 		FROM = { country_event = balkanized_usa.8 }
# 	}
# }
# country_event = {
# 	id = balkanized_usa.8
# 	title = balkanized_usa.8.t
# 	desc = {
# 		trigger = { 
# 			FROM = {
# 				OWNER = { ROOT = { has_country_flag = USA_Slavery_Debate_Ongoing } }
# 				NOT = { has_state_flag = NA_B_Resistant_Population }
# 			}
# 		}
# 		text = balkanized_usa.8.d_slavery_debate
# 	}
# 	desc = {
# 		trigger = { always = yes }
# 		text = balkanized_usa.8.d
# 	}
# 	is_triggered_only = yes

# 	option = {
# 		name = balkanized_usa.8.a
# 		trigger = {
# 			OR = {
# 				NOT = { has_country_flag = USA_Slavery_Debate_Ongoing }
# 				NOT = { has_country_flag = USA_Add_State_Manual_Flag }
# 			}
# 			FROM = { has_state_flag = NA_B_Resistant_Population }
# 		}
# 		FROM = {
# 			NA_B_Add_State_Effect = yes
# 			clr_state_flag = NA_B_Resistant_Population
# 		}
# 	}

# 	option = {
# 		name = balkanized_usa.8.b
# 		trigger = {
# 			NOT = { has_country_flag = USA_Add_State_Manual_Flag }
# 			OR = {
# 				has_country_flag = USA_Slavery_Debate_Ongoing
# 				NOT = { FROM = { has_state_flag = NA_B_Resistant_Population } }
# 			}
# 		}
# 		ai_chance = { 
# 			base = 100
# 			modifier = {
# 				ROOT = { has_government = social_egalitarianism }
# 				add = 75
# 			}
# 			modifier = {
# 				ROOT = { has_government = centrism }
# 				add = 25
# 			}
# 			modifier = {
# 				ROOT = { has_government = traditional_conservatism }
# 				add = -25
# 			}
# 			modifier = {
# 				ROOT = { has_government = radical_democracy }
# 				add = -75
# 			}
# 		}
# 		FROM = {
# 			NA_B_Add_State_Effect = yes
# 		}
# 		USA_Slavery_Debate_StateF_Count_Modify = yes
# 	}
# 	option = {
# 		name = balkanized_usa.8.c
# 		trigger = {
# 			NOT = { has_country_flag = USA_Add_State_Manual_Flag }
# 			has_country_flag = USA_Slavery_Debate_Ongoing
# 			NOT = { FROM = { has_state_flag = NA_B_Resistant_Population } }
# 		}
# 		ai_chance = { 
# 			base = 100
# 			modifier = {
# 				ROOT = { has_government = social_egalitarianism }
# 				add = -75
# 			}
# 			modifier = {
# 				ROOT = { has_government = centrism }
# 				add = -25
# 			}
# 			modifier = {
# 				ROOT = { has_government = traditional_conservatism }
# 				add = 25
# 			}
# 			modifier = {
# 				ROOT = { has_government = radical_democracy }
# 				add = 75
# 			}
# 		}
# 		FROM = {
# 			DCI_increase_by_5 = yes
# 			NA_B_Add_State_Effect = yes
# 		}
# 		USA_Slavery_Debate_StateS_Count_Modify = yes
# 	}

# 	option = {
# 		name = balkanized_usa.8.a
# 		trigger = { has_country_flag = USA_Add_State_Manual_Flag }
# 		FROM = {
# 			DCI_increase_by_1 = yes
# 			NA_B_Add_State_Effect = yes
# 		}
# 		if = {
# 			limit = { FROM = { has_state_flag = NA_B_Slave_Kansas } }
# 			USA_Slavery_Debate_StateS_Count_Modify = yes
# 		}
# 		else = {
# 			USA_Slavery_Debate_StateF_Count_Modify = yes
# 		}
# 	}
# }

# country_event = {
# 	id = balkanized_usa.2
# 	hidden = yes
# 	is_triggered_only = yes

# 	immediate = {
# 		if = {
# 			limit = { has_template = "National Guard" }
# 			set_division_template_lock = {
# 				division_template = "National Guard"
# 				is_locked = no
# 			}
# 		}
# 	}
# }

# ################################# Mantle Events #################################

# state_event = {
# 	id = balkanized_usa.51
# 	title = DCI_low.9.t
# 	desc = DCI_low.9.d
# 	picture = GFX_report_event_chinese_army_training #Picture for event
# 	is_triggered_only = yes


# 	option = {
# 		name = DCI_low.9.a
# 		THIS = { custom_effect_tooltip = NA_B_mantle_of_the_states_calculator_check_1_state_tooltip }
# 		THIS = { custom_effect_tooltip = NA_B_mantle_of_the_states_calculator_check_2_state_tooltip }

# 		ROOT = { custom_effect_tooltip = NA_B_mantle_of_the_states_calculator_check_1_state_tooltip }
# 		ROOT = { custom_effect_tooltip = NA_B_mantle_of_the_states_calculator_check_2_state_tooltip }
# 	}
# }

# country_event = {
# 	id = balkanized_usa.41
# 	hidden = yes
#     is_triggered_only = yes

# 	trigger = {
# 		has_country_flag = is_successor_state_of_usa_flag
# 		exists = yes
# 	}

# 	immediate = {
# 		hidden_effect = {
# 			#LOW
# 			if = {
# 				limit = {
# 					check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 50 compare = less_than }
# 					NOT = { has_idea = NA_B_successor_of_the_usa_low }
# 					NOT = { has_idea = NA_B_successor_of_the_usa_highest }
# 				}
# 				if = { limit = { has_idea = NA_B_successor_of_the_usa_medium } remove_ideas = NA_B_successor_of_the_usa_medium }
# 				if = { limit = { has_idea = NA_B_successor_of_the_usa_high } remove_ideas = NA_B_successor_of_the_usa_high }
# 				add_ideas = NA_B_successor_of_the_usa_low
# 			}
# 			#MEDIUM
# 			else_if = {
# 				limit = {
# 					check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 50 compare = greater_than_or_equals }
# 					check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 125 compare = less_than }
# 					NOT = { has_idea = NA_B_successor_of_the_usa_medium }
# 					NOT = { has_idea = NA_B_successor_of_the_usa_highest }
# 				}
# 				if = { limit = { has_idea = NA_B_successor_of_the_usa_low } remove_ideas = NA_B_successor_of_the_usa_low }
# 				if = { limit = { has_idea = NA_B_successor_of_the_usa_high } remove_ideas = NA_B_successor_of_the_usa_high }
# 				add_ideas = NA_B_successor_of_the_usa_medium
# 			}
# 			#HIGH
# 			else_if = {
# 				limit = {
# 					check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 125 compare = greater_than_or_equals }
# 					NOT = { has_idea = NA_B_successor_of_the_usa_high }
# 					NOT = { has_idea = NA_B_successor_of_the_usa_highest }
# 				}
# 				if = { limit = { has_idea = NA_B_successor_of_the_usa_low } remove_ideas = NA_B_successor_of_the_usa_low }
# 				if = { limit = { has_idea = NA_B_successor_of_the_usa_medium } remove_ideas = NA_B_successor_of_the_usa_medium }
# 				add_ideas = NA_B_successor_of_the_usa_high
# 			}
# 			#HIGHEST
# 			ROOT = { set_variable = { ROOT.temp_dont_gain_mantle@ROOT = 1 } }
# 			every_other_country = {
# 				limit = {
# 					has_country_flag = is_successor_state_of_usa_flag
# 					exists = yes
# 				}
# 				if = {
# 					limit = {
# 						ROOT = { check_variable = { var = PREV.NA_B_mantle_of_the_states_score_var@PREV value = ROOT.NA_B_mantle_of_the_states_score_var@ROOT compare = greater_than_or_equals } }
# 					}
# 					if = {
# 						limit = { ROOT = { has_idea = NA_B_successor_of_the_usa_highest } }
# 						ROOT = { set_temp_variable = { ROOT.temp_lost_mantle@ROOT = 1 } }
# 					}
# 					if = {
# 						limit = { ROOT = { NOT = { has_idea = NA_B_successor_of_the_usa_highest } } }
# 						ROOT = { add_to_variable = { ROOT.temp_dont_gain_mantle@ROOT = 1 } }
# 					}
# 				}
# 			}
# 			#Lose Mantle
# 			if = {
# 				limit = {
# 					check_variable = { ROOT.temp_lost_mantle@ROOT = 1 }
# 				}
# 				remove_ideas = NA_B_successor_of_the_usa_highest
# 				#LOW
# 				if = {
# 					limit = {
# 						check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 50 compare = less_than }
# 						NOT = { has_idea = NA_B_successor_of_the_usa_low }
# 						NOT = { has_idea = NA_B_successor_of_the_usa_highest }
# 					}
# 					if = { limit = { has_idea = NA_B_successor_of_the_usa_medium } remove_ideas = NA_B_successor_of_the_usa_medium }
# 					if = { limit = { has_idea = NA_B_successor_of_the_usa_high } remove_ideas = NA_B_successor_of_the_usa_high }
# 					add_ideas = NA_B_successor_of_the_usa_low
# 				}
# 				#MEDIUM
# 				else_if = {
# 					limit = {
# 						check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 50 compare = greater_than_or_equals }
# 						check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 125 compare = less_than }
# 						NOT = { has_idea = NA_B_successor_of_the_usa_medium }
# 						NOT = { has_idea = NA_B_successor_of_the_usa_highest }
# 					}
# 					if = { limit = { has_idea = NA_B_successor_of_the_usa_low } remove_ideas = NA_B_successor_of_the_usa_low }
# 					if = { limit = { has_idea = NA_B_successor_of_the_usa_high } remove_ideas = NA_B_successor_of_the_usa_high }
# 					add_ideas = NA_B_successor_of_the_usa_medium
# 				}
# 				#HIGH
# 				else_if = {
# 					limit = {
# 						check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 125 compare = greater_than_or_equals }
# 						NOT = { has_idea = NA_B_successor_of_the_usa_high }
# 						NOT = { has_idea = NA_B_successor_of_the_usa_highest }
# 					}
# 					if = { limit = { has_idea = NA_B_successor_of_the_usa_low } remove_ideas = NA_B_successor_of_the_usa_low }
# 					if = { limit = { has_idea = NA_B_successor_of_the_usa_medium } remove_ideas = NA_B_successor_of_the_usa_medium }
# 					add_ideas = NA_B_successor_of_the_usa_high
# 				}
# 			}
# 			#Gain Mantle
# 			if = {
# 				limit = {
# 					NOT = { has_idea = NA_B_successor_of_the_usa_highest }
# 					check_variable = { ROOT.temp_dont_gain_mantle@ROOT = 1 }
# 				}
# 				every_other_country = {
# 					limit = {
# 						has_idea = NA_B_successor_of_the_usa_highest
# 					}
# 					remove_ideas = NA_B_successor_of_the_usa_highest
# 					#LOW
# 					if = {
# 						limit = {
# 							check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 50 compare = less_than }
# 							NOT = { has_idea = NA_B_successor_of_the_usa_low }
# 							NOT = { has_idea = NA_B_successor_of_the_usa_highest }
# 						}
# 						if = { limit = { has_idea = NA_B_successor_of_the_usa_medium } remove_ideas = NA_B_successor_of_the_usa_medium }
# 						if = { limit = { has_idea = NA_B_successor_of_the_usa_high } remove_ideas = NA_B_successor_of_the_usa_high }
# 						add_ideas = NA_B_successor_of_the_usa_low
# 					}
# 					#MEDIUM
# 					else_if = {
# 						limit = {
# 							check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 50 compare = greater_than_or_equals }
# 							check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 125 compare = less_than }
# 							NOT = { has_idea = NA_B_successor_of_the_usa_medium }
# 							NOT = { has_idea = NA_B_successor_of_the_usa_highest }
# 						}
# 						if = { limit = { has_idea = NA_B_successor_of_the_usa_low } remove_ideas = NA_B_successor_of_the_usa_low }
# 						if = { limit = { has_idea = NA_B_successor_of_the_usa_high } remove_ideas = NA_B_successor_of_the_usa_high }
# 						add_ideas = NA_B_successor_of_the_usa_medium
# 					}
# 					#HIGH
# 					else_if = {
# 						limit = {
# 							check_variable = { var = ROOT.NA_B_mantle_of_the_states_score_var@ROOT value = 125 compare = greater_than_or_equals }
# 							NOT = { has_idea = NA_B_successor_of_the_usa_high }
# 							NOT = { has_idea = NA_B_successor_of_the_usa_highest }
# 						}
# 						if = { limit = { has_idea = NA_B_successor_of_the_usa_low } remove_ideas = NA_B_successor_of_the_usa_low }
# 						if = { limit = { has_idea = NA_B_successor_of_the_usa_medium } remove_ideas = NA_B_successor_of_the_usa_medium }
# 						add_ideas = NA_B_successor_of_the_usa_high
# 					}
# 				}
# 				ROOT = {
# 					if = { limit = { has_idea = NA_B_successor_of_the_usa_low } remove_ideas = NA_B_successor_of_the_usa_low }
# 					if = { limit = { has_idea = NA_B_successor_of_the_usa_medium } remove_ideas = NA_B_successor_of_the_usa_medium }
# 					if = { limit = { has_idea = NA_B_successor_of_the_usa_high } remove_ideas = NA_B_successor_of_the_usa_high }
# 					add_ideas = NA_B_successor_of_the_usa_highest
# 				}
# 			}
# 		}
# 	}
# }

# ################################ Industry Events ################################

# state_event = {
# 	id = balkanized_usa.11
# 	title = balkanized_usa.11.t
# 	desc = balkanized_usa.11.d
# 	picture = GFX_report_event_chinese_army_training #Picture for event
# 	hidden = no

#     is_triggered_only = yes

# 	option = {
# 		name = balkanized_usa.11.a
# 		ROOT = {
# 			add_building_construction = {
# 				type = steel_mill
# 				level = 1
# 				instant_build = yes
# 			}
# 		}
# 		hidden_effect = { state_event = { id = balkanized_usa.12 days = 720 random = 30 } }
# 	}
# }

# state_event = {
# 	id = balkanized_usa.12
# 	title = balkanized_usa.12.t
# 	desc = balkanized_usa.12.d
# 	picture = GFX_report_event_chinese_army_training #Picture for event
# 	hidden = no

#     is_triggered_only = yes

# 	option = {
# 		name = balkanized_usa.12.a
# 		ROOT = {
# 			add_building_construction = {
# 				type = steel_mill
# 				level = 1
# 				instant_build = yes
# 			}
# 		}
# 	}
# }


# country_event = {
# 	id = balkanized_usa.110
# 	title = balkanized_usa.110.t
# 	desc = balkanized_usa.110.d

# 	is_triggered_only = yes

# 	option = {
# 		name = balkanized_usa.110.a
# 		ai_chance = { base = 10 }
# 	}
# 	option = {
# 		name = balkanized_usa.110.b
# 		ai_chance = { base = 8 }
# 	}
# }

# ########################### Internal Politics Events ############################

# country_event = {
# 	id = balkanized_usa.9
# 	title = balkanized_usa.9.t
# 	desc = balkanized_usa.9.d
# 	picture = GFX_report_event_chinese_army_training #Picture for event
# 	hidden = no

#     is_triggered_only = yes

# 	option = {
# 		#hidden_effect = {
# 			ROOT = {
# 				every_owned_state = {
# 					limit = {
# 						is_core_of = ROOT
# 					}
# 					state_event = { id = balkanized_usa.9 }
# 				}
# 				#360 = {
# 				#	state_event = { id = balkanized_usa.9 }
# 				#}
# 			}
# 			#360 = {
# 			#	state_event = { id = balkanized_usa.9 }
# 			#}
# 		#}
# 	}
# }

# ################################ Cascadia Events ################################

# country_event = {
# 	id = balkanized_usa.31
# 	title = balkanized_usa.31.t
# 	desc = balkanized_usa.31.d
# 	picture = GFX_report_event_election_vote

#     is_triggered_only = yes

# 	option = {
# 		name = balkanized_usa.31.a
# 		ai_chance = { factor = 80 }
# 		set_cosmetic_tag = ORE_cascadia
# 	}

# 	option = {
# 		name = balkanized_usa.31.b
# 		ai_chance = { factor = 20 }
# 	}
# }
