#************************************************* *************************** #** #** File : /cdimage/lua/modules/AI/aiarchetype-easy.lua #** Author(s): John Comes #** #** Summary : Easy AI #** #** Copyright ゥ 2005 Gas Powered Games, Inc. All rights reserved. #************************************************* *************************** local AIBuildUnits = import('/lua/modules/ai/aibuildunits.lua') local AIUtils = import('/lua/modules/ai/aiutilities.lua') local PlatoonTemplates = import('/lua/modules/platoontemplates.lua').PlatoonTemplates local BBTmplFile = '/lua/modules/basetemplates.lua' local BuildingTmpl = 'BuildingTemplates' local BaseTmpl = 'BaseTemplates' local ExBaseTmpl = 'ExpansionBaseTemplates' local Adj2x2Tmpl = 'Adjacency2x2' local UCBC = '/lua/modules/editor/UnitCountBuildConditions.lua' local MIBC = '/lua/modules/editor/MiscBuildConditions.lua' local MABC = '/lua/modules/editor/MarkerBuildConditions.lua' local OAUBC = '/lua/modules/editor/OtherArmyUnitCountBuildConditions.lua' local EBC = '/lua/modules/editor/EconomyBuildConditions.lua' local PCBC = '/lua/modules/editor/PlatoonCountBuildConditions.lua' local SAI = '/lua/modules/ScenarioPlatoonAI.lua' local PlatoonFile = '/lua/modules/platoon.lua' function EvaluatePlan( aiBrain ) local per = ScenarioInfo.ArmySetup[aiBrain.Name].AIPersonality if not per then return 1 end if per == 'easy' then return 150 end return 1 end local PlatoonList = { ################################################## ################# ## Commander ################################################## ################# ################### ## Initial ################### { BuilderName = 'CDR Initial', PlatoonTemplate = 'CommanderBuilder', Priority = 1002, BuildConditions = { { UCBC, 'HaveEqualToUnitsWithCategory', { 1, categories.COMMAND}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 2, categories.MASSPRODUCTION}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, ExpansionExclude = {'Sea'}, PlatoonData = { Construction = { BuildStructures = { 'T1Resource', 'T1Resource', 'T1Resource', 'T1Resource', } } } }, { BuilderName = 'CDR Initial 2', PlatoonTemplate = 'CommanderBuilder', Priority = 1001, BuildConditions = { { UCBC, 'HaveEqualToUnitsWithCategory', { 1, categories.COMMAND}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 2, categories.MASSPRODUCTION}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 2, categories.ENERGYPRODUCTION}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, ExpansionExclude = {'Sea'}, PlatoonData = { Construction = { BuildStructures = { 'T1EnergyProduction', 'T1EnergyProduction', 'T1EnergyProduction', } } } }, { BuilderName = 'CDR Initial 3', PlatoonTemplate = 'CommanderBuilder', Priority = 1000, BuildConditions = { { UCBC, 'HaveEqualToUnitsWithCategory', { 1, categories.COMMAND}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.FACTORY}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 1, categories.ENERGYPRODUCTION}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, ExpansionExclude = {'Sea'}, PlatoonData = { Construction = { BuildStructures = { 'T1LandFactory', } } } }, { BuilderName = 'CDR Mass Fab CDR', PlatoonTemplate = 'CommanderBuilder', Priority = 900, BuildConditions = { { UCBC, 'HaveEqualToUnitsWithCategory', { 1, categories.COMMAND}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.MASSFABRICATION * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.MASSEXTRACTION * categories.TECH1}}, { EBC, 'LessThanEconStorageRatio', { 0.1, 1.1}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, ExpansionExclude = {'Sea'}, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T1MassCreation', 'T1EnergyProduction', 'T1EnergyProduction', }, Location = 'MAIN', } } }, { BuilderName = 'CDR T1 Energy', PlatoonTemplate = 'CommanderBuilder', Priority = 900, BuildConditions = { { UCBC, 'HaveEqualToUnitsWithCategory', { 1, categories.COMMAND}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY}}, { EBC, 'LessThanEconStorageRatio', { 1.1, 0.1}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, ExpansionExclude = {'Sea'}, PlatoonData = { Construction = { AdjacencyCategory = 'FACTORY', AdjacencyDistance = 100, BuildClose = true, BuildStructures = { 'T1EnergyProduction', }, Location = 'MAIN', } } }, { BuilderName = 'CDR Assist Factory', PlatoonTemplate = 'CommanderAssist', Priority = 800, BuildConditions = { { UCBC, 'HaveEqualToUnitsWithCategory', { 1, categories.COMMAND}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY}}, { EBC, 'GreaterThanEconStorageRatio', { 0.2, 0.2}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, ExpansionExclude = {'Sea'}, PlatoonData = { Assist = { AssistRange = 80, BeingBuiltCategories = {'FACTORY', 'ENGINEER'}, Time = 60, }, } }, { BuilderName = 'CDR Assist Mass Extractor Upgrade', PlatoonTemplate = 'CommanderAssist', Priority = 900, BuildConditions = { { UCBC, 'HaveEqualToUnitsWithCategory', { 1, categories.COMMAND}}, { UCBC, 'HaveGreaterThanUnitsInCategoryBeingBuilt', { 0, categories.TECH2 * categories.MASSEXTRACTION}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, ExpansionExclude = {'Sea'}, PlatoonData = { Assist = { AssistRange = 80, BeingBuiltCategories = {'MASSEXTRACTION'}, Time = 30, }, } }, { BuilderName = 'CDR T1 Land Factory', PlatoonTemplate = 'CommanderBuilder', Priority = 900, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.COMMAND}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 10, categories.FACTORY * categories.LAND}}, { EBC, 'GreaterThanEconStorageRatio', { 0.3, 0.7}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, ExpansionExclude = {'Sea'}, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T1LandFactory', }, Location = 'MAIN', } } }, { BuilderName = 'CDR T1 AirFactory', PlatoonTemplate = 'CommanderBuilder', Priority = 750, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.COMMAND}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.TECH2 * categories.MASSEXTRACTION}}, { UCBC, 'HaveLessThanUnitsInCategoryBeingBuilt', { 1, categories.TECH2 * categories.MASSEXTRACTION}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 4, categories.FACTORY * categories.AIR}}, { EBC, 'GreaterThanEconTrend', { 0.3, 0.7}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, ExpansionExclude = {'Sea'}, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T1AirFactory', }, Location = 'MAIN', } } }, ################################################## ################# ## Engineers ################################################## ################# ########## ## Tech 1 ########## { BuilderName = 'T1 Engineer Disband - Init', PlatoonTemplate = 'EngineerOnlyBuild', Priority = 900, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.TECH1}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 3, categories.ENGINEER * categories.TECH1}}, }, LocationType = 'MAIN', PlatoonType = 'Any', RequiresConstruction = true, ExpansionExclude = {'Sea'}, }, { BuilderName = 'T2 Engineer Disband - Init', PlatoonTemplate = 'T2EngineerOnlyBuild', Priority = 925, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY - categories.TECH1}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 6, categories.ENGINEER * categories.TECH2}}, }, LocationType = 'MAIN', PlatoonType = 'Any', RequiresConstruction = true, ExpansionExclude = {'Sea'}, }, { BuilderName = 'T3 Engineer Disband - Init', PlatoonTemplate = 'T3EngineerOnlyBuild', Priority = 950, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 12, categories.ENGINEER * categories.TECH3}}, }, LocationType = 'MAIN', PlatoonType = 'Any', ExpansionExclude = {'Sea'}, RequiresConstruction = true, }, ######################################## ## ECONOMY CONSTRUCTION ######################################## { BuilderName = 'T1 T1Resource Engineer', PlatoonTemplate = 'EngineerGenericSingle', Priority = 1000, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { MABC, 'MarkerLessThanDistance', { 'Mass', 10000, 0, 0, 0}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildStructures = { 'T1Resource', 'T1Resource', } } } }, { BuilderName = 'T1 Power Engineer', PlatoonTemplate = 'EngineerGenericSingle', Priority = 950, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 30, categories.TECH1 * categories.ENERGYPRODUCTION}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'FACTORY', AdjacencyDistance = 100, BuildClose = true, BuildStructures = { 'T1EnergyProduction', 'T1EnergyProduction', 'T1EnergyProduction', 'T1EnergyProduction', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Power Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 900, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 10, categories.TECH3 * categories.ENERGYPRODUCTION}}, { EBC, 'LessThanEconTrend', { 1000, 2000}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.1}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'FACTORY', AdjacencyDistance = 100, BuildClose = true, BuildStructures = { 'T3EnergyProduction', 'T3EnergyProduction', 'T3EnergyProduction', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Mass Fab Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 900, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 5, categories.TECH3 * categories.MASSFABRICATION}}, { EBC, 'LessThanEconTrend', { 40, 100000}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.1}}, { EBC, 'LessThanEconStorageRatio', { 0.8, 1.1}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T3MassCreation', 'T3MassCreation', }, Location = 'MAIN', } } }, ######################################## ## BASE CONSTRUCTION ######################################## { BuilderName = 'T1 Radar Engineer', PlatoonTemplate = 'EngineerBuilder', Priority = 950, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.RADAR}}, { EBC, 'GreaterThanEconIncome', { 1, 10}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T1Radar', }, Location = 'MAIN', } } }, { BuilderName = 'T2 Air Staging Engineer', PlatoonTemplate = 'T2EngineerBuilder', Priority = 800, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH2}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 25, categories.AIR}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 2, categories.AIRSTAGINGPLATFORM}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.1}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T2AirStagingPlatform', }, Location = 'MAIN', } } }, { BuilderName = 'T2 Artillery Engineer', PlatoonTemplate = 'T2EngineerBuilder', Priority = 800, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH2}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 5, categories.ARTILLERY * categories.STRUCTURE * categories.TECH2}}, { EBC, 'GreaterThanEconStorageRatio', { 0.2, 0.2}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T2Artillery', 'T2StrategicMissile', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Gate Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 900, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.GATE * categories.TECH3 * categories.STRUCTURE}}, { EBC, 'GreaterThanEconStorageRatio', { 0.7, 0.7}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T3QuantumGate', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Artillery Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 800, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { EBC, 'GreaterThanEconIncome', {15, 100}}, { EBC, 'GreaterThanEconStorageRatio', { 0.9, 0.9}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T3Artillery', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Nuke Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 825, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { EBC, 'GreaterThanEconStorageRatio', { 0.9, 0.9}}, { EBC, 'GreaterThanEconIncome', {15, 100}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T3StrategicMissile', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Land Exp1 Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 800, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { EBC, 'GreaterThanEconStorageRatio', { 0.9, 0.9}}, { EBC, 'GreaterThanEconIncome', {15, 100}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = false, BaseTemplate = ExBaseTmpl, NearMarkerType = 'Rally Point', BuildStructures = { 'T4LandExperimental1', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Land Exp2 Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 800, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { EBC, 'GreaterThanEconStorageRatio', { 0.9, 0.9}}, { EBC, 'GreaterThanEconIncome', {15, 100}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = false, BaseTemplate = ExBaseTmpl, NearMarkerType = 'Rally Point', BuildStructures = { 'T4LandExperimental2', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Air Exp1 Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 800, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { EBC, 'GreaterThanEconStorageRatio', { 0.9, 0.9}}, { EBC, 'GreaterThanEconIncome', {15, 100}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = false, BaseTemplate = ExBaseTmpl, NearMarkerType = 'Protected Experimental Construction', BuildStructures = { 'T4AirExperimental1', }, Location = 'MAIN', } } }, ######################################## ## BASE DEFENSE CONSTRUCTION ######################################## { BuilderName = 'T1 Base D Engineer', PlatoonTemplate = 'EngineerGenericSingle', PlatoonAIPlan = 'EngineerBuildAI', Priority = 700, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 3, categories.DEFENSE * categories.TECH1}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.25}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T1GroundDefense', }, Location = 'MAIN', } } }, { BuilderName = 'T2 Base D Engineer', PlatoonTemplate = 'T2EngineerGenericSingle', PlatoonAIPlan = 'EngineerBuildAI', Priority = 900, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH2}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 3, categories.DEFENSE * categories.TECH2}}, { EBC, 'GreaterThanEconStorageRatio', { 0.01, 0.25}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T2MissileDefense', 'T2AADefense', 'T2GroundDefense', }, Location = 'MAIN', } } }, { BuilderName = 'T2 Shield D Engineer Energy Production', PlatoonTemplate = 'T2EngineerBuilder', Priority = 850, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH2}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.SHIELD * categories.TECH2}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.25}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'ENERGYPRODUCTION', AdjacencyDistance = 100, BuildClose = false, BuildStructures = { 'T2ShieldDefense', }, Location = 'MAIN', } } }, { BuilderName = 'T2 Shield D Engineer', PlatoonTemplate = 'T2EngineerBuilder', Priority = 850, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH2}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.SHIELD * categories.TECH2}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.25}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'DEFENSE DIRECTFIRE', AdjacencyDistance = 100, BuildClose = false, BuildStructures = { 'T2ShieldDefense', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Anti-Nuke Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 925, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 2, categories.ENGINEER * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.ANTIMISSILE * categories.TECH3}}, { EBC, 'GreaterThanEconIncome', { 2.5, 100}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = false, AdjacencyCategory = 'FACTORY', AdjacencyDistance = 100, BuildStructures = { 'T3StrategicMissileDefense', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Anti-Nuke Engineer 2', PlatoonTemplate = 'T3EngineerBuilder', Priority = 925, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 2, categories.ENGINEER * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.ANTIMISSILE * categories.TECH3}}, { EBC, 'GreaterThanEconStorageRatio', { 0.01, 0.25}}, { EBC, 'GreaterThanEconIncome', { 2.5, 100}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = false, AdjacencyCategory = 'ENERGYPRODUCTION TECH2, ENERGYPRODUCTION TECH3', AdjacencyDistance = 100, BuildStructures = { 'T3StrategicMissileDefense', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Anti-Nuke Engineer 3', PlatoonTemplate = 'T3EngineerBuilder', Priority = 925, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 2, categories.ENGINEER * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.ANTIMISSILE * categories.TECH3}}, { EBC, 'GreaterThanEconStorageRatio', { 0.01, 0.25}}, { EBC, 'GreaterThanEconIncome', { 2.5, 100}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = false, AdjacencyCategory = 'SHIELD', AdjacencyDistance = 100, BuildStructures = { 'T3StrategicMissileDefense', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Base D Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 875, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 3, categories.DEFENSE * categories.TECH3}}, { EBC, 'GreaterThanEconStorageRatio', { 0.01, 0.25}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T3AADefense', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Shield D Engineer Energy Adj', PlatoonTemplate = 'T3EngineerBuilder', Priority = 875, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.SHIELD * categories.TECH3}}, { MIBC, 'FactionIndex', {1, 2}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.25}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'ENERGYPRODUCTION', AdjacencyDistance = 100, BuildClose = false, BuildStructures = { 'T3ShieldDefense', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Shield D Engineer Mass Fab Adj', PlatoonTemplate = 'T3EngineerBuilder', Priority = 875, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.SHIELD * categories.TECH3}}, { MIBC, 'FactionIndex', {1, 2}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.25}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'MASSFABRICATION', AdjacencyDistance = 100, BuildClose = false, BuildStructures = { 'T3ShieldDefense', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Shield D Engineer Factory Adj', PlatoonTemplate = 'T3EngineerBuilder', Priority = 875, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.SHIELD * categories.TECH3}}, { MIBC, 'FactionIndex', {1, 2}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.25}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'TECH3 FACTORY', AdjacencyDistance = 100, BuildClose = false, BuildStructures = { 'T3ShieldDefense', }, Location = 'MAIN', } } }, ######################################## ## EMERGENCY BUILDING TECH 1 ######################################## { BuilderName = 'T1 Emergency Mass Extraction Engineer', PlatoonTemplate = 'EngineerBuilder', Priority = 700, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { EBC, 'GreaterThanEconStorageRatio', { 0.05, 0.0}}, { EBC, 'LessThanEconTrend', { 0, 100000}}, { MABC, 'MarkerLessThanDistance', { 'Mass', 1000}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildStructures = { 'T1Resource', } } } }, { BuilderName = 'T1 Emergency Mass Creation Engineer', PlatoonTemplate = 'EngineerBuilder', Priority = 850, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.MASSFABRICATION * categories.TECH3}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.MASSEXTRACTION * categories.TECH1}}, { EBC, 'LessThanEconStorageRatio', { 0.1, 1.1}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T1MassCreation', 'T1EnergyProduction', 'T1EnergyProduction', }, Location = 'MAIN', } } }, { BuilderName = 'T1 Emergency Power Engineer', PlatoonTemplate = 'EngineerBuilder', Priority = 850, InstanceCount = 3, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { EBC, 'LessThanEconStorageRatio', { 1.1, 0.1}}, { EBC, 'LessThanEconTrend', { 100000, 0}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'FACTORY', AdjacencyDistance = 100, BuildClose = true, BuildStructures = { 'T1EnergyProduction', 'T1EnergyProduction', 'T1EnergyProduction', }, Location = 'MAIN', } } }, { BuilderName = 'T1 Emergency Hydrocarbon Engineer', PlatoonTemplate = 'EngineerBuilder', Priority = 900, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.HYDROCARBON}}, { MABC, 'MarkerLessThanDistance', { 'Hydrocarbon', 200}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildStructures = { 'T1HydroCarbon', } } } }, { BuilderName = 'T1 Mass Adjacency Engineer', PlatoonTemplate = 'EngineerBuilder', Priority = 700, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 1, categories.MASSEXTRACTION * categories.TECH2}}, { EBC, 'GreaterThanEconStorageRatio', { 0.2, 0.1}}, { MABC, 'MarkerLessThanDistance', { 'Mass', 100, -3, 0, 0}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'MASSEXTRACTION', AdjacencyDistance = 100, BuildClose = false, ThreatMin = -3, ThreatMax = 0, ThreatRings = 0, BuildStructures = { 'MassStorage', 'MassStorage', 'MassStorage', 'MassStorage', } } } }, { BuilderName = 'T1 Energy Storage Engineer', PlatoonTemplate = 'EngineerBuilder', Priority = 750, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { EBC, 'GreaterThanEconStorageRatio', { 0.5, 0.9}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'ENERGYPRODUCTION', AdjacencyDistance = 100, BuildClose = false, BuildStructures = { 'EnergyStorage', }, Location = 'MAIN', } } }, ######################################## ## EMERGENCY BUILDING TECH 2 ######################################## { BuilderName = 'T2 Power Engineer', PlatoonTemplate = 'T2EngineerBuilder', Priority = 975, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH2}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 15, categories.ENERGYPRODUCTION * categories.STRUCTURE * categories.TECH2}}, { EBC, 'LessThanEconStorageRatio', { 1.1, 0.3}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'FACTORY', AdjacencyDistance = 100, BuildClose = true, BuildStructures = { 'T2EnergyProduction', 'T2EnergyProduction', }, Location = 'MAIN', } } }, ######################################## ## EMERGENCY BUILDING TECH 3 ######################################## { BuilderName = 'T3 Emergency Power Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 975, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { EBC, 'LessThanEconStorageRatio', { 1.1, 0.5}}, { EBC, 'LessThanEconTrend', { 100000, 0}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'FACTORY', AdjacencyDistance = 100, BuildClose = true, BuildStructures = { 'T3EnergyProduction', 'T3EnergyProduction', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Emergency Mass Fab Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 900, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { EBC, 'LessThanEconStorageRatio', { 0.1, 1.1}}, { EBC, 'LessThanEconTrend', { 0, 100000}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = true, BuildStructures = { 'T3MassCreation', }, Location = 'MAIN', } } }, { BuilderName = 'T3 Extra Power Engineer', PlatoonTemplate = 'T3EngineerBuilder', Priority = 900, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH3}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.1}}, { EBC, 'LessThanEconTrend', { 1000, 30}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, ExpansionExclude = {'Sea'}, RequiresConstruction = false, PlatoonData = { Construction = { AdjacencyCategory = 'FACTORY', AdjacencyDistance = 100, BuildClose = true, BuildStructures = { 'T3EnergyProduction', 'T3EnergyProduction', }, Location = 'MAIN', } } }, ################################################## ################# ## STRUCTURES ################################################## ################# { BuilderName = 'T1 Mass Extractor Upgrade', PlatoonTemplate = 'T1MassExtractorUpgrade', InstanceCount = 1, Priority = 200, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.MASSEXTRACTION * categories.TECH1}}, { EBC, 'GreaterThanEconIncome', { 1.5, 10}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T1 Land Factory Upgrade', PlatoonTemplate = 'T1LandFactoryUpgrade', Priority = 200, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.TECH1 * categories.LAND}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.MASSEXTRACTION * categories.TECH2}}, { EBC, 'GreaterThanEconIncome', { 6, 10}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T1 Air Factory Upgrade', PlatoonTemplate = 'T1AirFactoryUpgrade', Priority = 200, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.TECH1 * categories.AIR}}, { EBC, 'GreaterThanEconIncome', { 6, 10}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T2 Mass Extractor Upgrade', PlatoonTemplate = 'T2MassExtractorUpgrade', InstanceCount = 1, Priority = 200, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.MASSEXTRACTION * categories.TECH2}}, { EBC, 'GreaterThanEconIncome', { 5, 15}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T2 Land Factory Upgrade', PlatoonTemplate = 'T2LandFactoryUpgrade', Priority = 300, InstanceCount = 2, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.TECH2 * categories.LAND}}, { EBC, 'GreaterThanEconIncome', { 7, 15}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T2 Air Factory Upgrade', PlatoonTemplate = 'T2AirFactoryUpgrade', Priority = 300, InstanceCount = 2, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.TECH2 * categories.AIR}}, { EBC, 'GreaterThanEconIncome', { 7, 15}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T1 Radar Upgrade', PlatoonTemplate = 'T1RadarUpgrade', Priority = 200, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.RADAR * categories.TECH1}}, { EBC, 'GreaterThanEconIncome', { 5, 15}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T2 Radar Upgrade', PlatoonTemplate = 'T2RadarUpgrade', Priority = 300, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.RADAR * categories.TECH2}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.RADAR * categories.TECH3}}, { EBC, 'GreaterThanEconIncome', { 10, 600}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T2 TML Silo', PlatoonTemplate = 'T2TacticalLauncher', Priority = 5, InstanceCount = 5, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.STRUCTURE * categories.TECH2 * categories.TACTICALMISSILEPLATFORM}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T2 Shield Cybran', PlatoonTemplate = 'T2Shield', Priority = 5, InstanceCount = 5, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.SHIELD * categories.TECH2 * categories.STRUCTURE}}, { EBC, 'GreaterThanEconIncome', { 5, 100}}, { MIBC, 'FactionIndex', {3, 3}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, PlatoonData = { Enhancement = { 'Shield1', 'Shield2', 'Shield3', 'Shield4', }, TimeBetweenEnhancements = 120, DoNotDisband = true, }, }, { BuilderName = 'T2 Shield UEF and Aeon', PlatoonTemplate = 'T2Shield', Priority = 5, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.SHIELD * categories.TECH2 * categories.STRUCTURE}}, { EBC, 'GreaterThanEconIncome', { 7, 100}}, { MIBC, 'FactionIndex', {1, 1}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T3 Nuke Silo', PlatoonTemplate = 'T3Nuke', Priority = 5, InstanceCount = 5, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.STRUCTURE * categories.TECH3 * categories.NUKE}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T3 Anti Nuke Silo', PlatoonTemplate = 'T3AntiNuke', Priority = 5, InstanceCount = 5, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.STRUCTURE * categories.TECH3 * categories.ANTIMISSILE}}, }, BuildTimeOut = 120, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T1 Mass Fabricator Pause', PlatoonTemplate = 'T1MassFabricator', Priority = 300, InstanceCount = 3, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.MASSFABRICATION * categories.TECH1}}, { EBC, 'LessThanEconStorageRatio', { 1.1, 0.05}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T3 Mass Fabricator Pause', PlatoonTemplate = 'T3MassFabricator', Priority = 300, InstanceCount = 3, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.MASSFABRICATION * categories.TECH3}}, { EBC, 'LessThanEconStorageRatio', { 1.1, 0.05}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, ################################################## ################# ## LAND ATTACK ################################################## ################# ########## ## Tech 1 ########## { BuilderName = 'T1 Land Scout', PlatoonTemplate = 'T1LandScout1', Priority = 750, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND}}, { UCBC, 'HaveEqualToUnitsWithCategory', { 0, categories.LAND * categories.SCOUT * categories.TECH1}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, }, { BuilderName = 'T1 Light Assault Bot', PlatoonTemplate = 'T1LandDFBot1', Priority = 700, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND}}, # { EBC, 'GreaterThanEconTrend', { -0.2, -1}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, PlatoonData = { LocationType = 'MAIN', }, }, { BuilderName = 'T1 Light Tank', PlatoonTemplate = 'T1LandDFTank1', Priority = 500, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND}}, # { EBC, 'GreaterThanEconTrend', { -0.2, -1}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, PlatoonData = { LocationType = 'MAIN', }, }, { BuilderName = 'T1 Mobile AA 2', PlatoonTemplate = 'T1LandAA1', PlatoonAddBehaviors = { 'AirLandToggle' }, Priority = 525, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, PlatoonData = { LocationType = 'MAIN', }, }, { BuilderName = 'T1 Mortar', PlatoonTemplate = 'T1LandArtillery1', Priority = 500, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND}}, { UCBC, 'HaveUnitsWithCategoryAndAlliance', { true, 5, categories.DEFENSE, 'Enemy'}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, PlatoonData = { LocationType = 'MAIN', }, }, ########## ## Tech 2 ########## { BuilderName = 'T2 Tank', PlatoonTemplate = 'T2LandDFTank1', Priority = 600, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND - categories.TECH1}}, # { EBC, 'GreaterThanEconTrend', { -0.5, -1}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, PlatoonData = { LocationType = 'MAIN', }, }, { BuilderName = 'T2 MML', PlatoonTemplate = 'T2LandArtillery1', Priority = 600, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND - categories.TECH1}}, # { EBC, 'GreaterThanEconTrend', { -0.5, -1}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, PlatoonData = { LocationType = 'MAIN', }, }, { BuilderName = 'T2 Mobile Flak 2', PlatoonTemplate = 'T2LandAA1', Priority = 600, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND - categories.TECH1}}, # { EBC, 'GreaterThanEconTrend', { -0.5, -1}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, PlatoonData = { LocationType = 'MAIN', }, }, { BuilderName = 'T2 Amphibious Tank', PlatoonTemplate = 'T2LandAmphibious1', Priority = 600, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND - categories.TECH1}}, # { EBC, 'GreaterThanEconTrend', { -0.5, -1}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, PlatoonData = { LocationType = 'MAIN', }, }, ########## ## Tech 3 ########## { BuilderName = 'T3 Siege Assault Bot', PlatoonTemplate = 'T3LandBot1', Priority = 700, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND * categories.TECH3}}, # { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, PlatoonData = { LocationType = 'MAIN', }, }, { BuilderName = 'T3 Mobile Heavy Artillery', PlatoonTemplate = 'T3LandArtillery1', Priority = 700, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.LAND * categories.TECH3}}, # { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, PlatoonData = { LocationType = 'MAIN', }, }, { BuilderName = 'T4 Exp Land 1', PlatoonTemplate = 'T4ExperimentalLand1', Priority = 800, InstanceCount = 1, BuildTimeOut = 1200, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.LAND * categories.EXPERIMENTAL}}, }, PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T4 Exp Land 2', PlatoonTemplate = 'T4ExperimentalLand2', Priority = 800, InstanceCount = 1, BuildTimeOut = 1200, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.LAND * categories.EXPERIMENTAL}}, }, PlatoonType = 'Land', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, ################################################## ################# ## AIR ATTACK ################################################## ################# ########## ## Tech 1 ########## { BuilderName = 'T1 Air Scout', PlatoonTemplate = 'T1AirScout1', Priority = 650, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.AIR}}, }, LocationType = 'MAIN', PlatoonType = 'Air', RequiresConstruction = true, }, { BuilderName = 'T1 Air Bomber', PlatoonTemplate = 'T1AirBomber1', Priority = 500, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.AIR}}, { EBC, 'GreaterThanEconTrend', { -0.5, -1}}, }, LocationType = 'MAIN', PlatoonType = 'Air', RequiresConstruction = true, }, { BuilderName = 'T1 Air Fighter', PlatoonTemplate = 'T1AirFighter1', Priority = 550, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.AIR}}, { UCBC, 'HaveUnitsWithCategoryAndAlliance', { true, 5, categories.MOBILE * categories.AIR, 'Enemy'}}, { EBC, 'GreaterThanEconTrend', { -0.5, -1}}, }, LocationType = 'MAIN', PlatoonType = 'Air', RequiresConstruction = true, }, ########## ## Tech 2 ########## { BuilderName = 'T2 Air Gunship', PlatoonTemplate = 'T2AirGunship1', PlatoonAddBehaviors = { 'AirUnitRefit' }, Priority = 600, InstanceCount = 4, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.AIR - categories.TECH1}}, { EBC, 'GreaterThanEconTrend', { -0.8, -1}}, }, LocationType = 'MAIN', PlatoonType = 'Air', RequiresConstruction = true, }, ########## ## Tech 3 ########## { BuilderName = 'T3 Air Gunship', PlatoonTemplate = 'T3AirGunship1', Priority = 700, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.AIR * categories.TECH3}}, { EBC, 'GreaterThanEconStorageRatio', { 0.3, 0.3}}, { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Air', RequiresConstruction = true, }, { BuilderName = 'T3 Air Scout', PlatoonTemplate = 'T3AirScout1', Priority = 750, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.AIR * categories.TECH3}}, { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Air', RequiresConstruction = true, }, { BuilderName = 'T3 Air Fighter', PlatoonTemplate = 'T3AirFighter1', Priority = 725, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.AIR * categories.TECH3}}, { UCBC, 'HaveUnitsWithCategoryAndAlliance', { true, 10, categories.MOBILE * categories.AIR, 'Enemy'}}, { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Air', RequiresConstruction = true, }, { BuilderName = 'T3 Air Bomber', PlatoonTemplate = 'T3AirBomber1', Priority = 700, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.AIR * categories.TECH3}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Air', RequiresConstruction = true, }, { BuilderName = 'T4 Exp Air', PlatoonTemplate = 'T4ExperimentalAir', Priority = 800, InstanceCount = 2, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.AIR * categories.EXPERIMENTAL}}, { MIBC, 'FactionIndex', {2, 3}}, }, PlatoonType = 'Air', RequiresConstruction = false, }, ######################################## ## NAVAL BASE BUILDING ######################################## { BuilderName = 'T1 Naval Builder', PlatoonTemplate = 'EngineerGenericSingle', Priority = 975, InstanceCount = 1, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.ENGINEER * categories.TECH1}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 2, categories.FACTORY * categories.NAVAL}}, { MABC, 'MarkerLessThanDistance', { 'Naval Area', 200}}, { EBC, 'GreaterThanEconStorageRatio', { 0.1, 0.1}}, }, LocationType = 'MAIN', PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, PlatoonData = { Construction = { BuildClose = false, BaseTemplate = ExBaseTmpl, ExpansionBase = true, ExpansionRadius = 50, ExpansionTypes = { 'Sea' }, NearMarkerType = 'Naval Area', BuildStructures = { 'T1SeaFactory', 'T1Sonar', } } } }, { BuilderName = 'T1 Sonar Upgrade', PlatoonTemplate = 'T1SonarUpgrade', Priority = 200, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.SONAR * categories.TECH1}}, { EBC, 'GreaterThanEconIncome', { 5, 15}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T2 Sonar Upgrade', PlatoonTemplate = 'T2SonarUpgrade', Priority = 300, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.SONAR * categories.TECH2}}, { UCBC, 'HaveLessThanUnitsWithCategory', { 1, categories.SONAR * categories.TECH3}}, { EBC, 'GreaterThanEconIncome', { 10, 600}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T1 Sea Factory Upgrade', PlatoonTemplate = 'T1SeaFactoryUpgrade', Priority = 200, InstanceCount = 2, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.TECH1 * categories.NAVAL}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 3, categories.MOBILE * categories.NAVAL}}, { EBC, 'GreaterThanEconIncome', { 6, 10}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T2 Sea Factory Upgrade', PlatoonTemplate = 'T2SeaFactoryUpgrade', Priority = 300, InstanceCount = 2, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.TECH2 * categories.NAVAL}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 6, categories.MOBILE * categories.NAVAL}}, { EBC, 'GreaterThanEconIncome', { 8, 15}}, { EBC, 'GreaterThanEconStorageRatio', { 0.8, 0.8}}, }, PlatoonType = 'Any', PlatoonAddPlans = {'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, ################################################## ################# ## SEA ATTACK ################################################## ################# ########## ## Tech 1 ########## { BuilderName = 'T1 Naval Frigate', PlatoonTemplate = 'T1SeaFrigate1', Priority = 500, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.NAVAL}}, { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Sea', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, }, { BuilderName = 'T1 Naval Anti-Air', PlatoonTemplate = 'T1SeaFrigate2', Priority = 525, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.NAVAL}}, { UCBC, 'HaveUnitsWithCategoryAndAlliance', { true, 10, categories.MOBILE * categories.AIR, 'Enemy'}}, { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Sea', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, }, ########## ## Tech 2 ########## { BuilderName = 'T2 Naval Destroyer', PlatoonTemplate = 'T2SeaDestroyer1', Priority = 600, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.NAVAL - categories.TECH1}}, { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Sea', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, }, { BuilderName = 'T2 Naval Cruiser', PlatoonTemplate = 'T2SeaCruiser1', PlatoonAddBehaviors = { 'AirLandToggle' }, Priority = 600, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.NAVAL - categories.TECH1}}, { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Sea', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, }, ########## ## Tech 3 ########## { BuilderName = 'T3 Naval Battleship', PlatoonTemplate = 'T3SeaBattleship1', Priority = 700, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.NAVAL * categories.TECH3}}, { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Sea', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, }, { BuilderName = 'T3 Naval Carrier', PlatoonTemplate = 'T3SeaNukeSub1', Priority = 700, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.FACTORY * categories.NAVAL * categories.TECH3}}, { UCBC, 'HaveGreaterThanUnitsWithCategory', { 20, categories.MOBILE * categories.AIR}}, { EBC, 'GreaterThanEconTrend', { -1, -2}}, }, LocationType = 'MAIN', PlatoonType = 'Sea', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = true, }, { BuilderName = 'T4 Exp Sea', PlatoonTemplate = 'T4ExperimentalSea', PlatoonAddBehaviors = { 'TempestBehavior' }, Priority = 800, InstanceCount = 1, BuildTimeOut = 2400, BuildConditions = { { UCBC, 'HaveGreaterThanUnitsWithCategory', { 0, categories.AIR * categories.EXPERIMENTAL}}, }, PlatoonType = 'Sea', PlatoonAddPlans = {'DistressResponseAI', 'PlatoonCallForHelpAI'}, RequiresConstruction = false, }, { BuilderName = 'T1 Wall Builder', PlatoonTemplate = 'EngineerGenericSingle', PlatoonAIPlan = 'EngineerBuildAI', Priority = 800, InstanceCount = 2, RequiresConstruction = false, PlatoonType = 'Any', BuildConditions = { { UCBC, 'HaveAreaWithUnitsFewWalls', { 'MAIN', 100, 5, 'STRUCTURE - WALL', false, false, false } }, }, PlatoonData = { Construction = { BuildStructures = { 'Wall' }, LocationType = 'MAIN', Wall = true, MarkerRadius = 100, MarkerUnitCount = 5, MarkerUnitCategory = 'STRUCTURE - WALL', }, }, }, } function AIAC(aiBrain, num) local nmeDef = aiBrain:GetNumUnitsAroundPoint('Enemy', categories.DEFENSE, Vector(0,0,0), 100000) if nmeDef > 5 then return true end return false end #Shared area function ExecutePlan( aiBrain ) aiBrain:SetConstantEvaluate(false) if not aiBrain:PBMHasPlatoonList() then LOG('*AI DEBUG: ARMY ', repr(aiBrain:GetArmyIndex()), ': Initiating Archetype Easy AI') aiBrain:SetResourceSharing(true) aiBrain:PBMEnableRandomSamePriority() aiBrain:PBMSetCheckInterval(120) AIBuildUnits.AIExecutePlanUnitList(aiBrain, PlatoonList, PlatoonTemplates[aiBrain:GetFactionIndex()]) end if not aiBrain:AMIsAttackManagerActive() then local spec = { AttackCheckInterval = 900, AttackConditions = { {AIAC, {2}} }, } aiBrain:InitializeAttackManager(spec) end if not aiBrain.BaseMonitor then aiBrain:BaseMonitorInitialization() local plat = aiBrain:GetPlatoonUniquelyNamed('ArmyPool') plat:ForkThread( plat.PoolDistressAI ) end if not aiBrain.EnemyPickerThread then aiBrain.EnemyPickerThread = aiBrain:ForkThread( aiBrain.PickEnemy ) end end