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:");
-
- //aiEcho(" Turning chats off.");
- //cvOkToChat = false;
-
- // cvOkToResign = false; // Prohibit resignation
- cvDoAutoSaves = false;
- // cvMaxAge = cAge2; // Limit the CP to age 2, will be dynamically reset by the rule cvMaxAgeTester, below.
-
- // 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?
- }
-
-
- /*
- rule cvOkToAttackTester
- inactive
- minInterval 5
- {
- // Starting at 10 minutes, turn cvOkToAttack on and off at 5 minute intervals.
-
- static int nextChangeMins = 10;
-
- int timeMins = -1;
-
- timeMins = xsGetTime()/60000;
-
- if (timeMins < nextChangeMins)
- return;
-
- aiEcho("Changing value of cvOkToAttack");
- nextChangeMins = nextChangeMins + 5;
- if (cvOkToAttack == true)
- setOkToAttack(false);
- else
- setOkToAttack(true);
- }
- */
-
- /*
- rule cvMaxAgeTester
- inactive
- minInterval 7
- {
- if (( xsGetTime()/60000) < 20) // At 20 minutes, allow age 3.
- return;
-
- aiEcho("Setting age limit to third age.");
- setMaxAge(cAge3);
- xsDisableSelf();
- }
-
-
- rule cvOkToResignTester
- active
- minInterval 26
- {
- if ( (xsGetTime()/60000) < 30 )
- return;
-
- aiEcho("Allowing resignation");
- setOkToResign(true);
- xsDisableSelf();
- }
- */