/////////////////////////////////////////////////////////////////////
// ai for skirmish game
/////////////////////////////////////////////////////////////////////

script "semperfi.slo"
run
{
	// general constants
	numScouts	int					3			// min number of droids in group to aim for
	maxScouts	int					3			// max number of droids in group to aim for
	numCyborgs	int					8			// build cyborgs until scouts contains at least x droids
	maxCyborgs	int					20			// build cyborgs until scouts contains max x droids

	// research branches
	branchDefault	int					0
	branchVTOL	int					1

	//default branch
	numDefenders[0]	int					4
	numAttackers[0]	int					8

	//vtol branch
	numDefenders[1]	int					12
	numAttackers[1]	int					0

	//default branch
	maxDefenders[0]	int					5
	maxAttackers[0]	int					-1

	//vtol branch
	maxDefenders[1]	int					20
	maxAttackers[1]	int					0

	tileExpand		int					12			// approx minutes to expand over the map.

	/////////////////////////////////////////////////////////////////////
	/////////////////////////////////////////////////////////////////////
	// structures

 	// generic names, often used.
	oilRes			FEATURESTAT			"OilResource"
	resLab			STRUCTURESTAT		"A0ResearchFacility"
	powGen			STRUCTURESTAT		"A0PowerGenerator"
	factory			STRUCTURESTAT		"A0LightFactory"
	derrick			STRUCTURESTAT		"A0ResourceExtractor"
	cybFactory		STRUCTURESTAT		"A0CyborgFactory"
	playerHQ		STRUCTURESTAT		"A0CommandCentre"
	vtolPad			STRUCTURESTAT		"A0VtolPad"
	vtolFactory		STRUCTURESTAT		"A0VTolFactory1"
	sensorTower		STRUCTURESTAT		"Sys-SensoTower02"
	lassat			STRUCTURESTAT		"A0LasSatCommand"
	nexusDefence		RESEARCHSTAT		"R-Sys-Resistance-Circuits"
	uplink			STRUCTURESTAT		"A0Sat-linkCentre"

	//how many res facilities to use when finished researching all specified research topics
	maxIdleRes	int					-1

	//number of research topics for each research branch
	techCount[0]	int					20

	tech[0][0]		RESEARCHSTAT		"R-Defense-Tower01"		//mg guard tower
	tech[0][1]		RESEARCHSTAT		"R-Wpn-MG3Mk1"			//HMG
	tech[0][2]		RESEARCHSTAT		"R-Vehicle-Prop-Halftracks"	//Half-tracks
	tech[0][3]		RESEARCHSTAT		"R-Struc-PowerModuleMk1"	//power module
	tech[0][4]		RESEARCHSTAT		"R-Struc-Research-Module"	//research module
	tech[0][5]		RESEARCHSTAT		"R-Struc-Factory-Module"	//factory module
	tech[0][6]		RESEARCHSTAT		"R-Defense-WallTower01"		//heavy mg hardpoint
	tech[0][7]		RESEARCHSTAT		"R-Sys-MobileRepairTurret01" //repair turret
	tech[0][8]		RESEARCHSTAT		"R-Wpn-Rocket02-MRL"		//mini rocket artillery
	tech[0][9]		RESEARCHSTAT		"R-Wpn-Rocket-ROF03"		//Fast Fire Mini-Rockets Mk3
	tech[0][10]		RESEARCHSTAT		"R-Wpn-MG-Damage03"		//APDSB MG Bullets Mk2
	tech[0][11]		RESEARCHSTAT		"R-Vehicle-Metals02"		//composite alloys Mk2
	tech[0][12]		RESEARCHSTAT		"R-Defense-Pillbox06"		//lancer tower
	tech[0][13]		RESEARCHSTAT		"R-Defense-WallUpgrade01"	//impr hardcrete - in case missed
	tech[0][14]		RESEARCHSTAT		"R-Struc-Materials01"		//reinf struc mat - in case missed
	tech[0][15]		RESEARCHSTAT		"R-Struc-Power-Upgrade03a"	//power upgrade 03a
	tech[0][16]		RESEARCHSTAT		"R-Sys-Sensor-Upgrade01"	//sensor upgrade
	tech[0][17]		RESEARCHSTAT		"R-Vehicle-Prop-Hover"		//hover propulsion - for more options
	tech[0][18]		RESEARCHSTAT		"R-Vehicle-Body08"		//scorpion body - for more options (eg new hover truck)
	tech[0][19]		RESEARCHSTAT		"R-Struc-Research-Upgrade06"	//to dedicate one reslab to cerebral stuff

	//other tech: R-Vehicle-Prop-VTOL, R-Struc-VTOLPad, R-Struc-VTOLFactory
	techCount[1]	int					19

	tech[1][0]		RESEARCHSTAT		"R-Defense-Tower01"		//mg tower for early fun
	tech[1][1]		RESEARCHSTAT		"R-Struc-Research-Module"	//reslab module
	tech[1][2]		RESEARCHSTAT		"R-Struc-PowerModuleMk1"	//power module
	tech[0][3]		RESEARCHSTAT		"R-Sys-MobileRepairTurret01" //repair turret
	tech[1][4]		RESEARCHSTAT		"R-Struc-VTOLFactory"		//rush vtols
	tech[1][5]		RESEARCHSTAT		"R-Struc-VTOLPad"		//vtol pads
	tech[1][6]		RESEARCHSTAT		"R-Wpn-Bomb04"			//thermite bomb - and we win
	tech[1][7]		RESEARCHSTAT		"R-Vehicle-Prop-Halftracks"	//half-tracks - in case missed
	tech[1][8]		RESEARCHSTAT		"R-Defense-AASite-QuadMg1"	//AA hurricane site
	tech[1][9]		RESEARCHSTAT		"R-Defense-WallTower01"		//heavy mg hardpoint - in case missed
	tech[1][10]		RESEARCHSTAT		"R-Defense-WallUpgrade01"	//impr hardcrete - in case missed
	tech[1][11]		RESEARCHSTAT		"R-Struc-Materials01"		//reinf struc mat - in case missed
	tech[1][12]		RESEARCHSTAT		"R-Vehicle-Body07"		//retribution body
	tech[1][13]		RESEARCHSTAT		"R-Vehicle-Metals09"		//vtol armor
	tech[1][14]		RESEARCHSTAT		"R-Struc-VTOLPad-Upgrade06"	//rearm
	tech[1][15]		RESEARCHSTAT		"R-Struc-Factory-Upgrade04"	//production
	tech[1][16]		RESEARCHSTAT		"R-Struc-Power-Upgrade03a"	//power upgrade 03a
	tech[1][17]		RESEARCHSTAT		"R-Sys-Autorepair-General"	//autorepair
	tech[1][18]		RESEARCHSTAT		"R-Vehicle-Engine09"		//finally - speed

	maxVtolFacs[0]	int					1
	maxVtolFacs[1]	int					4

	maxVTOLs[0]		int					5
	maxVTOLs[1]		int					70

	// incendiary emplacements.
	numIncendrys	int					10
	incendiaries[0]	STRUCTURESTAT		"Emplacement-MortarPit01"
	incendiaries[1]	STRUCTURESTAT		"Emplacement-MortarPit02"
	incendiaries[2]	STRUCTURESTAT		"Emplacement-MortarPit-Incenediary"
	incendiaries[3]	STRUCTURESTAT		"Emplacement-RotMor"
	incendiaries[4]	STRUCTURESTAT		"Emplacement-Howitzer105"
	incendiaries[5]	STRUCTURESTAT		"Emplacement-Howitzer150"
	incendiaries[6]	STRUCTURESTAT		"Emplacement-Howitzer-Incenediary"
	incendiaries[7]	STRUCTURESTAT		"Emplacement-RotHow"
	incendiaries[8]	STRUCTURESTAT		"Emplacement-Rocket06-IDF"
	incendiaries[9]	STRUCTURESTAT		"Emplacement-HvART-pit"

	//anti a.
	vtolDefStruct[0] STRUCTURESTAT		"AASite-QuadMg1"	//1
	vtolDefStruct[1] STRUCTURESTAT		"AASite-QuadBof" 	//2
	vtolDefStruct[2] STRUCTURESTAT		"AASite-QuadRotMg"
	vtolDefStruct[3] STRUCTURESTAT		"P0-AASite-SAM1" 	//3
	vtolDefStruct[4] STRUCTURESTAT		"P0-AASite-SAM2"
	vtolDefStruct[5] STRUCTURESTAT		"P0-AASite-Laser"

	// upgrade structures
	powModule		STRUCTURESTAT		"A0PowMod1"
	facModule		STRUCTURESTAT		"A0FacMod1"
	resModule		STRUCTURESTAT		"A0ResearchModule1"

 	// Essential and fundamental structs. Fundamental => what you build on level start
	numStructs		int					13
	numFundamental		int					5
	structs[0]		STRUCTURESTAT		"A0LightFactory"
	structs[1]		STRUCTURESTAT		"A0ResearchFacility"
	structs[2]		STRUCTURESTAT		"A0CommandCentre"
	structs[3]		STRUCTURESTAT		"A0PowerGenerator"
	structs[4]		STRUCTURESTAT		"A0CyborgFactory"

	structs[5]		STRUCTURESTAT		"Sys-CB-Tower01"
	structs[6]		STRUCTURESTAT		"Sys-SpyTower"

	structs[7]		STRUCTURESTAT		"A0LasSatCommand"
	structs[8]		STRUCTURESTAT		"A0Sat-linkCentre"
	structs[9]		STRUCTURESTAT		"X-Super-Rocket"
	structs[10]		STRUCTURESTAT		"X-Super-Cannon"
	structs[11]		STRUCTURESTAT		"X-Super-MassDriver"
	structs[12]		STRUCTURESTAT		"X-Super-Missile"

	/* List what counts as base structures */
	numBaseStruct	int					8
	baseStruct[0]	STRUCTURESTAT		"A0PowerGenerator"
	baseStruct[1]	STRUCTURESTAT		"A0LightFactory"
	baseStruct[2]	STRUCTURESTAT		"A0CommandCentre"
	baseStruct[3]	STRUCTURESTAT		"A0ResearchFacility"
	baseStruct[4]	STRUCTURESTAT		"A0CyborgFactory"
	baseStruct[5]	STRUCTURESTAT		"A0LasSatCommand"
	baseStruct[6]	STRUCTURESTAT		"A0Sat-linkCentre"
	baseStruct[7]	STRUCTURESTAT		"A0VTolFactory1"

	// defensive structs.
	numDefStructs	int					22
	defStructs[0]	STRUCTURESTAT		"GuardTower1"
	defStructs[1]	STRUCTURESTAT		"PillBox1"
	defStructs[2]	STRUCTURESTAT		"Pillbox-RotMG"
	defStructs[3]	STRUCTURESTAT		"GuardTower6"
	defStructs[4]	STRUCTURESTAT		"PillBox4"		//LC
	defStructs[5]	STRUCTURESTAT		"GuardTower5"		//Lancer
	defStructs[6]	STRUCTURESTAT		"WallTower03"		//MC
	defStructs[7]	STRUCTURESTAT		"WallTower04"		//HC
	defStructs[8]	STRUCTURESTAT		"GuardTower5"		//Lancer

	defStructs[9]	STRUCTURESTAT		"WallTower04"		//HC
	defStructs[10]	STRUCTURESTAT		"WallTower-HPVcannon"
	defStructs[11]	STRUCTURESTAT		"Emplacement-Howitzer105"
	defStructs[12]	STRUCTURESTAT		"Emplacement-HvyATrocket"
	defStructs[13]	STRUCTURESTAT		"Emplacement-MortarPit02"
	defStructs[14]	STRUCTURESTAT		"WallTower06"
	defStructs[15]	STRUCTURESTAT		"Emplacement-PulseLaser"	// Campaign 3 Defensive Structures
	defStructs[16]	STRUCTURESTAT		"Emplacement-Rail2"

	defStructs[17]	STRUCTURESTAT		"WallTower-HvATrocket"	//TK
	defStructs[18]	STRUCTURESTAT		"WallTower-Atmiss"	//Scourge
	defStructs[19]	STRUCTURESTAT		"WallTower-PulseLas"
	defStructs[20]	STRUCTURESTAT		"WallTower-Rail2"
	defStructs[21]	STRUCTURESTAT		"WallTower-Rail3"

	// wall structs (4)
	numWallWeaps	int					10
	wall			STRUCTURESTAT		"A0HardcreteMk1Wall"
	cornerWall		STRUCTURESTAT		"A0HardcreteMk1CWall"
	wallWeaps[0]	STRUCTURESTAT		"WallTower01"
	wallWeaps[1]	STRUCTURESTAT		"WallTower02"
	wallWeaps[2]	STRUCTURESTAT		"WallTower03"
	wallWeaps[3]	STRUCTURESTAT		"WallTower04"
	wallWeaps[4]	STRUCTURESTAT		"WallTower06"
	wallWeaps[5]	STRUCTURESTAT		"WallTower06"
	wallWeaps[6]	STRUCTURESTAT		"WallTower-Rail2"
	wallWeaps[7]	STRUCTURESTAT		"WallTower-PulseLas"
	wallWeaps[8]	STRUCTURESTAT		"WallTower-Atmiss"
	wallWeaps[9]	STRUCTURESTAT		"WallTower-HPVcannon"

	/////////////////////////////////////////////////////////////////////
	/////////////////////////////////////////////////////////////////////
	// SKIRMISH TEMPLATES

	// COMBAT TEMPLATES

	//branchDefault
	numTemplates	int			48

	tmpl[0]	TEMPLATE	"ViperMG01Wheels"		//MG
	tmpl[1]	TEMPLATE	"ViperMG02Wheels"		//TMG
	tmpl[2]	TEMPLATE	"ViperHMGWheels"		//HMG
	tmpl[3]	TEMPLATE	"ViperPODWheels"		//POD
	tmpl[4]	TEMPLATE	"ViperLtA-Twheels"		//Lancer
	tmpl[5]	TEMPLATE	"ViperFlameWheels"		//Flamer
	tmpl[6]	TEMPLATE	"ViperLtA-Twheels"		//Lancer
	tmpl[7]	TEMPLATE	"CobraMRLHalftrack"		//MRL
	tmpl[8]	TEMPLATE	"ViperLtCannonWheels"	//LC
	tmpl[9]	TEMPLATE	"ViperPODWheels"		//POD
	tmpl[10]	TEMPLATE	"ViperLtCannonHTracks"	//LC

	tmpl[11]	TEMPLATE	"CobraLtA-Thalftrack"	//Lancer	HT
	tmpl[12]	TEMPLATE	"CobraMRLHalftrack"		//MRL 	HT
	tmpl[13]	TEMPLATE	"CobraInfernoHTracks"	//Inferno	HT
	tmpl[14]	TEMPLATE	"SK-Cobra-Hover-Lancer"	//Lancer	H
	tmpl[15]	TEMPLATE	"Sk-CobraBBHover"		//BB		H
	tmpl[16]	TEMPLATE	"CobraMedCnTrks"		//MC		Tr
	tmpl[17]	TEMPLATE	"SK-Cobra-Track-HVC"	//HVC	Tr
	tmpl[18]	TEMPLATE	"CobraHvyCnTrks"		//HC		Tr

	//Campaign 2
	tmpl[19]	TEMPLATE	"PythonHoverHVC"		//HVC Hover
	tmpl[20]	TEMPLATE	"SK-Cobra-Track-TK"
	tmpl[21]	TEMPLATE	"Sk-PythonHvCanTrack"
	tmpl[22]	TEMPLATE	"Sk-PythonHvCanTrack"

	tmpl[23]	TEMPLATE	"SK-Panther-Hover-HVC"
	tmpl[24]	TEMPLATE	"SK-Panther-Hover-TK"

	tmpl[25]	TEMPLATE	"SK-Tiger-Track-Hcannon"
	tmpl[26]	TEMPLATE	"SK-Tiger-Track-HVC"
	tmpl[27]	TEMPLATE	"SK-Tiger-Track-Hcannon"
	tmpl[28]	TEMPLATE	"SK-Tiger-Hover-TK"

	//Campaign 3
	tmpl[29]	TEMPLATE	"SK-Leopard-Htrk-Needle"
	tmpl[30]	TEMPLATE	"SK-Tiger-Track-Hcannon"
	tmpl[31]	TEMPLATE	"SK-Panther-Track-RailGun"
	tmpl[32]	TEMPLATE	"SK-Panther-Hover-TK"
	tmpl[33]	TEMPLATE	"SK-Tiger-Track-Scourge"
	tmpl[34]	TEMPLATE	"SK-Tiger-Track-Gauss"
	tmpl[35]	TEMPLATE	"SK-Tiger-Hover-Gauss"
	tmpl[36]	TEMPLATE	"SK-Retre-Track-PulseLsr"
	tmpl[37]	TEMPLATE	"SK-Retre-Track-FlashLight"

	tmpl[38]	TEMPLATE	"SK-Retre-Track-RailGun"
	tmpl[39]	TEMPLATE	"SK-Veng-Track-Scourge"
	tmpl[40]	TEMPLATE	"SK-Retre-Hover-RailGun"
	tmpl[41]	TEMPLATE	"SK-Retre-Track-Scourge"
	tmpl[42]	TEMPLATE	"SK-Veng-Track-Gauss"
	tmpl[43]	TEMPLATE	"SK-Veng-Hover-Gauss"
	tmpl[44]	TEMPLATE	"SK-Veng-Track-PulseLsr"
	tmpl[45]	TEMPLATE	"SK-Veng-Hover-Scourge"

	tmpl[46]	TEMPLATE	"SK-Veng-Hover-Seraph"
	tmpl[47]	TEMPLATE	"Dragon-Hover-SeraphGauss"


	/////////////////////////////////////////////////////////////////////
	// SENSORS / REPAIR TEMPLATES

	constructor	TEMPLATE	"ConstructorDroid"
	hovertruck	TEMPLATE	"ScorpHoverTruck"
	repairUnit	TEMPLATE	"ViperRepairHalftrack"

	numSenseTemplates		int		10

	//Campaign 1
	sense[0]	TEMPLATE	"ViperRepairWheels"
	sense[1]	TEMPLATE	"ViperRepairHalftrack"
	sense[2]	TEMPLATE	"CobraSensorHalftrack"
	//Campaign 2
	sense[3]	TEMPLATE	"SK-Bug-Hover-Sensor"
	sense[4]	TEMPLATE	"SK-Bug-Hover-Repair"
	sense[5]	TEMPLATE	"SK-Leopard-Hover-Sensor"
	sense[6]	TEMPLATE	"SK-Leopard-Hover-Repair"
	sense[7]	TEMPLATE	"SK-Panther-Track-Repair"
	//Campaign 3
	sense[8]	TEMPLATE	"SK-Retal-Hover-Sensor"
	sense[9]	TEMPLATE	"SK-Retal-Hover-Repair"

	/////////////////////////////////////////////////////////////////////
	// cyborg templates
	numLightCyborgs	int			6
	cybTempl[0]		TEMPLATE	"CyborgChain01Ground"
	cybTempl[1]		TEMPLATE	"CyborgCannon01Grd"		//heavy gunner
	cybTempl[2]		TEMPLATE	"CyborgFlamer01Grd"
	cybTempl[3]		TEMPLATE	"CyborgRkt01Ground"
	cybTempl[4]		TEMPLATE	"MP-Cyb-Needle-GRD"
	cybTempl[5]		TEMPLATE	"MP-Cyb-Needle-GRD"

	cybMechanic		TEMPLATE	"Cyb-Mechanic"
	cybEngineer		TEMPLATE	"Cyb-ComEng"

	superCyb[0]		TEMPLATE	"Cyb-Hvy-Mcannon"
	superCyb[1]		TEMPLATE	"Cyb-Hvy-HPV"
	superCyb[2]		TEMPLATE	"Cyb-Hvy-Acannon"
	superCyb[3]		TEMPLATE	"Cyb-Hvy-TK"

	numVtolTargets		int				10
	vtolTarget[0]		STRUCTURESTAT	"A0CommandCentre"
	vtolTargetWeight[0]	int				10
	vtolTarget[1]		STRUCTURESTAT	"A0LightFactory"
	vtolTargetWeight[1]	int				80
	vtolTarget[2]		STRUCTURESTAT	"A0CyborgFactory"
	vtolTargetWeight[2]	int				60
	vtolTarget[3]		STRUCTURESTAT	"A0VTolFactory1"
	vtolTargetWeight[3]	int				100
	vtolTarget[4]		STRUCTURESTAT	"A0LasSatCommand"
	vtolTargetWeight[4]	int				90
	vtolTarget[5]		STRUCTURESTAT	"A0Sat-linkCentre"
	vtolTargetWeight[5]	int				10
	vtolTarget[6]		STRUCTURESTAT	"A0ResearchFacility"
	vtolTargetWeight[6]	int				10
	vtolTarget[7]		STRUCTURESTAT	"A0PowerGenerator"
	vtolTargetWeight[7]	int				15
	vtolTarget[8]		STRUCTURESTAT	"A0ResourceExtractor"
	vtolTargetWeight[8]	int				20
	vtolTarget[9]		STRUCTURESTAT	"A0RepairCentre3"
	vtolTargetWeight[9]	int				10


	// Structure types AI will rebuild when they get destroyed
	numRebuildStat		int				2
	rebuildStat[0]		STRUCTURESTAT	"A0HardcreteMk1Wall"
	rebuildStat[1]		STRUCTURESTAT	"A0HardcreteMk1CWall"

	// propulsions
	vtolPropulsion			PROPULSION	"V-Tol"
	trackPropulsion			PROPULSION	"tracked01"
	wheelPropulsion			PROPULSION	"wheeled01"
	hoverPropulsion			PROPULSION	"hover01"
	halftrackPropulsion		PROPULSION	"HalfTrack"

	// bodies
	bugBody				BODY		"Body4ABT"
	viperBody			BODY		"Body1REC"
	cobraBody			BODY		"Body5REC"
	scorpionBody			BODY		"Body8MBT"
	leopardBody			BODY		"Body2SUP"
	pythonBody			BODY		"Body11ABT"
	retributionBody			BODY		"Body7ABT"
	tigerBody			BODY		"Body9REC"
	vengeanceBody			BODY		"Body10MBT"
	wyvernBody			BODY		"Body13SUP"
	dragonBody			BODY		"Body14SUP"

	// VTOL anti-tank weapons, in reverse order of priority
	numAtWeapons			int		3
	atWeapon[0]			WEAPON		"Rocket-VTOL-LtA-T"	// vtol lancer
	atWeapon[1]			WEAPON		"Rocket-VTOL-HvyA-T"	// vtol tank-killer
	atWeapon[2]			WEAPON		"Missile-VTOL-AT"	// vtol scourge

	// VTOL anti-building weapons, in reverse order of priority
	numAsWeapons			int		1
	asWeapon[0]			WEAPON		"Rocket-VTOL-BB"	// vtol bunker-buster

	// VTOL weapons of mass destruction, in reverse order of priority
	numMdWeapons			int		3
	mdWeapon[0]			WEAPON		"Bomb3-VTOL-LtINC"	// phosphor bomb
	mdWeapon[1]			WEAPON		"Bomb4-VTOL-HvyINC"	// thermite bomb
	mdWeapon[2]			WEAPON		"Bomb5-VTOL-Plasmite"	// plasmite bomb

	/////////////////////////////////////////////////////////////////////
}
