Welcome Guest:

Other MMO Coverage

241 MMOGs and counting...

A Day in the Life: Age of Conan AI Designer

Posted April 27th, 2008 by Machail

A Day In The Life: AI Designer

By Joe "Adus" Hegarty, Artificial Intelligence Designer, Funcom

My name is Joe "Adus" Hegarty and I'm an AI designer for Level 1 - 40 Content in Age of Conan. Typically, a day at the office for me consists of creating and maintaining NPC AI, Item-Interaction, and some internal tools for AI Designers.

One of the important things we have tried to do with Age of Conan is create Non-Player Characters (NPCs) that actually have a life and unique behavior. We’ve done several things to make this realistic and it adds a tremendous amount of depth to the game.

City Life

The thing I have particularly enjoyed working on is the so called “City Life” aspect of the game.

One of the most interesting things I have personally worked on is the children in Old Tarantia. They run about playing during the day (as children do), but once nightfall is reached, their parents will come out the collect them. The obvious “just 10 more minutes”-type argument ensues before they finally admit defeat and actually go inside. They will then remain inside until the following morning. The system we use for this is based on the actual day/night cycles we have in nearly all areas of the game.

Elsewhere, we have NPCs conversing about world events, husbands and wives arguing over alcohol, preachers in front of crowds and guards talking about how quiet their day has been. Such conversations have no direct impact on the player, but they add an interesting aspect to the game and I have found it exciting running around the world listening to the conversations our very talented writing team have cooked up for us.

For example, a merchant might travel between two towns through treacherous territory protected by body guards. Alternately, a group of NPCs might launch a raid on an enemy camp—as early on in Tortage, when you’ll stumble on Picts raiding the very poachers trying to kill you! The possibilities here are endless and the entire team has tried very hard to cram in as much as we can!

Epic Events

Epic events are world events that happen regardless of what a player does.

You can be happily running around the world and get caught in an invasion between two rival NPC factions. One example of this is in Sanctum of the Burning Souls, when the player walks in on a full-scene battle between two rival NPC groups. The player can choose to help the “good guys” or just watch.

We’ve worked closely with our writers and quest designers to ensure these events are steeped in Hyborian lore and feel authentic.

Quest Events & Lore

In partnership with our Gameplay and Quest Designers, we have several events based on quests and lore from the game. These range from simple ambushes to full scale single-player instances entirely controlled by AI Scripts. You will meet Kalanthes, Zelata, Conan himself, and battle the minions of Thoth Amon. We have AI that runs when in dialogue with an NPC and numerous cutscenes to immerse the player in the world lore.

Personally, one of my favourite scripted events involves debating a point with an NPC Preacher in front of the crowd. As you select options, the crowd reacts to your choices. There are 3 possible outcomes to the quest based on what the played chooses to do.

We feel that these type of quests are new to the MMO scene and we hope that players will enjoy playing them as much as we have.

Needs

NPCs do not simply stand around waiting to be attacked. They might patrol an area normally, but grab food when they are hungry, hold a conversation when they feel the need to be social, or actively seek out enemies when they get ambitious. This is achieved with a needs system that NPCs must satisfy when living in the Hyborian world. 

In order to make this system realistic to an observing player, we attach priorities to each need the NPC has. Not all NPCs have the same needs, and how often they must be satisfied varies.

For instance, an NPC is more interested in defending itself than talking to another NPC. The system is also dynamic and can be interrupted at any point, so if an NPC is attacked when he is talking he will immediately defend himself.

To achieve this we use a combination of several technologies, these are: Event Priority Tables, Maslovian Pyramids, Scripts and Brains.

The System

Now it’s time for me to geek out about what I do and go into the gory details of how our system works

Our scripting system does not simply control NPC AI. It’s the system we use to glue the design and code together.

The highest level of configuration for an NPC is its brain—this is the most obvious and visible part of the AI system—which controls the NPC and its actions. The brain allows us to configure what action the NPC will perform in certain situations. The core of these are called the senses, which are modelled on our basic human senses. This include sight (NPCs have a line of sight, like players, which means it’s possible to hide from them and for them to spot you) and hearing, among others. The brain also “listens” for other things going on in the world, such as other NPCs calling for help, friends and allied NPCs being attacked within the line of sight, and even detecting players healing the NPC’s current target.

Underneath the brain is the Maslovian Pyramid, based on Maslow’s hierarchy of needs. You can read the long version here , but the short version is that our NPCs are motivated by basic needs, and only when those needs are met will they move up the “pyramid” to higher level functions. For example, an NPC being attacked will obviously not be concerned with going to get a drink, while an NPC that has been safe for a while may decide to go talk to a friend, go look for trouble, wander back to his hut and sit down, and so on. This pyramid glues together the different needs for a given NPC and sets up the Event Priority Tables to tell the NPC what its concerns should be. The Event Priority Tabels set up a response to a certain event. For example—simplifying greatly—if an NPC is attacked, it would trigger the “combat” script, telling the NPC to buff up, draw his or her weapon, and charge into battle. There are many scripts, like scripts that make NPCs fight, eat, patrol, and many other things.

In order to achieve all of this, we have a huge set of tools that allow us to configure all of these aspects.

The main tools of concern for AI and scripts:

Scry – The script editor, this is the tool we use to create behavior for NPCs and actions of items in the world.
The brain tool - Configures brains, Maslovian Pyramids and EPTs.
The Monster Tool - Configures senses and the brain attached to an NPC.
Genesis – This is our world and gameplay editing software. This is where NPCs are placed in the world and scripts for items are attached.

Scripts are also responsible for triggering numerous things in the world. They can listen for an event when a player interacts with a certain item or enters a certain area, open doors, burn the player if they touch fire, and even teleport the player from one place to another. Scripts can be attached to almost all Dynamic Elements of the game and are also responsible for the core of our Tutorial and cut-scene system. An often overlooked part of scripting is sound. Age of Conan offers full surround-sound and this is also configured from scripts – what sounds are emitted when, how loud they are, how they travel through the world etc.

In combination, this system gives us one of the most flexible AI systems of any MMORPG ever. We make use of these technologies to offer truly deep AI to Age of Conan.


Comments

Add your thoughts to the discussion! »

More Headlines »

Latest News

More Articles »

Latest Articles