The Internal Lives of Mobs

Zubon’s post reminded me that I’d meant to write this up a few weeks back: Why are mobs so blind and stupid?

I’m not talking about combat AI here, specifically. There are good reasons to keep combat AI fairly simple and stupid, namely that it just costs too much, both in terms of programming and QA resources and in terms of processing power, to make really good AI most of the time. That said, for non-trash mobs, better and more unpredictable AI would probably be a good idea.

No, instead, I’m talking about why are mobs so willing to watch their friends get beaten up well within sight distance, without lifting a finger to help? Especially if they can see a trail of corpses behind, leading directly toward them? It’s one of those things that just yanks players right out of the game, and yet it’s also a staple of the MMO. Sure, in most games, like WoW, an enemy will run away and grab more friends when he’s near death, but in some, like CoH, a running enemy is just an irritation: as long as the player characters don’t follow, he’ll come back eventually, ready to be beaten unconscious. As a bonus, the player characters will have healed and regained endurance in the meantime. But that doesn’t really address the main problem, which is, “Why are enemies standing within a couple dozen feet of a fight and not helping out? Or running away? Or doing anything at all?”

Part of it is, of course, because that that’s the way it’s always been. Text MUDs, especially DikuMUDs, generally had the concept of “rooms.” Even if you were in a forest, you were still in a room called “A Clearing” or “Along a Path.” Mobs in one room generally had no knowledge of mobs in another room, except in the case of a few specially programmed mobs that reacted to the actions of others; you can still see that kind of special programming in WoW with “Howler” wolves and “Screecher” raptors that call for help and alert other nearby mobs of the same base type. And, of course, sometimes mobs would run to the next room and bring back help. Sound familiar?

So, how to address this? The most obvious answer would be to simply increase aggro radii on enemies, but this by itself will simply screw up other systems in the game, namely the combat and reward systems that depend on the player being able to only take on a few enemies at time safely. In addition, you still keep one of the other problems: enemies are uniformly suicidal or at least tactically very, very stupid. “Sure, the other 200 orcs couldn’t stop them, but they won’t stand before my might!”

Given that, let’s strip a few systems down. First, address the combat system. Either make it so the norm is that PCs, who we can assume are heroic, can handle hordes of enemies at a time, or make it so that preventing discovery by additional enemies is either trivial or skill-based and in the hands of the players. Which of these we go with depends on the genre, and possibly the character type; in a superhero game, making it so that a solo player can handle 10 or 15 enemies without breaking a sweat seems appropriate enough, while in a spy game, making it so that players can stealthily kill an enemy quickly should probably be the norm. And, of course, we can also blur the lines, so that a Batman type can kill enemies quickly and quietly, or the gun bunny in a spy game is an unstoppable death machine. Regardless, one of the things that will probably need to change is that grinding enemies simply doesn’t matter in reward terms anymore, or at least matters very little compared to quest completion. We’re already seeing a shift in that direction in MMOs of the last few years; if I remember correctly, DDO went this route entirely, so that the only experience that is awarded is for quest completion. Despite DDO’s failings in other areas, I think that’s a fantastic step in the right direction; if Batman stealths his way through the enemy fortress and recovers the MacGuffin, while Superman crashes in and cracks heads to do the same, there’s no real reason to give them different levels of awards.

That’s combat and rewards addressed, at least partially. Of course, those systems will feed into the thing that we used to call the “aggro” system, which we can probably call the “discovery” system for now, for reasons discussed below. We’ll need to figure out what our parameters are for discovery, that is how, when, and how easily mobs notice the PCs. We can assume that sight and sound are a given. Perhaps some mobs will have only one of those, such as a subterranean monster, and perhaps we’ll get fancy with other senses as well, like scent or psychic. However, for now, let’s assume that a given mob has sight and sound, and that sound is a 360° sense with a relatively limited distance of 60 feet, while sight is a 120° arc in front of the character with a distance of 200 feet. Loud noises can be sensed at a further distance, bright lights or lots of motion (like a fight) can be seen further away, walls block line of sight and dampen ability to hear sounds, etc. When mobs discover a player character through their senses, they react. Perhaps some will also react to other things, such as a body, etc.

The “reaction” system is the second proposed improvement to how things stand now. Currently, mobs will either attack a player character on sight or simply ignore them, depending on whether they’re hostile or neutral. Occasionally, a neutral enemy will jump in if they’re “social” and see a similar neutral creature being attacked; the guards in the goblin towns in WoW are a good example of this. Sometimes, an enemy will run when they’re losing a fight. Sometimes they’ll stand and fight, and it’s usually easily predictable how they’ll react.

However, that very often makes no sense whatsoever. As mentioned above, why would Bob the Orc ever want to tangle with the group of heroes that have run roughshod over everything else in his cave? Sure, occasionally, he’ll want to avenge his friend Dave the Orc, but that should be the rare case. It’s not so much that the behaviors are entirely wrong, it’s just that they usually have no context. “Fight,” “Run,” and “Get Help” are all well and good, but why does every “Runner” wolf in WoW run at the same hit point level, and regardless of how many other wolves are attacking? For that matter, why is there even a “Runner” category?

Let’s take an orc under this system. There is an 80% chance that he’s a Brawler (“Fight” as his default behavior), a 15% chance he’s a Scout (“Get Help”) and a 5% chance that he’s a Coward (“Run”). However, just because they have a default behavior, they can do other things, based on context. If he’s the lone guard of an outpost entrance and sees a group of heroes coming, even if he’s a brawler he’s going to Get Help. However, if a Brawler and a Scout are teamed together, the Brawler will stay and fight while the Scout will Get Help. Similarly, while a mob may be a Coward, if he’s walking a patrol with 3 Brawlers and comes across a lone hero, particularly one that’s been injured, he’ll join in with the fight as well… at least until the Brawlers start dropping or until he gets somewhat injured himself. Also, if that same patrol of three Brawlers and the Coward comes across a group of four heroes, or a lone uninjured hero surrounded by corpses, he’s likely to revert to “Run” or at the least “Get Help.” To be fair, City of Heroes implements some of this now, and does it pretty well. However, it has no real “Get Help,” just “Run,” and enemies will always start by attacking rather than running. Even if a level fifty hero jumps into a group of level five mobs and defeats one, they will all pull their pistols out and fire at least once, then maybe run.
And of course, there are more than just these. “Guard This Area,” “Guard This Mob,” and other default behaviors can exist. Modifiers like, “The PC is exalted with one of my factions and unfriendly with another” could come into mob reactions, too. Also, it would help if there was a way to encode “I just saw a group of heroes slaughter a dozen gate guards without breaking a sweat and I am running in terror from PCs X, Y, and Z,” so that other mobs react intelligently to a mob that is executing “Run” or “Get Help.”

Eventually, people are going to start getting bored with new flavors of Diku, and the industry should be ready to move away from those roots. Along with removing the artificial Tank/DPS/Heal trinity and moving to primarily character-driven instead of primarily loot-driven character systems, improvements to mob aggro systems go a long way toward making MMOs feel more like adventures than solving a problem once and repeating the solution over and over again.

6 thoughts on “The Internal Lives of Mobs”

  1. I agree with a lot of the things you said in the second half of this post, those behavioral tweaks would be a nice change to the completely predictable and very limited behavioral responses mobs currently have in MMORPGs.

    The whole ‘why doesn’t that other mob 10 feet away attack me with his buddy’ thing has game balance, gameplay, and technical causes. The easy one is technical — you have to make sure people using low end machines don’t suffer severe gameplay handicaps as a result. If mobs were more social, players with low end machines and close clipping planes/short view distances, might only see a single mob and not the 12 just beyond him. A player would a good computer would see them all and avoid them, the player with a bad computer would pull the only mob they could see and get brutally slaughtered. The person with the bad computer would have no way to avoid this, as getting close enough to see the mobs behind the target mob would aggro the mob, along with the rest, getting them killed either way.

    The gameplay aspect is simple – there has to be a large enough mob density to support adventuring by large numbers of players, but not be impossible to deal with if there are a small number of players. If designers spread mobs out far enough that there’s no immersion breaking “hey, frank just got stabbed by that elf but my butt itches so I’ll just stay here” it would be very hard to find mobs to fight unless there was only a single player or group in an area.

    Game balance is the worst one though. If you intend players be able to handle mass numbers of adds by themselves then any encounter in which players don’t have to deal with mass numbers of mobs will be completely trivial. If two people separately enter an area and dispatch the swarms of mobs at a steady pace they will break up the groups to the point that respawns will be trivial fights for as long as they stay there. You also have to account that if a single person can handle swarms of mobs, groups can handle armies and all group content has to be designed accordingly, which in turn leads back to technical issues due to the number of polygons and AI/scripts required.

    A lot of the solutions you offer are perfectly valid for single player games, but I don’t see how they would work for an MMO. It doesn’t matter how stealthy you are when you kill a mob if there’s another mob 10 feet away, and if the only way to make it work is to not have a mob 10 feet away, you’re back to the original problem of mob density vs. player density.

    It’s quite a conundrum for online games, and hopefully one some designer will find an elegant solution to. Right now, more varied AI is something they could (and should) be doing, but the whole annoying ‘aggro radius’ thing is unlikely to go away soon.

    A game could be designed from the ground up with systems to allow more realistic mob reactions to player actions, but it would likely require a lot of instancing in order to make it more like a single player game.

    Wow, that was long.

  2. Yeah, I figured there would be a lot more need for instancing for this to work, or at least more discrete “zones.” A zone, in this case, though, could mean something a little different. In City of Heroes, missions are instances that are entered into by going in building doors. What if, instead, they were treated as small zones? If there’s no one in the building, and hasn’t been for 15 minutes, despawn the mobs and possibly remove the zone to conserve server resources. There’s nothing to prevent people from going into a building to investigate, and of course sometimes they’ll be given missions that take them to specific buildings. This also does tow other things; first, you can reduce street crime somewhat, and therefore outdoor mobs. Second, it makes street crime more interesting; if one of the mobs runs and enters a building that turns out to be a gang hideout and brings a bunch of friends back, then that makes for an interesting dynamic.

    As far as the mob density thing, it’s definitely something that can be addressed. There’s a few separate things that could be done to help. First, design less content around “kill ten rats” style of play, as mentioned above, and move more toward slightly more goal based quests, or possibly create multiple ways to do quests. “Why am I killing ten rats? To stop the infestation in the cellar. Oh, I’ll just get an alchemist to make some rat poison / get some mortar and rocks for the wall / move the food / introduce cats instead.” Second, for things where they need to be KTR style quests, shift the AI values. Why do raptors automatically attack me in the Wetlands? Animals, even predatory animals usually avoid humans, or at least treat them warily. Lastly, for things like invading orc towns, etc., well, I dunno. I’d have to think about it a bit more, but I’m pretty sure there are solutions. Again, they could probably be quest related; perhaps an orc disguise that’s given when on a certain quest, or that can be found/made. I’m remembering the scene in 13th Warrior where they’re sneaking into the cave, and one of them approaches them in a primitive “uniform” that lets him get close enough to the guards to let him kill them silently.

    As to the technical issues, well, those’re a bit more of a poser. I don’t know that there is a good solution for them, honestly, but there’s got to be a certain threshold for what you let players get away with in terms of their gaming machines. It’s not good to create too much of a barrier to entry for players, but at the same time, if creating one would attract players we wouldn’t get otherwise, i.e., because we couldn’t have new and interesting systems, it might be a worthwhile tradeoff.

    Lastly, I think there are ways to make it so that both groups of mobs and solo mobs are dangerous. One way is to make it so that mobs impede their own and each others’ movement through space. City of Heroes does this, but almost no one past the first dozen or so levels takes advantage of it, because groups of PCs that spawn enough mobs for it to be helpful can usually take out the enemies without resorting to it. However, if a PC backs into a corner, only three or four mobs can reach him at a time. If we expand further and make enemies unwilling to shoot through their friends, that means that while the players may be facing a dozen or two dozen enemies, they’re only doing it three or four at a time, which might be manageable for them. Another, less satisfying but possibly a lot easier way, is to apply the Inverse Ninja law: a ninja’s deadliness is inversely related to the number of ninja’s on his side in the fight. In other words, one orc is dangerous. Two orcs are maybe like 1.75, three are individually like 2.5 individual orcs, etc. Those are just numbers thrown out there, but I think you understand. When you get to 5 or more orcs per party member, adding more doesn’t really change the amount of damage they do, it just makes it take longer to kill the group, at least until the number of orcs drops below 5; this can be abstracted as the orcs getting in each others’ way, and also help to explain why PC parties can’t be larger than 5. This doesn’t help so much with the techincal/scripting aspects, of course.

  3. “If you intend players be able to handle mass numbers of adds by themselves then any encounter in which players don’t have to deal with mass numbers of mobs will be completely trivial.”

    Not necessarily; Single-mob encounters would likely be bosses or elites, not just one very weak mob.

    Also, it is always assumed that the MMO in question has standard MMO combat (a little health bar that depletes faster or slower than your enemies). If the combat could be completely restructured for this kind of AI, Enemies with INTELLIGENCE would be harder to beat, not just MORE HP.

  4. ..and when we get Mob behaviour that isn’t the sort of cliched ‘WWII German Guard’ reaction, many players have problems coping.

    Example: The troll behaviour in the Zul’Mashar temple in Eastern Plaguelands (WoW).
    Unlike pretty much *every other mob in the game*, the moment you hit a mob in there, it runs for help.

    I can’t count the number of players I’ve seen in there who stand, dumbfounded, as the offended troll sprints off and returns with every troll it can find. And then kills the player.

    While I think many players would love Mob behaviour to be ‘smarter'( or at least more realistic), just as many players would HATE it. :)

  5. An incredible discussion and the type that I’ve spent most of the time today, during which I’m supposed to be working, looking for.

    There’s alot to say about this kind of subject, but by my reckoning most of it comes back to the size of a game world… this is the number one reason for the lack of realism in games like WoW. Encounters in a regular village of orcs for instance could be realistically manageable if that village were of a realistic size. What I mean is… let’s say you need an item from the village blacksmith. Realistically, the smithy is going to be a good distance from the village proper… so in this case you could program all of
    the orcs reactions to be realistic (i.e. some are cowardly, some are noble, some are cunning, etc.) and those reactions would be something the group would have to realistically be prepared to deal with. Considering these factors, this could be a fairly high level occurence as failure to stop runners would result in a swift wipe when the militia trots in from a few hundred yards. Additionally, if you consider the variable number of orcs that might be in or around the smithy at the moment as well as the “level” of those visitors or passers by, the need for some preparation and surveillance becomes apparent.

    I have no doubt that the programming involved in such realism is daunting, but with the state of the art being what it is, to say that this is too much effort to expect… that’s just putting a seal of approval on well executed mediocrity.

    Alas… I digress… sort of…

    Anyway, while I’d love to sit here and spew all of my varied ideas about how I think an MMO should be… the size, interest and relevance of my audience lead me to believe I should quit while I’m ahead.

    Maybe there’s a better place this kind of idea bouncing/spitballing/conceptualizing… I sure would like to find it.

    Any ideas?

Comments are closed.