How the NPC factions, or lack there of relates to the player helps a lot.
I ran into it while modding Fallout 3.
Doing the group faction right, even made the turrets in my dungeon friently, but capable of being set hostile in an instant using the right script commands.