Author Topic: 2 questions about monster behavior  (Read 812 times)

Legacy_0pie

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
2 questions about monster behavior
« on: April 03, 2011, 11:30:31 pm »


                1) How do I get a monster to stop equiping weapons that spawn as loot in its inventory ? eg. I have a boss that has greatsword, there is a 75%chance it will spawn a special weapon OnSpawn. If it does spawn a weapon the monster constantly flips between the spawned weapon and the one I want it to use. 


2) How tdo I get monsters to use combat feats such as IKD ( improved knockdown ) I have tried everything and they just dont want to spawm IKD for me.


Thanks to anyone who replys to me 8)
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
2 questions about monster behavior
« Reply #1 on: April 03, 2011, 11:38:26 pm »


               

0pie wrote...

 1) How do I get a monster to stop equiping weapons that spawn as loot in its inventory ? eg. I have a boss that has greatsword, there is a 75%chance it will spawn a special weapon OnSpawn. If it does spawn a weapon the monster constantly flips between the spawned weapon and the one I want it to use. 


2) How tdo I get monsters to use combat feats such as IKD ( improved knockdown ) I have tried everything and they just dont want to spawm IKD for me.


Thanks to anyone who replys to me 8)

1) no way, do this stuff in OnDeath instead

2) default AI can't use IKD, you can either use better AI, for example Tony K's or write your own for only that creature
               
               

               
            

Legacy_Terrorble

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
2 questions about monster behavior
« Reply #2 on: April 04, 2011, 12:27:22 am »


               1) In a *few* instances I could remove the necessary weapon proficiency feat to equip the weapon or put a class restriction on the weapon so the NPC couldn't use it.  ...but of course, Shadow's suggestion is what you want.
               
               

               
            

Legacy_kalbaern

  • Hero Member
  • *****
  • Posts: 1531
  • Karma: +0/-0
2 questions about monster behavior
« Reply #3 on: April 04, 2011, 04:45:58 am »


               1) Move treasure creation from the OnSpawn event script and put it into the OnDeath event instead. Then no spawned loot will get wasted/used.

2) The default scripts actually do use KD and other feats. You need to make sure that NPCs are built to take advantage of them is all. The default AI doesn't use them constantly and often not at all depending on their opponents builds and what if any other combat options they have.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
2 questions about monster behavior
« Reply #4 on: April 04, 2011, 04:57:53 am »


               

kalbaern wrote...

2) The default scripts actually do use KD and other feats. You need to make sure that NPCs are built to take advantage of them is all. The default AI doesn't use them constantly and often not at all depending on their opponents builds and what if any other combat options they have.

But we have been talked about improved knockdown. This feat is actually removed from AI via 2da (possible intend) collumn CATEGORY. But even if you enable it (which I did for community patch, but then disable it again for sure), default AI is not able to use it. That would have to be coded inside the x0_i0_generic library.

The default behaviour is that NPC uses the KD or (improved) power attack only if the AC (including all bonuses even when flatfooted) of the opponent is lesser than the base AB by 10 points (cca not sure now), the same with disarm and similar with expertise where its opposite, but monsters can use improved expertise. The called shot/smite evil/good/stunning fist/sap/rapid shot are used randomly and rapid shot in particular can bug npc if she got melee weapon (thats fixed in community patch).
               
               

               


                     Modifié par ShaDoOoW, 04 avril 2011 - 04:02 .
                     
                  


            

Legacy_0pie

  • Jr. Member
  • **
  • Posts: 74
  • Karma: +0/-0
2 questions about monster behavior
« Reply #5 on: April 04, 2011, 08:48:27 am »


               Hmm thanks for all the info guys helps alot.

EDIT:  What about this " NW_FLAG_FAST_BUFF_ENEMY " does this instantly buff the monster if activated ? I cant figure out how to activate it though. I even changed my OnHeartbeat script take a look. No clue any advice would be great, thanks again.

OnHeartbeat

pastebin.com/kywBCCzp
               
               

               


                     Modifié par 0pie, 04 avril 2011 - 08:15 .