If you wall in a settlement with only a few choke points when its attacked are the enemies going to funnel through that choke point? The enemies arent going to spawn inside the the settlement are they?
Good question, I would love to know the answer
They won't spawn at all if defense is above the sum of food and water as far as I know
From what I've seen, when you actually get the message "X is under attack, go help defend X", enemies tend to spawn outside the settlement to try to rush in, or shoot at settlers/turrets from outside your walls. I've seen raiders and gunners shoot at turrets and throw grenades over my walls. I've seen feral ghouls run at my walls, only to be impeded which gave us an easy kill. So I'd guess melee enemies are completely ineffective, unless they come in thru your choke point, while enemies with ranged weapons can still fukk shyt up outside built walls.
However, I have seen instances of enemies spawning inside a settlement after fast travelling there randomly, ie, there is no quest or notification that it's under attack. I chalked that up as some sort of bug, but it's happened. For some reason when I go to Outpost Zimonja, for example, there are always two raiders inside that main structure near the tower. Now that I think about it, Zimonja is the only place enemies spawn inside the base....hm.
Also, having a high defense won't make attacks impossible, just less likely to occur.