I believe I’ve stated this off-hand in the past: Love♥Rank uses a maximum of 12 enemy characters and 8 player characters at a time in battle. Similarly, the enemy count is never to be more than 1.5x the player count, rounded up. Yet I have not explained why, nor how these enemies would work, merely that they exist. Well, no longer.
One thing that stands out about Love♥Rank‘s combat system is that it doesn’t use a standard turn-based system, but rather has the characters move around on a map. A great many RPGs that don’t use such a system are able to get away with entirely random moves, or a set pattern of moves that cycle. Similarly, even games that do use this sort of system may just have the enemies attack the nearest player character, unfairly ganging up on one character until they die.
In other games, where the AI may not follow a set pattern, it’s still often very predictable. For example, many games in the Tales series either use the nearest player character or are set to dogpile on whichever character is in the player 1 slot. This is done because player 1 is usually the only player (although you’re free to change yourself to any other player slot when playing solo anyway, most don’t bother). This just gets aggravating over the course of a long game. Not to mention how some games with permadeath, like Fire Emblem, have had entries where the AI doesn’t try to win, their goal is to KO any one ally character to force a soft reset from the player.
And let’s not forget if you make the AI too smart, and it abuses game mechanics to effectively run away whenever the player has nearly killed them. Or the AI could act too quickly to heal status ailments at all times, rendering them even more useless than they usually are for anything other than a distraction to buy time.
So my plan is to use the enemy AI to convey personality, randomly generating a set of priorities on an individual basis when the enemy spawns in. (Bosses would be set, of course.)
Let’s take a generic early-game RPG enemy for example, like a slime. Given that example, let’s set the example stage early in the game, with 3 player characters, and accordingly 5 enemy slimes. To attack, the slime needs to get in close to its target, so it needs to (usually) have a set target until the target goes down, or it would spend more time moving between the player’s likely spread-out characters than dealing damage. But which character does it go for?
At the start of the fight, the slimes would randomly choose attack preferences, with options like:
- The character farthest from the center of the group. (Because they’re less likely to get support from the other characters.)
- Go after the healer first.
- Nearest character. (Hey, what ain’t broke… so long as this isn’t very common.)
- Constantly switch targets to whoever has the lowest HP left.
- Constantly switch targets to whoever has the highest HP left.
Those last two example options sound odd, but strategically, not everyone in a team needs to be dealing heavy damage. Someone needs to deal the finishing blow, after all. Also, if you weaken the high HP characters and the player leaves it alone, they may not be able to heal in time when the heavy, focused attacks do happen. In truth, it would only make sense for enemies who move quickly around the map, though.
Still, it should not be difficult to imagine a scenario where the 5 enemy slimes in my example scenario choose those 5 options randomly, and how it would affect the party of 3. Even though it’s the same enemy, their approaches to combat all differ.
And then more complex strategies start to form as the enemy count increases and multiple different types of enemies show up in the same fight. Ranged enemies would be able to have more complex targeting rules. The best part is that most player won’t bother looking too far into it, because having so many enemies at once would make it too difficult and inefficient to gauge each individual enemy’s pattern unless it’s a boss fight.
Ultimately, what the AI needs to do is provide a fair level of difficulty while maintaining player immersion. It’s no good if the AI is all-knowing, but being dumb as bricks isn’t any good either. This means that AI you can mind-read (except where you can predict it for plot reasons) is AI done right. That is what I plan to do with Love♥Rank‘s enemy AI.
The exact specifics still need ironing out, but that should be the gist.