Critical Hits
Awas73
Member Posts: 66
I'm trying to figure out how to check for critical hits on an object. If the last attack on the target was a critical hit I want to perform an action or create something, etc. Anyone know how this could be scripted? I can't seem to find a function for OnCriticalHits or something to that effect. Any help with even checking to see if the last hit was critical would be great. Thanks.
0
Comments
You can however get the target's dr and resistances and then boost the outgoing damage of the onhit effect to compensate. Then you can try to try to track the base weapon damage by doing a get/set compare and make a rough estimate of how much of the second part of the damage gets through. Really all of this stuff is so messy and ugly but without properly opening up combat to more scripting it's the best you can do.
Now try to mess with the situational to-hit attack bonuses, apply them when you target the right target and not the wrong target. It's a mess without being able to override the combat mechanics.
Without hooks or nwnx initiative scripting is a mess too. You have to roll your own and hope the player ignores the other.
Btw what do you mean you asked for combat hooking? You asked nwnx developers? I have this functionality (and more) in nwnx_patch plugin, it works for both 1.69 and EE with same code (just the EE version is missing some functionalities). Obviously windows only though ...
Even attempting to do a turn-based module like ToEE it's just ... it's not great.
So there are no such issues with efficiency... Maybe time to necro the original thread and notify them of this approach.
It's more straight forward overall.