//------------------------------------------------------------------- // INCLUDES: //------------------------------------------------------------------- include "Celeste/Milk_aiHeader.xs"; // Gets global vars, function forward declarations include "Celeste/Milk_aiUtil.xs"; // Misc. shared AI utility functions include "Celeste/Milk_aiEcon2.xs"; // All of the AI's econ functionality include "Celeste/Milk_aiMilitary.xs"; // All of the AI's military functionality include "Celeste/Milk_aiNavy.xs"; // All of the AI's naval functionality include "Celeste/Milk_aiEventHandlers.xs"; // Event handler methods for the AI include "Celeste/Milk_aiMain.xs"; // The bulk of the AI include "Celeste/Milk_aiCampaignCore.xs"; // The Core Campaign AI data and features //------------------------------------------------------------------- // for anything defined in SetCampaignDefaults, if needed, override it here void OverrideCampaignDefaults() { btStrengthATK = 4.0; // 0.0 - 4.0, weak attack strength to hardcore attack strength btStrengthDEF = 4.0; // 0.0 - 4.0, weak defense strength to hardcore defense strength btStrengthECO = 4.0; // 0.0 - 4.0, weak economy strength to economy attack strength btRushBoom = -1.0; // -1.0 = max rush, 1.0 = max boom bAllowBAM = true; // when true, this AI will always use the better attack manager bAllowScaling = false; // when true, this AI will scale group sizes and econ handicaps based on player 1 bAllowMarketDefense = true; btRevealDelay = 0.0; btAttackDelay = 0.0; btDefendDelay = 0.0; btGuardADelay = 0.0; //btBiasINF = 0.6; //btBiasARC = 0.5; //btBiasCAV = 0.5; //btBiasNAV = 0.5; //btBiasSIE = 0.5; //btBiasSPC = 0.4; //cvPlayerToAttack = 1; btBaselineHandicap = 1.0; btMilitaryInAge1 = false; cvOkToRepair = true; // debug stuff bEnablePatrolEcho = false; bEnableEconEcho = false; //bDebugMessages = false; btAge2VilReqPercent = 70; btAge3VilReqPercent = 80; btAge4VilReqPercent = 90; btRevealEnemyBases = true; cvOKToResearchEcon = true; cvOKToResearchMilitary = true; gMakeBarracksAge1 = false; //Will the ai make barracks in age 1? } //------------------------------------------------------------------- // for anything calculated in CalculateCampaignSettings, if needed, override it here void OverrideCampaignSettings() { btAttackGroups = 3; btTargetAge1ArmyCount = 0; btTargetAge2ArmyCount = 5; btTargetAge3ArmyCount = 8; btTargetAge4ArmyCount = 12; // in case we use BAM, define a percent of each attack interval during which attacks can take place float attackPeriodPercent = 0.01; // set additional BAM params gBAMAttackPeriodPercent = 0.4; gBAMAttackInterval = 1;//( 190 - (btStrengthATK * 15) + (btRushBoom * 60) ); gBAMGroupInterval = 1;//(gBAMAttackInterval * attackPeriodPercent) / btAttackGroups; gBAMAttackGroups = btAttackGroups; //gBAMAttackRoutePattern = cAttackPlanAttackRoutePatternMRU; gBAMTargetAge1GroupSize = btTargetAge1ArmyCount; gBAMTargetAge2GroupSize = btTargetAge2ArmyCount; gBAMTargetAge3GroupSize = btTargetAge3ArmyCount; gBAMTargetAge4GroupSize = btTargetAge4ArmyCount; gBAMGroupSizeRampUp = btAttackGroups * 3; gBAMEngageRadius = 460; gBAMInitialAttackDelay = 1; //gBAMAttackMode = cAttackPlanBaseAttackModeStrongest; gBAMMaxAttackGroups = 30; gMarketNearMainBaseMin = 180.0; //gMarketNearTowerMax = 50.0; gBAMAttackGroupSize = 1; cvMinTowerAge = cAge3; } //------------------------------------------------------------------- void preInit(void) { aiEcho("preInit() Starting..."); // force defaults for all internal settings SetCampaignDefaults(); // Override Defaults // do this before any formula based settings are calculated // This allows each parent script to set the intended default overrides before anything is calculated OverrideCampaignDefaults(); // derive any settings from the defaults CalculateCampaignSettings(); // Override Campaign Settings // in some cases, it is valuable blow out even the calculated settings OverrideCampaignSettings(); // print everything out EchoCampaignSettings(); } //------------------------------------------------------------------- void postInit(void) { aiEcho("postInit() Starting..."); }