I am pretty sure that TonyK's AI scripts don't care on which page in the inventory a given weapon is placed. Not that it's a bad guess or that it wouldn't be a convenient way of cluing in the AI as to what you want it to do. But, it would be quite difficult to use NWN scripting to
determine what page a given item is on, much less use that information to decide to equip it or not. My guess is that the scripts search the whole inventory for possible weapons, using some heuristic to decide which one to equip. Of course, it's possible that the inventory script stops after finding a certain number of items and decides among those (rather than finish looking through the rest of the inventory) and that might make it seem that only items "early" in the inventory are used. However, I sort of doubt TonyK's AI does that and the documentation for Bioware's ActionEquipMostDamagingMelee() (which I think TonyK uses for choosing the mainhand weapon) doesn't mention that.
There is a potential helpful tidbit, however. I haven't looked at TonyK's scripts in a long time, but I am pretty sure that they ignore items in containers (e.g. wooden box, magic bag, etc.) when choosing weapons to equip offhand. So, you may be able to put any item you don't want the henchman to equip inside a container and it should be ignored. I do not know if that works for mainhand weapons, as I think TonyK's AI uses Bioware's ActionEquipMostDamagingMelee() function for that, and I don't know if it ignored items in containers. And, I supposed that it's possible that the mainhand script might pull an item out of a bag and then, if it's unequipped for some reason to the main inventory, it might later get chosen by the offhand script. So, there may not be a foolproof way to do things.
I also think that TonyK just uses the GP value of the weapon to determine which one is best for offhand use, whereas the ActionEquipMostDamagingMelee() function checks only the enhancement bonus of the weapon. I have never tested it, but that may make it possible to get TonyK's to pick an offhand item that you prefer by adding a permanent property like light to it (e.g. cast continual light or use a light gem).
Modifié par MrZork, 03 juillet 2013 - 06:53 .