|There's Gonna Be A Fight!|
1) Where possible, switch to using the function HenchDetermineCombatRound rather than using the ActionAttack function. I thought the latter function would have triggered the former, but this is not the case. (Obvious in hindsight.) Using the former function throws the NPC into immediately using its combat AI code, whereas the latter makes the NPC close to attack before thinking about it.
2) Update my own AI script (used for many other combat situations, including things like healing and weapon choice) to make reference to the older NWN function DetermineCombatRound if the NPC is a spell caster. This older function appears to give better results than the newer one (mentioned in 1 above). Therefore, while I use the newer HenchDetermineCombatRound to initiate the AI for the NPC, I actually re-direct the AI to use the older DetermineCombatRound function via my own AI script.
The end result of making these two adjustments is that my spell casters definitely use their spells before entering combat.
|Combat Begins! The spell casters cast from the back!|
|Creatures Summoned! Now for their next trick!|
While testing, I also discovered some other issues that needed fixing. (Some due to later updates I had made that affected the very early stuff.):-
1) Fixed creatures dropping their "creature items" due to a new ID system I had implemented.
2) Fixed a container found on a creature that was using an OC GUI that does not work.
3) Fixed creature auras that were clashing with my NPC detection aura system.
4) Fixed/Updated a Scroll GUI trigger system to use newer functions to allow more script calls.
There were a handful of other minor issues that I fixed along the way and which I encountered as I did another quick play test. In the coming weeks, I hope to carry on finishing conversations and finishing area scripts.