Author Topic: Pondering a New Hostility System  (Read 251 times)

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Pondering a New Hostility System
« on: March 09, 2013, 07:01:48 pm »


               I'm planning to add a reworked hostility system to the ai's targeting. My question is simple enough, though it's aimed mostly at those of you who've done some ai work in the past. I'm debating the best way to track a pc's hostility value, which would be modifiable by wearing certain pieces of gear, among other factors, like amount of damage dealt, etc (think Dragon Age). Right now the leading contenders are effects and locals, and I'm sort of torn between them. Input welcome.

Funky
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Pondering a New Hostility System
« Reply #1 on: March 09, 2013, 08:20:56 pm »


               I like the effects idea, since they apparently can be checked faster than variables can be, and in AI every bit of improvement helps with mob AI.

 An effect for highest damage dealer, for instance, could be modified through nwnx to include the amount of damage that it was, the creator being the current object that had done it.

 The more simple damage dealer types could use the damage as a float to set the duration of it, and could be checked simply if it existed or not.  I'm not as sure about this one though, as it would require manually looping through effects to check for it, which is less ideal.

 Permanent effects that you swap the creator of, using those in combination with distances would likely be the most "realistic" target selection method.
 For gear, or even feat altered hostility, I'd also go with effects.  Activating the feat, or equipping the item, would apply the specific adjustment effect on the object, to be checked for when weighting targets.