home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 8 (DVD) / XENIADVD08.iso / Fragzone / Files / AOM_MiniCampaign.exe / AI / aomMKloader.xs < prev    next >
Encoding:
Text File  |  2003-01-14  |  2.2 KB  |  83 lines

  1. include "aomMKcv.xs";      // The control variable definitions
  2. include "aomMKai.xs";      // The whole AI complex
  3. include "aomMKcvFuncs.xs";      // Control Variable set functions.
  4.  
  5. void setParameters(void)   // This function is called from main() before init() is run.
  6. {
  7.    aiEcho("Set Parameters:");
  8.  
  9.    //aiEcho("    Turning chats off.");
  10.    //cvOkToChat = false;
  11.  
  12. //   cvOkToResign = false;   // Prohibit resignation
  13.    cvDoAutoSaves = false;
  14. //   cvMaxAge = cAge2;    // Limit the CP to age 2, will be dynamically reset by the rule cvMaxAgeTester, below.
  15.  
  16. //   cvOkToAttack = false;   // In setParameters(), it's OK to set these directly instead of using the setOkToAttack(false) function.
  17. //   aiEcho("    Setting cvOkToAttack to false.");
  18. }
  19.  
  20.  
  21. void setOverrides(void)    // This function is called from main() after init() is run.  Use it to 
  22.                            // override any initial settings done in the main scripts.
  23. {
  24.    aiEcho("Set Overrides:");
  25.    aiEcho("    Setting Personality to Default.");
  26.    aiSetPersonality("default");     // Turn off rush/boominess
  27.    // gGathererTypeID = cUnitTypeDwarf;
  28.    // gWaterMap = true;    // Set this true if the AI needs to consider using transports on this non-random map.
  29.    // aiSetAllowBuildings(false);   // Prevents building construction?
  30. }
  31.  
  32.  
  33. /*
  34. rule cvOkToAttackTester
  35. inactive
  36. minInterval 5
  37. {
  38.    // Starting at 10 minutes, turn cvOkToAttack on and off at 5 minute intervals.
  39.  
  40.    static int   nextChangeMins = 10;
  41.    
  42.    int   timeMins = -1;
  43.  
  44.    timeMins = xsGetTime()/60000;
  45.  
  46.    if (timeMins < nextChangeMins)
  47.       return;
  48.  
  49.    aiEcho("Changing value of cvOkToAttack");
  50.    nextChangeMins = nextChangeMins + 5;
  51.    if (cvOkToAttack == true)
  52.       setOkToAttack(false);
  53.    else
  54.       setOkToAttack(true);
  55. }
  56. */
  57.  
  58. /*
  59. rule cvMaxAgeTester
  60. inactive
  61. minInterval 7
  62. {
  63.    if (( xsGetTime()/60000) < 20)      // At 20 minutes, allow age 3.
  64.       return;
  65.  
  66.    aiEcho("Setting age limit to third age.");
  67.    setMaxAge(cAge3);
  68.    xsDisableSelf();
  69. }
  70.  
  71.  
  72. rule cvOkToResignTester
  73. active
  74. minInterval 26
  75. {
  76.    if ( (xsGetTime()/60000) < 30 )
  77.       return;
  78.  
  79.    aiEcho("Allowing resignation");
  80.    setOkToResign(true);
  81.    xsDisableSelf();
  82. }
  83. */