Skip to content

User AI: Troll Detection

After a long absence, I've been trying to put together a simple AI script for my party : no items or spell casting, just "pick a target and attack" with basic target selection (sadly, none of the default scripts really do this very well IMO). Trolls have been a bane because they can waste a lot of time with stupid fighters continuing to attack a downed troll.

Several things I didn't remember about the IE from long ago, so I'm not sure if this is new behavior or if it just is my faulty memory:
  • *NearestEnemyOf(Myself) won't "see" downed trolls unless they're the only thing left
  • Downed trolls work differently. A simple check for to see if they are downed is StateCheck(LastSeenBy(Myself),STATE_SLEEPING)
  • AttackReevaluate() works badly with trolls : it doesn't detect when the troll goes down so the attacks continue. I suspect some internal engine magic where the trigger evaluation doesn't really happen on subsequent passes. Using AttackOneRound() against trolls (only) seems to "fix" the problem so that attackers figure out that they are wasting time and move on to the next target.
I'm not sure that anyone cares, but there's the data.

And oh, if you (OSX) Quit (Command-Q), it will perform a quick save if it can, but will quietly exit without a quick save if it cannot (in combat).

Comments

  • kjeronkjeron Member Posts: 2,368
    Gimble said:

    And oh, if you (OSX) Quit (Command-Q), it will perform a quick save if it can, but will quietly exit without a quick save if it cannot (in combat).

    'Q' is the default key for Quick-saving. Only 'CTRL' suppresses that fucntion, because it's used for the debug console/keys.
  • GimbleGimble Member Posts: 3
    Ah, that makes sense. Thanks.
Sign In or Register to comment.