﻿MILITARY_FORMATIONS = {
	c:USA ?= {
		create_military_formation = {
			type = army
			hq_region = sr:region_new_england
			name = Regular_Army

			combat_unit = {
				type = unit_type:combat_unit_type_mobile_artillery
				state_region = s:STATE_NEW_YORK
				count = 20
			}

			combat_unit = {
				type = unit_type:combat_unit_type_skirmish_infantry
				state_region = s:STATE_VIRGINIA
				count = 20
			}

			save_scope_as = regular_army
		}

		create_character = {
			is_general = yes
			first_name = Edmund_P
			last_name = Gaines
			historical = yes
			culture = cu:dixie
			birth_date = 1777.3.20
			save_scope_as = gaines_gen
		}

		scope:gaines_gen = {
			transfer_to_formation = scope:regular_army
		}

		create_military_formation = {
			type = army
			hq_region = sr:region_new_england
			name = Irregular_Army

			combat_unit = {
				type = unit_type:combat_unit_type_hussars
				state_region = s:STATE_KENTUCKY
				count = 10
			}
			combat_unit = {
				type = unit_type:combat_unit_type_skirmish_infantry
				state_region = s:STATE_KENTUCKY
				count = 10
			}

			combat_unit = {
				type = unit_type:combat_unit_type_hussars
				state_region = s:STATE_TENNESSEE
				count = 10
			}
			combat_unit = {
				type = unit_type:combat_unit_type_skirmish_infantry
				state_region = s:STATE_TENNESSEE
				count = 10
			}
		}

		create_military_formation = {
			type = fleet
			hq_region = sr:region_new_england
			name = Navy_Yard_New_York

			combat_unit = {
				type = unit_type:combat_unit_type_man_o_war
				state_region = s:STATE_NEW_YORK
				count = 20
			}

			combat_unit = { 
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_NEW_YORK
				count = 20
			}
			save_scope_as = navy_yard_new_york_fleet
		}

		create_character = { # USA, Admiral
			is_admiral = yes
			first_name = Elie_Augustus_Frederick
			last_name = Lavallette
			historical = yes
			culture = cu:dixie
			interest_group = ig_landowners
			ideology = ideology_moderate
			birth_date = 1776.2.9
			hq = region_dixie
			traits = {
				brave
				basic_naval_commander
			}
			save_scope_as = lavallette_gen
		}

		scope:lavallette_gen = {
			transfer_to_formation = scope:navy_yard_new_york_fleet
		}
		
		activate_production_method = {
			building_type = building_naval_base
			production_method = pm_power_of_the_purse
		}	
		activate_production_method = {
			building_type = building_barracks
			production_method = pm_general_training
		}			
	}

	c:TEX ?= {
		create_military_formation = {
			type = army
			hq_region = sr:region_dixie
			name = Army_of_the_Republic_of_Texas

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_TEXAS
				count = 3
			}

			combat_unit = {
				type = unit_type:combat_unit_type_lancers
				state_region = s:STATE_TEXAS
				count = 1
			}
		}
	}

	c:MEX ?= {
		create_military_formation = {
			type = army
			hq_region = sr:region_dixie
			name = Ejrcito_de_Operaciones

			combat_unit = {
				type = unit_type:combat_unit_type_irregular_infantry
				state_region = s:STATE_MEXICO
				count = 20
			}

			combat_unit = {
				type = unit_type:combat_unit_type_lancers
				state_region = s:STATE_JALISCO
				count = 10
			}

			combat_unit = {
				type = unit_type:combat_unit_type_lancers
				state_region = s:STATE_BAJIO
				count = 10
			}
			save_scope_as = operaciones_army
		}

		create_character = {
			# General Santa Anna, caudillo supreme
			first_name = Antonio
			last_name = Lopez_de_Santa_Anna
			historical = yes
			birth_date = 1794.2.21
			dna = dna_antonio_lopez
			hq = region_mexico
			ig_leader = yes # Both general and IG leader
			is_general = yes # Both general and IG leader
			interest_group = ig_armed_forces
			ideology = ideology_moderate
			commander_rank = commander_rank_2
			traits = {
				ambitious
				reckless
				arrogant
			}
			on_created = {
				set_variable = {
					name = is_santa_anna
				}				
			}
			save_scope_as = antonio_gen
		}

		scope:antonio_gen = {
			transfer_to_formation = scope:operaciones_army
		}

		create_military_formation = {
			type = fleet
			hq_region = sr:region_mexico
			name = Armada_de_Mxico

			combat_unit = { # Libertad
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_VERACRUZ
				count = 1
			}
		}
	}
}
