Traits of the Artificial Intellignce


Over several months of designing WarCraft missions, my co-workers and I have come to a general consensus regarding the game. It reads: "Artificial intelligence is absolutely brain dead." Truthfully, A.I. is dumb, rock dumb even. Very often, you will find various units acting in such an absurd and futile fashion that you don't know why you even bother. You are about to find out how you can keep yourself from going insane under these pressures, and how to bend the game further to your will.

The actual heart of editing in WarCraft II follows. This section will cover the numerous quirks and oddities that you will have to contend with every time you attempt to create a new mission. More specifically, these are the growth patterns and preferences of a computer-controlled player. You can use this data to make educated decisions about the placement of items in an edited mission. So, grab your thinking caps, get ready to take some notes, and be sure to refer to this section frequently to evaluate your progress. The information here will help you solve some of the most devastating problems that a WarCraft II editor faces.

Stupidity of Peasants/Peons

The lure of WarCraft lies within a mix of building and destroying that is different for every player. For the moment, it is the building that we will take special note of. Creating your own city from scratch and fortifying your battlefield positions relies on the assistance from a group of units called the peasants, or for the Orcs, the peons. These handy little fellows will construct or perform repairs on any building, mine the gold that sustains your forces, harvest the lumber that accomodates your expansion efforts, and most frequently, run around like complete idiots doing everything expect for the one simple task that you would like them to do.

Throughout this section, I will refer to peasants and peons collectively as peons. In truth, both units act and react in exactly the same fashion.

The peon is often the most commonly built unit in any mission. Because it requires a peon to do any of the basic tasks that support a city or an army, the computer wants to have as many of them as it can possibly build. A strong computer player with 25 to 30 peons or more running amok is a common sight among properly designed missions.

To close this subject for the time being, I will simply advise you to spend some time watching the computer build up from scratch. Observe how the computer reacts to various obstacles and use the information wisely!

When a mission begins, the computer will begin building at the nearest point possible to the gold mine. It will progress from stage to stage, structure by structure, moving through the list of mandatory buildings according to the play style that you've indicated in the PLAYER PROPERTIES.

"OK," you say. "If this is true, then how come on the sea-attack mission that I've just spent fifty hours on, the computer would not build any ships!" A common problem that is as confusing as it is frustrating, is that you might not have given the computer a good location to build in! If you should ever suspect that the computer is being hindered by its position on the map, load the mission, and type ON SCREEN. Now, sit back and observe the growth pattern of the guilty color group. Once the computer reaches the point where it prematurely stops growing, take note of the structures on the screen and ask yourself the following question: Did the computer fail to construct one of the main structures in the priority building list?

If so, then the problem may be a lack of good building space. The natural tendency for computer-controlled color groups is to create city areas that are almost geometric in design. (This occurrence is especially pronounced in air-attack mode) If the color group starts in an enclosed area or a place where the open land is frequently broken up by patches of rocks or trees, it will confuse the A.I. and the build-up will be incorrect.

Expanding the building area or removing scattered obstacles will usually rectify the problem. If altering the look of the map is unacceptable to your intentions on a particular mission, then you must be sure to start the problematic color group with whatever buildings that it becomes "stuck" on.

Another way to check for location problems is to watch the movements of the peons themselves. In the presence of a gold mine, peons will continuously mine gold, stopping to chop wood now and then, if more wood should be needed. However, sometimes a peon will step out of the gold line and begin to wander around the map with seemingly aimless intent. The computer always has an intent, sometimes it just cannot follow through. The peons are going to expand as fast as possible, they just need your help to do it!

The Sticking Point

If you were to start a new level from scratch that pits one human player against seven computer-controlled opponents, two or three of them would easily become stuck. By stuck, I mean physically stuck in place and unable to move. Getting around this incredibly common problem is relatively simple if you keep a few thoughts in mind as you edit.

The placement of gold mines and lumber mills is the usual culprit. When a peon exits a gold mine or a lumber mill, it will reappear on the game screen in the same place every time, if at all possible. If there are less than three "spaces" on all sides, free from rocks or buildings, peons hauling resources to and from these objects will become jammed. Jamming occurs when peons carrying gold or lumber collide with peons trying to retrieve gold or lumber. When they collide, they will attempt to move around each other. If you have 20 peons working close together and frequently colliding, this eliminates the possibility of maneuvering around an obstacle, and the two flows of peons becomes jammed against each other.

For the amount of damage a jam-prone area can cause, preventing or repairing it is quite simple. If possible, never surround a gold mine, lumber mill, or main hall with rocks or densely packed buildings. Try to leave a sizable clearing around each of these structures on your first missions. Better yet, place them against the edge of the map, or a forest area that can be cut back if necessary. Once a jam occurs, the only way to make the peons move again, is to attack them. Because of this, a jammed opponent is as good as dead.

Other Tidbits and Fun Stuff

There are a few more things about peons that you should know. First, if a computer-controlled player's building is damaged, that group's peons will immediately stop all gold and lumber gathering operations to repair the damaged unit. Because this prevents the computer from building up its resources or its city, it severely hinders the difficulty level of a mission.

Another bit of information is that because of the peon's all-purpose nature, the computer will break its neck to ensure that it keeps a steady supply of peons in the game. Even once all of the gold and lumber has been cleared from the game, for every peon you kill, another one will be trained to replace it. Therefore, if you give the computer a long trail to the gold mine or to a supply of lumber, the peons will eventually be picked off, forcing a rebuild of peon forces. Remember that peons won't retaliate against anything other than another peon, so they can't defend themselves. They will be slaughtered if you make them venture out into the world alone!

Necessity of Gold

As I mentioned earlier in this manual, the computer loves gold. Like a person using a defend and horde play style, it will easily pick clean three massive gold mines, whether it needs the gold or not. The similarities between human and computer players end right there, however.

The computer, as a player, is not half as efficient as a good human player should be. Keep in mind the building lists that the computer follows in its battles. It will attempt to move down that list as fast as possible, sparing little money on troops or upgrades until the city is well on its way. Any interference at this time will not really draw a counterattack, and if you should destroy one of the essential units to the upgrade plan, it will be rebuilt immediately.

I invite you to load up BOOK##.PUD. Watch the enemies to your left as you destroy one or two of their buildings. They will rebuild anything that you destroy and then continue right on their way. Even if you hit the computer late in a mission, when some units may no longer be of use, it will reconstruct every major building that you tear down. The point of all this is that if you start the players too close to one another, you risk letting the player destroy the computer opponent before the game even begins! Another point is that the computer is inherently wasteful of gold, so you should almost always make its gold mine larger than the human player's mine.

"All right," you might counter, "I will just modify the starting conditions to start the computer with 50,000 gold right at the start!" This tactic does not work. A computer-controlled color group will only use starting gold and lumber to create the very basic buildings and peons. For footmen, ax throwers, ballistas, knights, and the rest of the troops, the computer must mine its own gold. If you know that the computer is going to need knights or ogres in a hurry, don't start it with gold, start it with more peons to mine the gold!

One of the biggest hassles with the computer's necessity for gold occurs well into a mission, usually bringing a premature end to an otherwise good mission. Once the computer runs out of gold in its mine, its army of peons will usually march right out of its protected city area and seek out a new gold mine. Unfortunately, the gold mine they tend to go after is the one that the human player controls. At this point, peons start getting cleaved left and right. The mission may continue to hold excitement for a bit longer, but once the computer's resources run dry it is game over. The computer will draw its forces back into its city area for protection, and will then just sit and wait for someone to smash or seize them. A key to creating good, lengthy missions is to provide the computer with just enough gold so that it runs out just after most people have already broken through the outer defenses of the city. If you can keep the peons alive, the opponent will still be in the game.

Upgrade and Improvement Oddities

Continuing on the subject of building and upgrading, consideration needs to be given to the many oddities that lurk within the WarCraft II game routines. They range from curiosities to full-blown mission busters. This area will also cover some ideas on pre-constructing entire cities for computer-controlled players. This could quite possibly be the most important section of the manual with regard to actual editing, so read carefully, and when you're done, read it again. Too much information is never enough!

Starting Locations

It seems fitting to start with some notes about the starting location. In the WarCraft II editor, for every color group that is represented in a mission, you must place a starting location on the map. Despite the seeming triviality of this idea, you can actually foul up a good mission by the misplacement of the starting position.

The starting position, as seen by the A.I. of the game, seems to hold some powerful influence on the computer's building behaviors. At times, the computer may disregard the location of the starting point, building right where you placed the peasants or peons. Other times, the computer may actually move units over toward the indicated starting position to begin building or attacking there. If you start a computer opponent with a pre-built city and a large force of units, placing its starting position within the building area of the intended player can sometimes cause a major assault right from the start, greatly spicing up a defend mission.

In general, trying to manipulate the A.I. via starting location is not a safe option. Its workings are not quite clear and, many times, is absolutely random. It does not always guarantee that a color group will respond to your strategic placement of the start position behind enemy lines. A more frequent result is that the computer's building activities will behave poorly, weakening your mission. As a general rule, you should place the start location within the building area for the computer player's main city. This keeps the mission honest in the beginning and, trust me, you'll have plenty of other problems to deal with later.

Structure Proximity and the Building Area

This is a point that many people find out first-hand after dozens of failed editing attempts, and that even more people never figure out at all. Load up a mission and watch how the computer builds. (Again, air-attack missions seem to be the most representative, because of the quick city building and upgrading.) You may notice that the computer's concept of city construction involves a rapid build-up within a definite and tight area. This is what I am referring to when I mention the need for "a good sized building area."

In pre-designing a city, you are removing the computer's location preference by placing the structures yourself and then expecting the A.I. to figure it out. Unfortunately, as in most aspects of the game, the A.I. is not going to cooperate willingly with this idea. The best example of this would be the lumber mill, the second non-farm structure that the computer will build when starting from scratch. Next time you are in the editor, design a small city for a computer-controlled colorm group, keeping the buildings relatively close together, like the computer would do. However, place the lumber mill some distance away from the main city, perhaps near a forest area, at a distance of an eighth of the map away from the city (on a large map).

So what happened? If the A.I. was functioning as it should 99% of the time, then the computer began to gather gold and lumber, but then one peon broke out of the line to construct a lumber mill within the city area. This is due to the computer's need to maintain close proximity to all major structures! You should already know that the computer needs a stable to build knights. Try placing a stable on the opposite side of the map from the color group's starting position, and you can guarantee that the computer will not produce a single knight until it can build another stable closer to the heart of things. The thing to remember is that you need to keep careful control over the "size" of the city that you build for the computer, while keeping enough room inside of the city as to prevent the jamming of peons.

The Ultimate Upgrade Oddity

One of the biggest and most frustrating oddities in the WarCraft II A.I. is a strange and inexplicable refusal to accept certain types of assistance that you can edit into a mission. When the computer is provided with any structure that is not within the priority building list for its attack setting, it will not use this structure! If you give a sea-attack color group a mage Tower, you will not see mages running around the screen causing mayhem and destruction. Likewise, you can start 400 shipyards along the coastline of a computer set to land-attack, and not a single juggernaut will appear in the waters. Therefore, you must generally stick to the letter of the building plans.

On the other hand, this causes serious dilemmas in the world of color groups set to air-attack. Have you ever tried to give the computer a griffin aviary or dragon roost to go with its town or great hall? The problem is that when designing a mission to include an air-attack color group, editors usually want to give that group some extra help in achieving the ability to pump out griffins or dragons. Of course, due to the Ultimate Upgrade Oddity, the computer will have none of it. Unless the computer builds its own castle or fortress, and controls each and every structure needed to build those units, it will not use an advanced structure that you just start it with!

So, the answer appears to be simply to give the computer a castle or fortress, along with every lesser building, and the griffins or dragons will start flying, right?

Wrong.

For some unknown reason, the computer (especially on air-attack) will not make proper use of a castle or a fortress if it is given it to start with. Most of the time, the color group of interest will simply begin to build a new hall near the castle you tried to provide it to begin with! It will probably upgrade this hall to a castle quickly, even faster if you provided a blacksmith, stables, and so forth, but the simple fact is that this takes additional time out of the game. Time that the computer is supposed to be using to crank out aerial units in order to defend itself.

As a general rule for giving the computer advanced structures to start a mission, you should provide all of the desired structures, but leave the computer with either a town hall/great hall, or no hall at all. This will take care of the computer's strange desire to "build the basics itself." The advanced structures that you do provide, should allow a faster buildup of forces. Also, remember to leave enough open space for the computer to put up a few more farms as the game progresses!

DISCLAIMER: O.K., I suppose that once in every 500 mission attempts, you will stumble upon a setting where the computer actually uses every advanced structure you give it, refrains from building a second hall nearby, and begins to crank out advanced units from the start of the game. Whenever this happens, savor the rarity of the moment, because in all of my editing, I have seen a total of one mission where this acutally happened. The point is that one shouldn't build missions expecting this.

Plugging up the Works - Gold Mines, Town Halls, and Farms

Because the initial portion of any mission is usually spent building, it seems to be a suitable starting point. As I have now mentioned more than once, the computer is going to make every effort to follow its basic building outline to the letter. Following this plan is going to require large stockpiles of resources and a heavy inflow of gold and lumber. Therefore, the computer is also going to make every effort to maximize its capacity to mine gold. Lumber, while a necessary item, does not hold the same importance to the internal A.I.

The computer will situate itself so that a minimal amount of time is involved in gathering wealth. If you decide to start an enemy color group with a hall, make sure that it is as close to the gold as it can possibly be! If you fail to do so, the computer will simply build another, greatly increasing the risk of a peasant or peon jam.

Another basic structure deserves close attention because of its threat to the peasant flow: the farm. How can the farm be so dangerous? A glance at the priority building lists will show that the computer is farm-happy, when in doubt, it builds farms. The dilemma is that because the focus of the computer is to mine gold, it will not send a peasant or peon far away from the "supply" route of gold or lumber to construct these additional farms. The result is that farms begin to pop up along the resource gathering lines. Given time and expansion, the farms become nasty obstacles, and the computer winds up jamming itself up against them.

You can easily avoid this by providing the computer with a stock of farms right from the start. The fact of the matter is that most people playing WarCraft II have played so many missions that spending half an hour mining lumber and building an early stock of farms puts them to sleep like nothing else. You will be amazed at how your missions will jump right into the military build-up if you start everyone with a few farms. This is extremely important for a computer-controlled color group that you start in an enclosed area. It allows you to tuck the farms in an unobtrusive area to prevent a jam, and lets the computer focus only on building.

Finally, if you are going to start the players with some farms , be sure to give them enough to do the job! If you give the computer three farms and 50 peons, the computer is still going to dot the landscape with randomly placed farms. Also, if you are intending a minor color group to be wiped out quickly as part of a warm-up for a siege, do not give that computer player 400 farms that the player has to destroy one-by-one. If you try to bring some realism into your WarCraft missions, it will clearly show up in improved game play and entertainment levels.

Computer's Need for Defense

In any WarCraft II mission, regardless of how you structure it, a computer-controlled color group has certain defensive needs. These needs must be satisfied before any offense will take place. In fact, even the building and progression of the main city area will halt if the group is unable to provide itself with adequate defenses.

What kind of defense are we talking about? Quickly return to the priority building lists back in the attacking section and take note of all of the military units that the computer will attempt to build. Each of these units is used specifically as a defensive stockpile of men, to be sent out only under unusual circumstances. The training of units is the one thing on those lists that may vary slightly, so be prepared for anything.

In general, the defensive needs of the computer vary based on the attack program that you choose to place it on (sea, air, or land attack). In a sea attack, the computer will begin with a defense of just three footmen or grunts. It is because of this incredibly weak military build-up that you should always consider isolating your sea-attack computer players, or at least provide them with some starting military for protection. Later in the mission, the computer will have knights or ogres and ballistas or catapults, but you will quickly find that at that point, the defensive efforts are going to involve the destroyers, battleships, and submarines that sit motionless off of the coast.

NOTE: Stationary ships can block the flow of oil just as the peasants and peons can be blocked from gathering gold and lumber. On any sea-attack mission, be sure to playtest in order to ensure that the computer does not cripple its own oil hauling.

The defense of a color group set to air-attack is only slightly better than the defense used by a sea-attack setting. On an air-attack mission, the computer reaches the Castle or Fortress level faster than in any other strategy setting. This is because all aerial assaults are performed by a single military unit, which requires an advanced city area. Defense is swept aside at first, the computer builds just two footmen or grunts and three archers or ax throwers for protection. This is a reason to edit additional forces into the starting areas of an air-attack player, much like you would for a sea-attack player.

Because the air-attack units (griffins and dragons) are relatively useless in a defensive setting, the computer player set to air-attack will construct its trio of griffin aviaries or dragon roosts, and then begin to slap together towers everywhere that it can find a clear patch of land. This outward expansion of towers will continue as long as the gold and lumber continue to flow into the city, so the more resources that you provide, the better defense the computer will have in the end.

In the land-attack setting, the use of units for defense is directly tied to the way that the computer will attack, so we will return to the land-attack properties in a later discussion on the computer's internal attack routines.

What eventually arises out of this necessity for defense is yet another way for the computer to cut itself off from its resources by jamming up the flow of peons. A scarcely noticed trait about the A.I. and its routines on defensive placement, is that every time a computer-controlled color group begins to train its defensive units, it will place these units around the upper-left corner of the main hall. If you are skeptical about this, load up a few missions and watch them build. The build-up always occurs at the upper-left corner! Of course, problems then arise whenever the gold mine is situated to the northwest on the map. The troops get in the way of the flow of peasants and peons!

There is no way to keep the computer from doing this, so you must learn to work around this quirk in the A.I. Place the gold mine beneath the hall, or to the right of it. You can even position the hall with trees tucked up against the two guilty sides, so that the computer cannot put men there. These tactics will usually provoke the computer into stockpiling its forces around the barracks instead of the hall, but occasionally, it will stop the buildup of forces entirely. Again, like most items in WarCraft II, only playtesting will show how the computer will react. The information contained here should get you headed in the right direction.

Computer Attack Routines

Rules for Bombing Crews

Despite all of the different attack methods that the game engine will employ to destroy a human opponent, nothing that you do, say, or alter will make a computer-controlled player use a bombing crew (demolition team or sappers). This has several implications for how you should construct your missions.

Because the computer will not use a bombing crew, that removes an entire possibility from the types of missions that you can make. You cannot place an enemy color group behind a layer of rocks and expect them to have any chance for offense. For the group to show any land-based offense in a mission, it must be able to escape from its original starting positions and expand, one way or another.

When I say that the computer never builds or utilizes a bombing crew, I am not just referring to the demolish option. The computer will flat out refuse to make use of this unit type. It will not attack, defend, scout, or even sacrifice the unit in the face of impossible odds. A computer-controlled bombing unit will run away if damaged. The tactical uses of this trait are non-existent.

A final rule to follow for this situation corresponds to a fundamental piece of information that should be pounded into your memory by now. If an item is unnecessary for game play or plot development, don't put it in! As you will discover soon enough, there is limited room in editing a mission, so do not take up 20 slots with bombing units that will not be used!

Sight vs. Priority Attacking

Sometimes after laboring and testing for hours, you still end up with a mission that is slightly less entertaining than watching your monitor burn out. Why is it that, on occasion, the computer-controlled players simply refuse to make any kind of offensive effort? In some of the previous sections, we have looked into the building and upgrading aspects of WarCraft malfunctions. Now we are going to move into some technicalities that cause nasty errors and malfunctions just by the placement and orientation of the military units themselves.

First, we will look at the easier of the two concepts to manipulate, sight attacking. In a basic mission, the game is very realistic in that the computer will not prepare for attack unless it is able to see an enemy, namely your playing audience. It should be noted that once one color group is alerted to your presence, it sets the entire game in motion. But in situations with only one or just a few computer enemies, the sightings may never occur until the mission is too far unbalanced in the player's favor. Just how the computer "sees" you and readies for battle is varied, and allows for some latitude in designing your missions.

Of course, the most basic method for the computer to spot enemies is to actually walk right into them. Setting a computer-controlled color group close to the player is one method to bring about a faster start to the war, assuming that the player moves one of his or her units into the computer's area.

All does not have to do with the actual contact of one group with another. You may have noticed during game play, that the computer's units will sometimes begin wandering about the map, moving forward to some random spot, and then returning the main city area, extending farther with each trip. What the computer is doing is scouting out its territory. If the human player is unlucky enough to order a platoon of units through one of these scouted areas, the computer will now know about the enemy and its general location. Unfortunately for an editor, it is nearly impossible to keep track of which parts of the map that the computer has scouted. You can view your scouted territory and you can use a cheat code to view the map, but you cannot see exactly where the computer has been. Because of this, you must take a variation of this to make use of it.

The next time you fire up the WarCraft II editor, I invite you to try the following: Start a new map, using the 94 x 94 grid setting. Pick any landscape you'd prefer, it doesn't matter. For yourself, construct an entire city, placing lumber mills, barracks and farms loosely in a particular area around a gold mine. Then, select a color group for the computer to use. Begin placing mages all around, scattering them about the map. Be sure to place some of these mages just on the outskirts of your city area. Then, place a mage tower somewhere, approximately half way across the map area from your city.

Now, save the work, load WarCraft II, and start up the test mission. You will probably want to use the ON SCREEN code to properly view progress. Do not make any attempt to fight or build, merely sit back and watch what goes on. A majority of the mages on the map will begin to run toward the position of the mage tower, seeking to protect the only unit that they can affiliate with. However, the mages around your city will usually run into your territory and take pot-shots at your structures (usually a farm) with their fireball spell.

NOTE: If you are interested in trying this, be sure to use mages and the mage tower, as the death knights do not have the fireball spell and, therefore, do not react the same!

The lesson is not over yet, however. Continue watching the mages and their activities. If you give them enough time to build up another hundred points of mana, you should see the same mages that started near your units start making their way back toward your city to take some more shots at it.

This method of instigating a sight attack is very useful with mages (against missions that start with buildings), or with death knights (against missions that start with a lot of troops), but a footman or an ogre will not react in the same fashion, and would probably just get itself killed. This brings up some of the more strategic ways of heating up the action.

Some of the land attack sighting ideas were easy enough to come by. Just figure that if you can't get your players to go to the enemy, then you'll just bring the enemy to them! This tactic involves the actual placing of an enemy unit within the human player's city area. You should usually place it in an area where it can "see" some important structures, primarily the hall and the gold mine, if nearby. Peasants and peons for some reason seem to work best. Perhaps this has something to do with the fact that they have heightened sensitivity and an attraction to the presence gold mines. However, with peasants or peons, they usually try to build a hall right where you start them. To prevent this, place all enemy units near cannon towers, military units, or even surround them by trees, where a ballista or catapult could take them out. You should try to kill the unit quickly, letting players hear the sounds of a quick kill, but keeping them from knowing the deception you've laid out.

Another way of getting the computer in a land attack mission to increase its aggression is to place griffins, dragons, or even the flying demon units over the main "walkways" of your mission. When the unsuspecting player wanders beneath the above-average visual range of the enemy flying creatures, the excitement will start.

As far as a sea oriented mission is concerned, the best way to improve the computer's attacking patterns is to include submarines in that color group's starting military. Not just one or two either, you should give an ample amount, perhaps seven or eight. Place them along coastal areas where the human player might decide to build. Then you can call in the playtesters and watch the computer's underwater units annihilate any attempts by the player at shipyard or oil platform construction. Once a sea-attack opponent knows where the focus of its aggression is staking its claim, the battles tend to escalate quickly.

Air-attack missions, by game design, are already equipped to scout out and strike the enemy as soon as possible. Because of the simple and rather aggressive attack routine built in, I will take this time to remind you that an air assault will only take place if you provide the proper environment for growth. The computer needs lots of space and even more gold. Securing that, the game should do the rest.

Of course, there is one air-based unit that is always ready to spy on the enemy and knock the balance of power around like a ping-pong ball. This is the airship, or more specifically, the gnomish flying machine and the goblin zeppelin. Take any normal land-based mission, throw in an airship, and watch the immediate difference. Unless you were lucky enough for the computer to already create perfect lines of attack on the player, you should notice a definite improvement in the mission. The computer will progress along it's priority building list more rapidly, upgrades will occur more frequently, and the computer will begin to send well-armed platoons of units down toward the player with greater frequency. The use of an airship will also help to alert you to problems with the gold or lumber levels. If the computer burns through its resources too quickly, perhaps you should start it with a bit more next time through.

A word of warning should be given about airships, though. Note that the computer will begin to scout with the airship from the very beginning of the game, thus readying for assault before the main hall is even complete. In a mission that pits one human player against three or four computer opponents with airship support, the player is usually going to take the cleave, get frustrated, and stop playing your mission. Remember that high difficulty can make for a tight situation and a nice challenge, or it can produce insanity in your audience. Playtest many times when dealing with many color groups, so that you can personally evaluate the mission and make any necessary changes.

The concept of the priority attack is not covered by the original manuals and is not a concrete thing that can be easily controlled. In fact, you often have no control whatsoever, so you should try to understand it, anticipate it, and learn how to deal with it when you find it.

In short, the priority attack is a means by which the computer can locate the position of your city and your forces without prior scouting efforts. How does this function work in a mission? Within the attack routines that are built into the game, every structure and military unit is assigned a specific priority level. You may have noticed that when you attack with a large group of units, an enemy unit will begin to strike at one of your own, but then turn its attention to a more highly-valued target? This is due to the increased priority of the new unit. Before each swing of its weapon, a unit will evaluate its situation, select the nearest enemy unit with the highest priority, and begin to attack it. This is why certain units, such as mages, death knights, griffins, and dragons tend to perish so quickly in a cluttered battlefield. Although you may send fifty units at the computer, the computer is gunning for your best forces only. Even though you will usually beat the computer in a given battle, you frequently wind up with a force of battered footmen and grunts, all of your advanced units slaughtered.

So what new uses do priority attacks bring to the editing table? If you create a mission where you want to quickly put pressure on the player, nothing works better than giving him or her a pack of mages or death knights in the beginning. Of course, they may be able to fend off these attacks with waves of fireballs or death coil, but it certainly brings the excitement in early. Also, despite the fact that priority is supposed to dictate the computer's attacking patterns, it can also be used to repulse the computer's attacks. For example, in a rescue oriented mission where the survival of the player's troops is paramount, providing lots of ogres and death knights can bring about a strange reaction by the computer opponent. Instead of attacking this mass of priority targets, the computer-controlled units will actually run away! For some reason, the game actually calls for a retreat from a large concentration of priority. This is probably because of the damage potential that usually goes along with high priority levels. This can prove very useful for an in-game strategy component, if the player can just discover the extra power he or she has just through priority.

Active vs. Passive

As you should know by know, the terms ACTIVE and PASSIVE in WarCraft II refer to an A.I. setting for military units that can be directly altered through the editor. Modifying a unit's A.I. is done by right-clicking on top of that particular unit. You can change an entire group's A.I. by selecting multiple units and then right-clicking on just one. They will all obtain the new A.I. setting that you choose. If you have not already spent some time dealing with this function, don't get too excited yet, this is not as easy to toy with as it first seems. It does, however, open a number of new opportunities for creative editing.

First, let's discuss the "passive" setting. When you initially place any military unit on the game map, it appears as a passive unit. A passive unit, once the game begins, will stand firm in its position under normal circumstances. These units will make no attempt to scout, raid, assist in defense operations (if outside of the main city), or form assault parties.

Almost every action that a passive unit does take must be forced upon it. This means that they will usually only react once an enemy unit enters their visual range. If this should happen, the unit will advance to make an attack. It should be noted, though, that if the enemy unit draws away from confrontation, the passive unit will, after a quick chase, return back to its exact starting position on the map.

Passive units have their primary use as defenders. When placed within the main city, or even around a single tower, they tend to react to any attacks on the structure as if they were being hit. This trait allows the editor to build in a strong defense, because troops waiting behind an important structure will come out to defend it, attack until the battle is over, and then return to their previous positions until the next strike.

The other major defensive use of passive units is to scatter them about the map, along trails, paths, clearings, or anywhere else. The same logic above applies here. Let us assume that in a particular mission, there is only one pathway between the human player and the computer-controlled player. If you start the computer with a mass of units in that pathway, the mass will hold its ground, repelling assaults until it is destroyed. Starting the computer with some sort of forward defense like this will provide more time for the cities and upgrades to be completed.

NOTE: If you decide to give a computer player quite a few defensive military units, be sure to provide them with an adequate number of farms, or else it will spend the entire first half of your mission building farms just to support an army that is supposed to eventually die!

On the other side of the coin is the "active" A.I. setting. This setting poses certain problems that only hours of dedicated playtesting will fully resolve. An active unit will not remain in whatever position you put it in, but will embark on whatever mission the computer finds most appropriate. It also should be noted that all military units that a computer-controlled color group produces during the course of a mission enter the game as active units.

Obviously, the problems that this "uncontrollable" factor can cause are many. If you read the section regarding the computer's ever-present need for defense, then you know that the computer will not build or upgrade correctly until this need is met. The majority of problems come when all of the active units that you have strategically placed around the map all begin to run back toward the city area and flock around the main hall. What is happening is the need for defense springing into action. Usually the computer would use troops that it builds, but since it already has a supply of active units, they work just as well.

Most other mission killers come when a computer's platoon of active units meant for offense, instead decides to take a vacation. For example, if you place a group of active units near the human player's city, hoping to force an early mission battle, they may choose to run back to their own city as described above. Or they may run off to protect a gold mine that the computer will attempt to take later in the mission. Or worse yet, they may sit and do nothing as if they were passive units. In forcing attacks, unless you place the units right in the target's city area, the fight is probably not going to happen. So how can you use an active setting to fire up the computer-controlled color groups? In essence, by providing the active units that the computer wants for initial defense. That then allows the computer to use any units built during the mission for offensive purposes. This saves time and money for the computer by allowing it to go from building to attacking without worrying too much about the defending portion of the mission build-up that usually goes in between!

I recommend that you design a mission, place the units, immediately fire it up, type ON SCREEN, and see what happens. If the units move in the desired fashion, then you've gotten lucky for the time being, and you can move ahead. If the units imitate beheaded chickens, then play with the active/passive settings for each unit, or just change the location on map. The computer is funny in how it assigns priority to what it wants to accomplish, and you never can really tell what little variable might change an entire mission.

A final note on the A.I. settings: You should never provide the human player with large forces of units based on the above reasons. A unit being controlled by the player WILL take it upon itself to attack an enemy entering its visual range if not instructed otherwise. However, after that battle, the unit will not continue onward or fall back, it will merely stand there waiting for instructions or for another enemy to wander by. All of the player's units are assumed to be under direct and competent control, so you should think the same way. Giving a player additional units "just in case" often turns a mission into a cakewalk.

Internal Attack Routines

This section will give a brief and general overview of how the computer prefers to send its offensive assaults against the human player. This information is not set in stone, and the computer will act very differently once or twice to liven things up, but it will serve as an outline for predicting (and controlling and focusing) computer attack behavior.

Land Attacks

In the other two forms of attacking (sea and air), the computer prefers a quick build-up, followed by a near constant barrage of sea or air assault. The essence of the land attack, however, involves a build-up of upgraded land-based units assaulting the player in powerful waves. These waves are well balanced, calculated, and seem to be more focused on overwhelming the entire defense of the player, rather than causing specific structure damage.

What is truly interesting in these waves, is that each one directly corresponds to the upgrade patterns of that color group's main hall! In land attack settings (we'll use the orc perspective here), the computer starts the mission by stocking up a few grunts and ax throwers at its great hall for defense. Game play will continue, and the computer will build more structures. Once the great hall is upgraded to a stronghold, the units that were used for defense should move away from the hall and make an initial attack on the player.

The structure building within the main city will continue, except now the computer is also focusing on upgrading the ground troops. Again, a number of units will be created for defense. This will consist of the same number of grunts and ax throwers, but will now include a catapult and, once the ogre mound is completed, three or four ogres. Game progression will continue casually until the stronghold is upgraded to a fortress, at which time the defensive group will strike.

At this point, the computer will have maximized the upgrades to the grunts, ogres, and ax throwers. A number of these strengthened troops will be created, and again move to the fortress for defense. However, now any additional units that are created will wait near the barracks for a good-sized group to form, and then strike at the player as a mass. This continuous flow of attack groups will continue until the computer runs out of gold, or until the player wipes the computer out.

Of course, not every mission, regardless of how the city building and upgrades go, is going to follow this ideal attack pattern. If, for any reason, a color group believes that it must strike the player immediately, it will do so. When this happens, the computer will build a barracks and start sending every single created unit down to attack, one at a time. This errant method of attack merely alerts the player to the computer's location, which is usually destroyed shortly thereafter.

It is not quite clear what causes the computer to panic, but frequently it occurs if the player's units start the mission near the computer's units. If groups begin too close to one another, the computer will attempt to smash the enemy before the game progresses and any build-up can occur. Obviously then, if you start a color group near the actual player's position, be sure to give it some starting defense, or you might just be wasting your time. If, for some reason, the computer acts in this fashion, even if not near any enemies, just take it as one of the many complications of WarCraft editing, and keep trying!

Sea Attacks

The computer sea-attack preferences involve a much longer delay in the initial assault as compared to the land attack. This should prompt the editor to provide a sea attacker with additional defense to help it survive the earlier parts of the game. After that, the computer should be able to hold its own along the coast lines and waterways.

The computer will start by building all necessary basic structures (hall, lumber mill, barracks) at the normal pace of development. Unlike a land attack, however, the computer will only build three level one footmen or grunts for protection.

After this, the focus turns to gold and lumber gathering. Once a stockpile sufficient to support a naval fleet is built up, the computer will quickly obtain the three water-based city structures and begin its oceanic activities.

The computer starts this off by building an oil platform. If possible, the computer will take control of two or even three oil patches quickly in the mission. Oil tankers will start be produced as if they were peons (technically they are, but they are water based). WarCraft II A.I. treats an oil patch with the same defensive priority of a town hall or great hall, so any ships produced at first will make their way to the oil platforms, stationing themselves in a defensive role. Build up from destroyers to submersibles to battleships will continue from this point, along with upgrades to the armor and firepower of the naval units.

Once the upgrades are completed and the oil platforms are adequately defended, the computer will begin sending small groups of ships to strike at the enemy coastal areas. This usually begins with individual underwater units, followed by destroyers, and then the larger craft. Once the strikes begin, the computer will usually send a continuous string of ships in toward the enemy player's territory, trying to bring a constant flow of firepower to the front lines.

A major danger to any mission is that the person playing your game will merely find a clear patch of inland space, build a few ballistas or catapults, and then just bring them forward to kill the ships when they reach the coastline. An irritating part of the A.I. is that the computer sends ships up to the enemy coast, and then they just sit there waiting for something to happen. If there is an available target, the computer will attack. But if not, the ships just wait, allowing the player to form a strategy to kill the ships wholesale.

Hopefully, you can avoid the above situation, if the computer is able to put together an invading party in a timely fashion. You should note that on sea-attack, the computer will reach the level of keep or stronghold quickly, and then build the gnomish inventor and the stables, or the goblin alchemist and the ogre mound. That color group should then begin to train knights or ogres rapidly, stockpiling them in the main city area. It will also pump out a large number of ballistas or catapults, and these will be fully upgraded to level three. Once this point is reached, the strongest offensive in the mission should begin.

Using two or three transports, the computer will load up most, if not all, of these troops and carry them to the enemy territory. This is the only way to shut down a player who uses long-range attacks at the computer's ships. Unfortunately, the computer knows more ways to foul up an ocean-based invasion than you will ever dream of. The transports get stuck, jammed up, or lost easily, and the troops can get dropped off at a tactically stupid place on the map. Even worse, after the first few invasion groups, the computer usually starts to send down ballistas and catapults at the player, one at a time, offering easy kills and wasting money, lumber, and time. Just know that if there is one A.I. style that requires the most outside help from the editor of the mission, it is a sea-attack setting. Once again, playtesting is the key to everything.

Air Attacks

The internal air-attack routine is the simplest of them all, due to the fact that there is only one offensive air-based unit that a player can use! The computer will not waste the use of this unit, either. A.I. for the air-attack is very interesting, often seeming much more intelligent than both of the other types put together.

Provided that you have edited the map to the best of your ability (enough room, good gold supply, adequate defensive units, etc.), a computer-controlled color group will scream through the building phase, hitting the advancement level of castle or fortress so fast that most players should become jealous. The next item on the computer's wish list is not one, not two, but three griffin aviaries or dragon roosts.

By the time the griffins and dragons begin to take to the air, the computer should have about three flying machines or zeppelins running about the map, scouting like madmen, and pin-pointing the player's position. Once the basic battleground has been set, the computer will usually produce a single aerial unit and immediately attack with only that one. Understandably, any player who has built with even the slightest competence will quickly destroy this one unit.

This does not, however, give any indication of the way that an air-attack color group will progress throughout the mission. In fact, when set to air-attack, the computer prefers to launch its offensive strikes in an almost incrementally increasing fashion. The second strike wave may also consist of only one aerial unit. The third strike may increase to two units. Next time, it is usually three. A four-unit strike comes next. You can see the pattern developing. After every losing assault, the computer will build more aerial units. Instead of attacking, though, it will just fly them around the map, waiting until a larger strike force can be built. Then, all of the units converge on the player from all sides of the map.

The biggest hazard to the air attack is not the lack of ground defense, although three ground troops and two archers or ax throwers is nothing to write home about. The threat that you will have to keep a close eye on, is running out of gold! Once the computer has constructed the three griffin aviaries or dragon roosts, it will begin producing towers all around its city area. Also, aerial units are the most expensive units to put into play. All of this leads gold supplies to drain quickly, and once the gold is gone, so is that color group.

A solution to the gold supply problem, aside from making ridiculously massive gold mines, is to simply place another computer-controlled color group on the map with the air-attack setting. The A.I. does not differentiate between the air-attack tactics of one color group and another. Every group will play the same. This way, you can cause two fronts of air attacks to come in on the player, increasing the difficulty early in the mission to make up for when the gold supplies run out later on. If you prefer to keep some air-attack elements throughout the entire mission, all you can do is edit some aerial units into the map where they will remain until the human player enters the area.