I can help you partially on the AI. I have made my own variant of the Draugur AI and have gotten it to train new units and upgrade new techs, and of course, made its management of economy better. First, I could give some major pointers.
Currently, I know how to make them gather less/more wood, am a bit amateur in some fields, but overall I think I could get an AI working with this mod that attempts to counter your units.
It is possible, if units have build limits, to make the AI build them separately.
Also, there is something called a 'SimpleBuildPlan' which uses one 'gEconUnit', or villager, which makes one villager build a building.
Thus, for SimpleBuildPlans, you get one villager building something. It should be possible to make a SecondaryBuildPlan, with 2 Econ Units.
I have found out how to make the AI build walls effectively and upgrade them. The radius for their main base is 55.0 ingame meters, which can be increased, but if it is, then RMS have to be programmed to position players further away from each other; if not, you may have problems building walls. I put the Wall radius 59.0, and wheras 60.0 and 61.0 work, they often hit other computer player walls in the process.
Note that a bigger base radius will help the AI tremendously on maps where they are positioned close to the edge of the map.
It should be possible to make them build more walls in team games, less in 1v1s, and to make different lengths of walls. It is possible to make certain civilizations use more walls than others.
Currently, I have found out how to make them build 3 walls on their own, from the Industrial Age onwards. Radii are 59.0, 89.0, and 120.0 meters. In your case, I either assume that is the Third Age or the Fourth Age. Nevertheless, if it is still 'SetAge=4' thing, or Imperial Age,
<Effects>
<Effect type ='SetAge'>Age4</Effect></Effects>
</Tech>
then, the AI will read the Ages like that. Also, it enables 'TechMonitors' for certain 'Ages', like Stagecoach for Fortress Age (since this tech can be researched at any trading post by the AI, they try and research it at every trading post, and since it is a UniqueProtoInstance, it only affects that trade route/native post. Nevertheless, it only appears at the trade route posts for Human players. In this light, its best to have the AI attempt to upgrade it later in the game).
To begin with, I either recommend to start as a base from the Draugur AI, or build of my variant, which has several major improvements. I must warn you, however, that whatever is added, especially from the homecity, takes a lot of testing to accomplish to make the AI put it in its deck. Overall you will aim for about 13 special cards to be included, or else the comp will just spam unit shipments.
It is also possible to make them favour unit, crate, wagon shipments, and the like, or to disfavour them. Partially, it is also possible to make them randomize strategy, though I would rather see them in more uniform to their civilization, or always supportive of their allies.
The AI does not know how to use stealth. To make this work with Nazgul, make Nazgul auto-stealth after a while, and make a scout monitor with them or something. The AI might not be able to handle the unit properly, unless they are primarily a fighting unit. Currently, the AI uses 'attack-move', meaning they attack your units when they see them. The Draugur AI makes more intelligent attacks, and actually flanks your armies. The reason the standard game AI sucks so bad is that it doesn't have any specific tech monitors and is not given any instruction on strategy. Age of Emprires III lacks the .per and .ply files that handled micro in Age of Empires I and II (Ages I especially):
http://aoe.heavengames.com/siege/AIandPER/plyfiles.shtml
"The aoe.ply file is found in your Age of Empires/data or /data2 folder. It is a small file, around 5KB, and here is what it does: The aoe.ply file is basically an extension of the Per file; it helps the AI use sophisticated strategy during it's attack. The main difference between the Ply file and the Per file is that the Ply file is more complex and controls only the attack, and only one Ply file is used for the entire game, while many different Per files can be used. It seems the AI randomly selects an attack format from the Ply file, depending on it's current situation."
There is another AI which deserves mention, and that is Nuggetfungs AI, and also another, Kangcliff's Napoleonic Era AI, and both are well-rounded. Nuggetfung's strengths are in his AI's supportiveness and aggressiveness, I've heard good reports of Kangcliff's AI, mostly from the NE crowd, and also my AI is more all-rounded, meant for Supremacy, Deathmatch, and partially, a lategame build. My AI does not play well on treaty, though in a normal supremacy game, works towards a lategame build. It does not use resource cheats.
I do not know how to make the AI register new treasures, as to get those. Simply, the Drauger AI just gathers treasures over time. It may do so with yours as well if you make new ones.
When you tell them to build a Town Center with a 'Hero' unit, or Explorer, they will send a villager, because they think it is a 'SimpleBuildPlan'. Thus, there has to be a certain amount of 'AI techs', which enable their villagers to build town centers, and thus, your problem is fixed. However, another option which works well without draining their resources is to let them ship a Covered Wagon.
If you have also noticed, it sometimes takes them a long time to build towers, or outposts from outpost wagons. There is a WagonMonitor which new wagon units need to be put to in order for them to build those wagons. In some cases, you also need to put it at other places in the AI for them to build it. Also, building new, specific buildings, unless they use the old units/buildings names in the proto/techtree files, have to be given a certain unittype that is to build them.
The AI only likes to research 12-13 techs from a building. After that it considers those remaining techs secondary. If you tell them to upgrade more, they may wait until their base is no longer under attack to start researching more.
When they are under 120 population and under 2000 of each resource, they like to simply 'trickle' units, thus build 1 Uhlan at a a time or 1 Musketeer from a barracks at a time, or in your case, 1 Elven archer and/or 1 Musketeer. To get them to fix this is currently beyond my skill. I only know theoretical ways to fix this, and one known way is the 'SimpleMaintainPlan', which makes them maintain 1 at a time. Another better option is to make every civilization get the 'BlockTrain', or 5-10 units at a time. Then the computer just builds them like Blocks.
However, the computer does relatively badly with banner armies. Just as it sometimes trains two groups of 5 Muskets from a barracks and 2 groups of 5 skirmishers afterwards, it attempts to build 20 banner armies, because each of those banner armies are counted as "1" unit, or "1 musketeer", thus they will never make use of 10 War Academies because they will use two to spawn 12 Banner armies. This, of course, is only if they have the resources. If they have less resources, often they use a more mixed unit que.
The AI training otherwise is actually not coded. It is a random integer which plays into what unit preferences you make them do. Currently, the Game AI favours Halberdiers, because they do the most damage for their cost and population count, and bases also its unit concentration on what Biases it has. For instance, InfantryBias, CavalryBias, ArtilleryBias. Each civilization has the capability of training their specific units, with the proper concentrations of what you want them to build. Generally, they do better with mixed-ranged forces, with Cavalry support, and/or heavy melee infantry (such as Doppelsoldners, and in your case, Elite Mordor HC units or Uruk-hai of Isenguard).
The Draugur tends to also favour Lancers, especially the Draugur, if possible. In my mod, I played down the Lancer bias, and favoured more moderate cavalry, and also made them favour more skirmishers.
If you have used any of the original Age0Techs like Age0Dutch for the mod, and just replaced the contents, then the AI will need to be coded "CivDutch" for Mordor, or if you have not done this, then there is a bit of work to do concerning the new civs and the AI. This also may be a bit gray or me if I do this coding, for I will be going into newer, foreign realms of coding.
AI note: if the tech you want them to research doesn't exist, (or you remove the tech from the tech tree), or if there is one typo in the AImain.xs, it will fail to load.
As for this, I do hope this information helps a lot.
In the cases stated above, however, I deem it good to simply give as much information about the AI, so that others can also help on it if necessary. When you are finalizing your mod, that is the time when AI coding can really begin. Before, I wouldn't recommend it because you may be switching techs back and forth, etc.
As a disclaimer, if I help code this AI, note that I am working partially on my own modifications, so sometimes may be tied down with those, and often enough with real life.
But this is possibly the most original modification I have ever seen for Ages III. Keep up the great work.
best of regards,
murdilator[This message has been edited by murdilator (edited 08-01-2013 @ 03:48 PM).]