AI updates for MMORPG Tycoon 2 monsters

Monster AI rewriteI’ve been poking with the game’s monster AI today, amongst other things.

In all the recent milestone builds, a certain pattern would commonly play out in combat:  the player would run toward the monster, but the monster would typically stay at its spawn point, just shooting fireballs until the player got close.

This happens because of an awkward interaction between the player AI and the monster AI:

When a player decides to attack a monster, they first decide what their best attack is, and then advance to get into range for that attack, using longer-range attacks while approaching.  Monsters aren’t nearly as smart;  if they have an attack which can hit the player, they’ll use it.  If not, they’ll advance until they have an attack that can reach the player.

As a result, while players are running forward toward the monster and trying to bring their best attack into play, the monsters will typically stand completely still, firing their longest-ranged attack over and over again.

From a tactical standpoint, that might not actually be a bad idea, but in this game we don’t want smart monsters.  We want monsters that behave the way they appear to behave in most MMORPGs.  And that means that once monsters aggro on a player, they should move toward that player.

So I’ve tweaked their AI.  Now, instead of only considering attacks which are in range, they pick a random attack from their whole set.  If the attack they’ve selected isn’t in range, then the monster tries to move to get it in range.

As a result, any monster which possesses a melee attack will now run toward players when combat begins.  If they defeat the player, they’ll then run back to their spawn area.  All of this makes combat move around much more like real MMORPG combat.  With is a very good thing!

Also new (partially visible in this image), players now have visible weapons.  These weapons aren’t really linked up to anything yet, but I feel like they really help the visuals in combat.