Aller au contenu

Photo

NPC AI


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Malifaun

Malifaun
  • Members
  • 17 messages
What influences the ais choice of target ?

After a long break I dug out old nwn again and play the plague campaign with a dwarven fighter and Tomi as henchman. I also remember why I never liked Tomi much: he seems to be an aggro magnet. In any fight that isnt a pushover he is just a liablility, as everything attacks him till hes dead, mostly ignoring me.
I thought that the ai might pick low AC over high and made sure  Tomis AC is > my fighters, but it doesnt help.
I am using TonyKs hench ai, if that makes a difference.

There must be a reason why the npcs switch to my hench even if I go in first and initiate the melee. What is it ?

#2
Mystery X

Mystery X
  • Members
  • 133 messages
There is some discussion of this in the party members - out of control thread.

#3
Malifaun

Malifaun
  • Members
  • 17 messages
Thanks for the link, though the thread deals with hench behaviour rather than monster behaviour. Except for a comment by WebShaman in the end where he suggests that both low AC and low hit points might influence monster target choice. Well, that might explain what happens. It seems when the duo is fighter + Tomi, Tomi will be tanking unless you deliberately cripple your character.

For the Swords of Never fight, I told him to leave party before I enetered :/. When I could afford it, I bought the greater swordsmans belt and had him equip it, so now he is officially the tank.

#4
jmlzemaggo

jmlzemaggo
  • Members
  • 1 138 messages
No tech here, just a player, and I also have that feeling that AI NPCs go for the weakest one first among a group of opponents, only if it's not too far. But most of the time the closest one.
I never saw a monster running for the wizard at the end of the map. I'm always front row anyway, even with casters, but I run fast. They will go for me first, being the one theu followed, the one who "triggered" them, if I rejoign with my companions, but switch to one of them, 2 seconds after, if I keep fleeing.
And die.

#5
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
The standard AI doesn't take distance into consideration. It's why you can get a creature to ping-pong back and forth between two archers, without ever getting near enough to either to threaten them.

#6
HipMaestro

HipMaestro
  • Members
  • 1 515 messages
Compare the hitpoints between your PC & the hench (i.e. Tomi). 

I have no way of reading AI code mind you, but, in general, if two hostiles (in this case, your party would be hostile vs. the monsters) are perceived at the same time, the attack is usually made against the one with the lowest hitpoints.  This would seem to account for the enemy's proclivity to attack a wiz or sorc first in a mixed party since they typically have very low CON.  As I indicated, this is only based on personal observation rather than by deciphering the AI code itself.  To test this hypothesis, see if you can raise Tomi's HPs with a few Endurance potions, hopefully higher than your PC's level, then engage a new group of combatants to see if the attack preference changes.

Another method you might try with Tomi is keeping him in stealth.  At least he should get a few more sneak in that way and may remain unattacked longer.

#7
Malifaun

Malifaun
  • Members
  • 17 messages
Testing for hit points I did consider, but the dwarf has 18 con and I saw no easy way of getting Tomis hp above that. Act 2 was much better, mostly because more and more fights were of the "pushover" type. Also the belt helps, and while it is an ugly solution to have Tomi tank, it works.
The stealth idea is excellent! I am going to try that.