Requires DAHM/DorHud: https://steamcommunity.com/groups/dahm4pd/discussions/3/490123197956419203/
This mod adds a detection meter (ok, not a meter, it's just the percentage) and suspicious icons above guard heads to Diamond Heist Stealth, using the Hint display and ! waypoints.
As host, it's 100% accurate to the actual values used. As client, I simulate the detection checks, meaning the percentage tends to be higher than it should be due to doing more frequent detection checks than guards actually do (combined with desync, of course). I only show your own detections since there's not much to do about other people's and it'd cause clutter.
It also works for First World Bank casing as host, not that that's very difficult.
Details about how the detection works in this game, since I figured it all out coding this:
First World Bank: Guards check for heisters nearby every second. There's two detection ranges; the "turn to face you" range, and the "alert in 2 seconds" range (really small; basically hugging them). If you enter the "alert in 2 seconds" range, a timer starts, and that timer won't reset until you leave the "turn to face you" range, but the alert only triggers when you're in the super-close range with the timer expired. (So, if you touch a guard, then back off, but they're still facing you, they'd instantly alert if you get too close again, since the timer never reset.)
Due to rounding with the per-second check, often a guard will check at 1.99999999 seconds and not alert, making it effectively a 3 second timer instead of 2 seconds. And really, as long as you keep moving, there's zero risk of ever getting caught by these guards.
Diamond Heist: Guards check for heisters nearby or in their line of sight every second. If they detect one, your detection countdown is set to 1 second, and that guard begins checking rapidly.
If you're out of detection range, the update interval's length is added to your detection countdown, with it clearing if it's above 1 second.
If you're still in detection range, the update interval's length is subtracted from your detection countdown, although distance and angle both decrease how much is subtracted, so being far off to the side has 30% effect, being far off in the front or being close behind them has 70% effect, and touching them has 95%+ effect.
The distance checks are all done between your head and their head, so although your movement state has no effect on detection rate, crouching (or jumping!) could have a slight positive effect on the distance check, but you're probably better off sprinting.
So, never give up, even if you turn a corner and bump into a guard! Especially with that 1 second delay between initial checks, and no penalty for sprinting or colliding with them, it can be pretty easy to get away.
Also, they can't trigger the alarm while they're doing an idle animation (like stopping to wave to a camera). But they are still going through the motions and you WILL be detected if you're in their detection range after the animation!