


This script makes the AI now build forts around its capital city and after it has 6 cities, it begins building forts around its major cities as well.  Major cities are defined as the cities in the top 30% in terms of population size.

Once the AI has determined to build a fort (a random number generator), is chooses a rondom direction (N, S, E, W) to build the fort.  It uses the GetTilePoints search in the "NewSearch.slc" file to evaluate the tiles.  When it gets a tile it checks if it is a hill or a mountain and prioritizes them to build the fort.  Also, it values mountains over hills when building forts.  If there is already a fort in that direction (since it's randomly chosen), it does not build another fort.

The "NewSearch.slc" file must be included either in your script.slc file, or you can open the Stacks.slc file and remove the // in front of the include statement.  You must have one, but you can't have both.

Regarding the GetTilePoints search function, it searches the tiles that are pointed to by the corners of the city's map square, which is rotated to a diamond in CTP2.  For example, if the search is to the North, GetTilePoints will search those spaces with an "o" not those with an "x".  "C" is the city's location.


         o   o    o
 x    o    o    o   o   x
   x     o   o    o   x
     x     o   o    x
        x    o    x
          x  C  x




