I would like to help you on that matter, but I am just a shit programmer and wouldn't know where to use that stuff even if it'd hit me in the face. :p
Here is another question, though: As I've understood, it is possible to tell companions to never use the burst mode on a weapon. Now... is it possible to check what the NPC theoretically hit, once he'd fire his weapon? I mean, could it be possible to allow a companion to use the burst fire mode if neither the player nor player friendly units are even just remotely in his line of fire? Basically, make a check for all targets that possibly could be hit (no matter the % hit chance), and if there is anything green in it, force single fire?
This way we could keep them on burst, but don't risk getting sprayed as well.
Here is another question, though: As I've understood, it is possible to tell companions to never use the burst mode on a weapon. Now... is it possible to check what the NPC theoretically hit, once he'd fire his weapon? I mean, could it be possible to allow a companion to use the burst fire mode if neither the player nor player friendly units are even just remotely in his line of fire? Basically, make a check for all targets that possibly could be hit (no matter the % hit chance), and if there is anything green in it, force single fire?
This way we could keep them on burst, but don't risk getting sprayed as well.