Screenshots:
Spoiler:The idea is illustrated in the above screenshots. Ambushers seek a corner area to hide behind that is out of view of the player, which is why I took these with chase cam turned on. The top shows an imp just outside a doorway, and the bottom a shotgun sergeant hiding behind a pole.
Monsters become shadows, seek an ambush point, and wait for the player. If the players gets close enough they pursue, but otherwise if seen they look for another ambush point. Parameters can be tweaked in Settings, including shadows on or off, the radius of the effect, the corner "sharpness" (not all Doom corners are 90 degrees), and the chance of spawning an ambusher. This works well with my other AI mod, Flankers. It should also be compatible with other AI mods that rely on path finding.
A debug mode will show the sector ambush points and the monsters in a blue stencil render to see this working. Not fancy but handy if testing this with other mods.
While this affects all monsters (including Cacodemons, for example), I haven't tested this enough to see what happens with a variety. Could be interesting, I suppose.
Now at v1.1