﻿MILITARY_FORMATIONS = {
	c:USA ?= {
		create_military_formation = {
			type = army
			hq_region = sr:region_dixie
			name = Army_of_Observation

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_TENNESSEE
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_SOUTH_CAROLINA
				count = 1
			}
		}

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

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_NEW_YORK
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_OHIO
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_KENTUCKY
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_PENNSYLVANIA
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_MASSACHUSETTS
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_NORTH_CAROLINA
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_VIRGINIA
				count = 1
			}
			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_dixie
			name = Army_of_Florida

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_ALABAMA
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_dragoons
				state_region = s:STATE_GEORGIA
				count = 1
			}
		}

		create_military_formation = {
			type = fleet
			hq_region = sr:region_dixie
			name = Navy_Yard_Gosport

			combat_unit = {
				type = unit_type:combat_unit_type_man_o_war
				state_region = s:STATE_VIRGINIA
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_VIRGINIA
				count = 3
			}

			combat_unit = {
				type = unit_type:combat_unit_type_man_o_war
				state_region = s:STATE_MASSACHUSETTS
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_MASSACHUSETTS
				count = 2
			}

			combat_unit = {
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_SOUTH_CAROLINA
				count = 1
			}

			combat_unit = { # Ahistorical
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_SOUTH_CAROLINA
				count = 2
			}

			combat_unit = {
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_LOUISIANA
				count = 1
			}
		}

		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 = 3
			}

			combat_unit = {
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_NEW_YORK
				count = 2
			}

			combat_unit = { # Ahistorical
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_NEW_YORK
				count = 2
			}

			combat_unit = {
				type = unit_type:combat_unit_type_man_o_war
				state_region = s:STATE_MASSACHUSETTS
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_MASSACHUSETTS
				count = 1
			}

			combat_unit = { # Ahistorical
				type = unit_type:combat_unit_type_frigate
				state_region = s:STATE_MASSACHUSETTS
				count = 1
			}
			save_scope_as = navy_yard_new_york_fleet
		}

		create_character = { # USA, Admiral
			template = USA_elie_augustus_frederick_lavallette
			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_barrack
			production_method = pm_general_training
		}
	}

	c:TEX ?= {
		create_military_formation = {
			type = army
			hq_region = sr:region_dixie
			name = Texian_Army # Texian Army / Army of the People / Revolutionary Army

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

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

		create_military_formation = {
			type = fleet
			hq_region = sr:region_dixie
			name = Texian_Navy

			combat_unit = { # Some schooners
				type = unit_type:combat_unit_type_frigate
				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_line_infantry
				state_region = s:STATE_MEXICO
				count = 3
			}

			combat_unit = {
				type = unit_type:combat_unit_type_irregular_infantry
				state_region = s:STATE_YUCATAN
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_hussars
				state_region = s:STATE_VERACRUZ
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_cannon_artillery
				state_region = s:STATE_GUERRERO
				count = 1
			}
			save_scope_as = operaciones_army
		}

		create_character = {
			template = MEX_antonio_lopez_de_santa_anna
			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 = army
			hq_region = sr:region_mexico
			name = Ejrcito_Mexicano

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_OAXACA
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_ZACATECAS
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_hussars
				state_region = s:STATE_OAXACA
				count = 1
			}
		}

		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
			}
		}
	}
	c:HAI ?= {
		create_military_formation = {
			type = army
			hq_region = sr:region_caribbean
			name = ArmeeIndigene

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

			combat_unit = { # 31st, 32nd and 33rd Dominican-manned regiments
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_SANTO_DOMINGO
				count = 3
			}

			combat_unit = { # Civil Guards
				type = unit_type:combat_unit_type_irregular_infantry
				state_region = s:STATE_SANTO_DOMINGO
				count = 4
			}

			combat_unit = {
				type = unit_type:combat_unit_type_irregular_infantry
				state_region = s:STATE_HAITI
				count = 14
			}

			combat_unit = {
				type = unit_type:combat_unit_type_dragoons
				state_region = s:STATE_HAITI
				count = 2
			}

			combat_unit = {
				type = unit_type:combat_unit_type_cannon_artillery
				state_region = s:STATE_HAITI
				count = 1
			}
		}
	}
	c:CUB ?= {
		create_military_formation = {
			type = army
			hq_region = sr:region_caribbean
			name = MiliciasdeCuba

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_WESTERN_CUBA
				count = 5
			}

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_EASTERN_CUBA
				count = 2
			}

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_CENTRAL_CUBA
				count = 2
			}

			combat_unit = {
				type = unit_type:combat_unit_type_dragoons
				state_region = s:STATE_WESTERN_CUBA
				count = 1
			}

			combat_unit = {
				type = unit_type:combat_unit_type_cannon_artillery
				state_region = s:STATE_WESTERN_CUBA
				count = 1
			}
		}
	}
	c:PCO ?= {
		create_military_formation = {
			type = army
			hq_region = sr:region_caribbean
			name = MiliciasDiciplinadas

			combat_unit = {
				type = unit_type:combat_unit_type_line_infantry
				state_region = s:STATE_PUERTO_RICO
				count = 6
			}

			combat_unit = {
				type = unit_type:combat_unit_type_dragoons
				state_region = s:STATE_PUERTO_RICO
				count = 1
			}
		}
	}
}
