Aller au contenu

Photo

ActionUseFeat...


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

#1
Xardex

Xardex
  • Members
  • 217 messages
... doesn't work for PCs.

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

#2
Xardex

Xardex
  • Members
  • 217 messages
Help! I really need this..

#3
Shadooow

Shadooow
  • Members
  • 4 470 messages
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 .


#4
Xardex

Xardex
  • Members
  • 217 messages
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 .


#5
Greyfort

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

#6
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
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.

#7
Xardex

Xardex
  • Members
  • 217 messages
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.

#8
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
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?

#9
Shadooow

Shadooow
  • Members
  • 4 470 messages

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?

#10
Failed.Bard

Failed.Bard
  • Members
  • 774 messages

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.

#11
Xardex

Xardex
  • Members
  • 217 messages
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...

#12
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
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.

#13
Shadooow

Shadooow
  • Members
  • 4 470 messages
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 .


#14
Xardex

Xardex
  • Members
  • 217 messages
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.

#15
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
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.

#16
Xardex

Xardex
  • Members
  • 217 messages
So which one does it use? Or is it random?

#17
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
It seems to be a random 50/50 chance of either. It's strange that when you have the feat you have a radial option to use the specific one, but I couldn't find a way to tell it by script which to use. Even more annoyingly, they have seperate actions in the 2da:
29 CalledShotLeg 518 ir_calledleg
30 CalledShotArm 517 ir_calledarm

Maybe someone has managed to hook them individually for NWNX, it should be possible to do, but I never noticed the option for it in any of the features updates.