If I script some new Force powers for the player to use but I also want other NPCs to use them, is there a script I need to modify to get the NPC to use the power, or will they automatically use any available power within their inventory? I've looked through the OnDamage script and k_ai_master script, but it doesn't seem obvious to me.
Thanks.
- Star Admiral
I'm pretty sure they just cycle through the force powers they have. If you don't care about the NPCs prior powers, you could edit their .utc and remove their other force powers in hope that they use the power more.
If I script some new Force powers for the player to use but I also want other NPCs to use them, is there a script I need to modify to get the NPC to use the power, or will they automatically use any available power within their inventory? I've looked through the OnDamage script and k_ai_master script, but it doesn't seem obvious to me.
It's part of the generic combat AI (k_ai_master) but located in the big include files that script relies on (k_inc_generic and k_inc_gensupport). In this case k_inc_gensupport contains a whole bunch of custom functions that check if the character has powers in specific categories. Look for the functions whose names start with GN_CheckSeries... and GN_GetSeries.... There are also a series of functions for using various power combos.
Do keep in mind that if you alter the AI scripts your mod will be incompatible with any other AI mods (Improved AI mod, Hardcore mod etc) which there is no easy way around.
Thanks for the help stoffe :). I found the functions. This mod is for K1, but I'll see what I can do to try to keep mine compatible in some way.
- Star Admiral