Jump to content

Home

Adding Force Powers to NPCs


Star Admiral

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...