I found it to be always completely random. I've had a settlement @ 100 happiness w/ more than enough defence get raided. I swear it always happens to settlements while you are in Far Harbour or Nuka World, you get some notification that you never ever see, and don't see it until the settlement has been damaged.The raiding mechanics in Fallout 4 aren't great at all. You have to have an unhappy settlement in order to have raids usually happen and a low defense. Otherwise you have to spawn with console commands to test out your settlements defenses.
Nora Companion Mod WIP at Fallout 4 Nexus - Mods and communityWell, here's my take on a Nora Companion Mod. After the Kellogg sequence in the beginning of Fallout 4, you are reawaken from cryosleep and notice your wife's cryopod is empty. After exiting Vault 111, you are given the opportunity to find your spouse and reunite with her. Thus, giving you the chance to find Shaun together.
-adds Nora as voiced companion
-adds short intro, recruitment quest
-adds companion dialogue interjections/interrupts
-adds companion swap dialogue for base game companions as of now
-supports customized Nora, looks will carry over if you edit her appearance in the beginning of the game
-disables Nora's corpse in Vault 111...