@ecloctocrat: I'll try and work something out for the TIGFolk to have a go at testing.
@Sean A.: As a matter of fact when I was brainstorming for this at the start of development I was banding around the idea of having a four or five man party of characters. Decided against it in the end as it didn't sit right with the turn based nature of the game. If someone is dragging their feet the rest have to wait for them.Unacceptable behaviour
I decided it was time to rework the enemy AI to make the enemies tactics a little less predictable. I ripped out the old code and rewrote it from scratch, and it's turned out great. The enemy's behaviour is formulated based upon three elements, the creature's intelligence, the creature's combat prowess, and the current situation.
There are four levels of creature intelligence, none/animal, dumb/bloodlust, normal, and smart. None/animal
is for animals, like giant rats, or creature with no intelligence at all, like zombies and golems. Creatures with this intelligence will usual charge when attacked or threatened. Dumb/bloodlust
is for unintelligent monsters, like Trolls, or bloodthirsty creatures, like barbarians. Dumb isn't much of a step up from none, but dumb monsters will alert comrades and formulate tactics with them, like cutting of the players retreat. Normal
is the most common intellect level which most enemies will have. Normal has a far greater range of tactics, and can even decide to pickup objects from fallen comrades if it will improve their situation. Other tactics are hanging back and using ranged weapons, or retreating to gather more help. Smart
is reserved for the most intelligent characters you'll encounter, mainly bosses and their kind. It isn't much different to normal, but those small variances make all the difference. Smart monsters are more interested in self preservation than the others and will order comrades to wear down the player before endangering themselves.
The creature's combat prowess is based upon its skill when compared to the player. Enemies weaker than the player are more likely to hesitate, hang back or even retreat. Whereas monsters stronger than the player will be braver and more likely to engage the player quickly, even if that means the player will get the first strike.
The final aspect, situation, is based solely on the situation the player and enemies find themselves in at that moment in time. For example a cornered enemy isn't going to hang back when faced with a player armed with a bow, he'd just be pelted with arrows. He's more likely to charge the player.
Using these three factors the enemy have a rich arsenal of behaviours that throw up some interesting combats. Here's a few examples from my testing, two goblins with normal intelligence aided by two giant rats with animal intellect. One goblin sports a bow so he hung back and laid down covering fire, the other equipped with a longsword hung back just long enough to let the two giant rats take the first few hits before joining the fray.
Another example, I opened a door to reveal a goblin rager, with bloodlust, who immediately charged at me. I wasn't too worried as I easily outmatched him, but unbeknownst to me he had alerted an unarmed hobgoblin, normal intellect, who wasn't in my view. The fight with the rager only lasted a couple of turns but in that time the hobgoblin had managed to alert more enemies to my presence. Before I realised what had happened there where now about ten enemies bearing down on me and my situation needless to say had become hopeless.
Wow! That turned into a wall of text. As you can probably gather I'm quite pleased with how the enemy AI worked out. In other news I've also been working on the visual cues for the various actions characters can perform. Attack animations have been in for a while, but other things like, item pick ups, drinking potions, etc. had no visual cue to show they had happened. They're not all in yet but I've got most of it done. I've been trying to avoid using particle effects for any of it, but some of my visual effects aren't up to standard so I my have to relent and have a bespoke few particle effects. Next I might have a go at sound, although I haven't even considered what I'm going to do for music yet.