Author Topic: ActionUseFeat...  (Read 879 times)

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
ActionUseFeat...
« on: June 13, 2011, 09:08:56 pm »


               ... doesn't work for PCs.

Any way around this or some other trick to make PC use a feat through a script?
               
               

               
            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
ActionUseFeat...
« Reply #1 on: June 14, 2011, 10:03:07 pm »


               Help! I really need this..
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
ActionUseFeat...
« Reply #2 on: June 14, 2011, 10:09:39 pm »


               What about workaround via action wait + casting the feat's spell + decrement feat use.

Only possible if the feat has any spell, so not possible with kd for example.
               
               

               


                     Modifié par ShaDoOoW, 14 juin 2011 - 09:10 .
                     
                  


            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
ActionUseFeat...
« Reply #3 on: June 15, 2011, 10:02:23 pm »


               Okay, I have devised a workaround with on hit unique power, but I have a problem...

If someone uses KD in a flurry, and has more then 1 attack on that flurry, the first attack that hits removes the "KD attempt on hit" thingy.

So if you have 3 attacks in a flurry, you use the fake KD, the first attack misses and the second one hits, target is knocked down if he fails disciple check. Both attacks suffer the AB loss... Only the first attack should be a knockdown attempt.

Any way to "get" the pc when he attacks? (Regardless if he hits or misses)
               
               

               


                     Modifié par Xardex, 15 juin 2011 - 09:03 .
                     
                  


            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
ActionUseFeat...
« Reply #4 on: June 15, 2011, 10:17:12 pm »


               first of all are you useing NWNX extender, either nwnx_func windows or nwnx_func linux, you might find a way to script this
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
ActionUseFeat...
« Reply #5 on: June 15, 2011, 10:25:43 pm »


               Attack hooking is in nwnx_events on the windows version, and it works quite well.

 If your fake KD is a feat, there's no reason that you can't set it as a usable combat feat and run it off a spell script.  I added trip and bull rush to my little mod, as usable combat feats, and they work quite well set up that way.
               
               

               
            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
ActionUseFeat...
« Reply #6 on: June 16, 2011, 10:12:15 am »


               EVENT_ATTACK?
It launches as I click to attack the enemy, and only then.

The fake KD is in one of the player tool feats. Can I modify it to work like that while keeping it completely serverside? If so, how would I  go about doing that? I have no experience with custom content whatsoever.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
ActionUseFeat...
« Reply #7 on: June 16, 2011, 02:33:13 pm »


               Hmm...  I just tested it in my mod, and ActionUseFeat works when assigned to a PC.  Since my testing character is a cleric, I stuck this in a placeables OnUsed, and it fired off properly.

void main()
{
object oPC = GetPlaceableLastClickedBy();

AssignCommand (oPC, ActionUseFeat (FEAT_TURN_UNDEAD, OBJECT_SELF));
}

 This will only work if the PC actually has the feat though.  In the case of knockdown, if they have the feat you could assign the PC to use it with the ActionUseFeat command, but that would involve changing the feat.2da so that it isn't a usable feat anymore, and I'm not sure that can be done entirely serverside.

 Is the only change you're trying to do a penalty to hit on KD attempts, but still keeping the entirely made up mechanics implimented for it in NWN?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
ActionUseFeat...
« Reply #8 on: June 16, 2011, 06:49:10 pm »


               

Failed.Bard wrote...

If your fake KD is a feat, there's no reason that you can't set it as a usable combat feat and run it off a spell script.  I added trip and bull rush to my little mod, as usable combat feats, and they work quite well set up that way.

Its not possible to make a new combat feat which will work just the same as default one does. Neither via public nwnx plugins afaik. And all workarounds are ugly for this and I would never recomended them.

So the question is why you are doing fake kd? What do you want to change on default KD? The public nwnx plugins can detect kd attempt and block it so that could be the solution?
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
ActionUseFeat...
« Reply #9 on: June 16, 2011, 07:42:04 pm »


               

ShaDoOoW wrote...

Failed.Bard wrote...

If your fake KD is a feat, there's no reason that you can't set it as a usable combat feat and run it off a spell script. I added trip and bull rush to my little mod, as usable combat feats, and they work quite well set up that way.

Its not possible to make a new combat feat which will work just the same as default one does. Neither via public nwnx plugins afaik. And all workarounds are ugly for this and I would never recomended them.


  Trip by PnP rules is a touch attack, followed by the size/strength/stability checks.  It was actually quite easy to impliment in full compliance to 3.0/3.5 rules.
  It's just combat feats that require attack rolls to be made, as opposed to touch attacks, that can't be easily done.
               
               

               
            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
ActionUseFeat...
« Reply #10 on: June 16, 2011, 09:01:29 pm »


               Which plugin detects KD?? I didn't find one..

Also it seems lexicon is wrong again, claiming that the function doesn't work for PCs...
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
ActionUseFeat...
« Reply #11 on: June 16, 2011, 09:56:55 pm »


               There's a NWNX plugin that detects feat usage, but I believe it's only in the linux version.  I'm running the windows version of it, and didn't see it in the funcs or events add ons I have.

 I just tested on mine, and I had no problems calling a feat effect from a player tool.  Depending what it is you're trying to do, you might be able to just put a wrapper function around the feat call right in the tool script itself.
 Again, though, the PC has to actually have the feat in order for the call to work, and if they have the KD feat they're likely to just use it off the standard combat radial if you're applying penalties on the player tool.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
ActionUseFeat...
« Reply #12 on: June 16, 2011, 10:00:37 pm »


               linux's nwnx_events should be able to do that, as it has UseFeat hook however Im not sure if it can detect KD use as Im windows user and this is not in win version.
               
               

               


                     Modifié par ShaDoOoW, 16 juin 2011 - 09:01 .
                     
                  


            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
ActionUseFeat...
« Reply #13 on: June 17, 2011, 10:41:19 am »


               Right, its always the linux... Thanks anyway.

Another problem, how can I make a player use either Called Shot arm or leg? There is only one FEAT_CALLED_SHOT.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
ActionUseFeat...
« Reply #14 on: June 17, 2011, 02:37:04 pm »


               As far as I know you can't tell it which one to use.  I got quite frustrated with that myself trying to select the proper one when I was rewriting the combat AI for my mod.  I wanted them to use called shot leg at a distance, and called shot arm if the thing they were attacking was near by, but never could manage it.