UPDATE (RE summons problem below): It was an error in my own code - now fixed.
Thanks for the links - It was a welcome to my morning, especially the Sonny and Cher link, which certainly sounded right for the mood.
Some good news: I found the problem last night. It related to “Relaying” a command to a companions followers, which linked back to the same custom looped check for the relayed creatures own calls. Thereby, I ended up stuck in the same loop if any of the looped henchmen/companions had their own summoned creature (and I guess any other own follower such as a familiar, but I did not check those). i.e. The loop goes through all companions, which then relays to their summons, which then calls back the same function (for them to have an action altered), but also starts the loop through the companions again … and so on … as the beat goes on.
That is now fixed, but I am trying to resolve another issue before posting the latest version: I thought I had this resolved, but it may be something about the way the NWN2 engine works … I thought a PC could send a command directly to a summoned creature - if they were the PC that summoned it. i.e. Player controls three PCs, and one of them is a cleric who summons a monster. The player then (while still possessing the cleric) right clicks and is able to issue a command to the summoned creature. I have noticed that this option is there, but when the player issues the command to the summoned creature this way, the summoned creature does not appear to “hear” the command, even though it has listening patterns set within its on spawn and on dialogue scripts.
My suspicion now is that the direct command to summoned creatures is no longer supported and uses the “relay to” command via any commands given by the main PC to their companions - which then “relay” the command to any followers they have themselves.
As I say, it has been some while since I looked at the AI, especially when related to summoned creatures. That is what I am currently looking at again, to see if it is something I may have done in error.
And I don’t know if this is normal (or something I altered at some point), but are summoned creatures supposed to go into the party portraits or not? In my case, the PC (or companion) cast the summoned and then the creature appears to join at first and then immediately drops out of the party portraits again, but remains in the party. As I say, this may be normal and something I did not notice before.
Anyway, any light you can shed on this matter would be welcome. In the meanwhile, I will continue to check my own code and/or see if there is a way to make the summoned “hear” a direct order, even if it means (if possible) relaying a companions own “shouts” via itself … if you see what I mean.