home *** CD-ROM | disk | FTP | other *** search
- include "aomMKcv.xs"; // The control variable definitions
- include "aomMKai.xs"; // The whole AI complex
- include "aomMKcvFuncs.xs"; // Control Variable set functions.
-
- void setParameters(void) // This function is called from main() before init() is run.
- {
- aiEcho("Set Parameters:");
-
- cvOkToResign = false; // Prohibit resignation
- cvDoAutoSaves = false;
- // if (aiGetWorldDifficulty() < cDifficultyHard)
- cvMaxAge = cAge3; // Limit the CP to age 3 on Easy, Med.
- cvOkToChat = false;
- cvOkToAttack = false; // In setParameters(), it's OK to set these directly instead of using the setOkToAttack(false) function.
- aiEcho(" Setting cvOkToAttack to false.");
-
- }
-
-
- void setOverrides(void) // This function is called from main() after init() is run. Use it to
- // override any initial settings done in the main scripts.
- {
- aiEcho("Set Overrides:");
- aiEcho(" Setting Personality to Default.");
- aiSetPersonality("default"); // Turn off rush/boominess
- // gGathererTypeID = cUnitTypeDwarf;
- // gWaterMap = true; // Set this true if the AI needs to consider using transports on this non-random map.
- // aiSetAllowBuildings(false); // Prevents building construction?
- int killMe = aiPlanGetIDByIndex( cPlanHerd, -1, true, 0 );
- aiEcho("Killing herdable plan "+killMe);
- aiPlanDestroy(killMe);
- if(aiGetWorldDifficulty() == cDifficultyEasy)
- gHardEconomyPopCap = 20;
- if(aiGetWorldDifficulty() == cDifficultyModerate)
- gHardEconomyPopCap = 20;
-
-
- }
-
-
- void attackFunc(int on = 1)
- {
- aiEcho(" attackFunc running, parameter "+on);
- if (on == 1)
- {
- setOkToAttack(true);
- }
- else
- {
- setOkToAttack(false);
- }
- }
-
-
- void ageUpFunc(int unused = 0)
- {
- aiEcho(" ageUpFunc running.");
- setMaxAge(cAge4);
- }
-
-
- rule ageUpAlert // Let this CP know that it starts in age 2 (cAge2)
- active
- {
- if (xsGetTime() < 20000)
- return;
-
- age2Handler();
- xsDisableSelf();
- }