Sure there is a var for this that the AI takes note of, but can't find it. Probably burried in TonyK's stuff.
Anyone know what var is required to tell a hostile creature to not use melee weapons?
Sure there is a var for this that the AI takes note of, but can't find it. Probably burried in TonyK's stuff.
Anyone know what var is required to tell a hostile creature to not use melee weapons?
not sure if this rules out bows or not :
"X2_L_BEH_OFFENSE" - in 'nw_i0_generic'
( does not accept negative values, would use "0" instead ) What I've found is there are 2 ai's: true Tony's AI is mainly for companions, and uses scripts like gb_comp_*
but My present understanding is that Tony wrote only a front end for the Monster AI -- and that this still uses the old NwN1 ai underneath, scripts like nw_c2_default*
- the X2_L_BEH_* variables affect monster-ai but not Companion AI
If you want to examine the monster-ai, i suggest starting at the bottom of 'nw_i0_generic' chooseTactics() and work your way up that include. chooseTactics() is what's called by DetermineCombatRound()
ps. 'x0_inc_generic' contains some of the expanded NwN1 ai
Great, thanks. Its probably henchman AI i'm thinking of, so ill try poking around again for the companion stuff.
k
I also had another look, and it appears that Tony does hook to his own Ai for monsters: even the nw_c2_default* scripts call HenchDetermineCombatRound(), which is T's.
( using his add-on )
Yeah, had a poke around. I think i found the flag to tell a companion/henchman to not use melee and back away etc. Ill give it a play with at some point.
Thanks for the input.
'gui_bhvr_hench_change'
case HENCH_ASC_USE_RANGED_WEAPON:
case HENCH_ASC_NO_MELEE_ATTACKS:
yeh, i've been through it to set up defaults for my companions. iirc, some of these behaviors are setup by Tony's, while others are setup by NwN1 ai.
Well, at the end of the day, it doesn't matter who provided it, as long as it works ![]()
it's not just where it came from, it's a subtle warning that the methods used are different ...
Yeah, had a poke around. I think i found the flag to tell a companion/henchman to not use melee and back away etc. Ill give it a play with at some point.
Could you share what this flag would be, please?
I tried a variable "X2_IA_COMBAT_STYLE_RANGED" set to 1, but it didn't work.
Anyway, I got it to work using a custom AI script (via the "x2_ia_demo.nss" template and the string variable "X2_SPECIAL_COMBAT_AI_SCRIPT").
Ah, didn't get round to finishing off the testing. Was actually going to try the COMBAT_STYLE_RANGED one myself. There was another though, something that was like DO_NOT_MELEE or something. found i think in x0_i0_henchmen or one of the includes.
Anyway, glad to hear you got it working.