I'm currently working on a script which performs stealth. I've used the helpful suggestions from the community and come up with some sneaking logic. I'd like to know what fans of stealth/sneaking missions would like to see added/changed in this logic:
1. Guards have a hearing radius. If they hear the player (player makes a noise when he moves, based on the tile he's on and equipment being used), they turn to face the noise. If they can't directly see the player, they begin walking slowly towards the location of the sound. I assumed this would be larger than the 2 vision radii
2. Guards have 2 vision radii. The outer one is "Guard sees the player but isn't sure he's hostile." This causes the guard to walk at normal speed towards the player. The inner one is "Guard sees the player and knows he's hostile." This causes the guard to race towards the player. To be seen, a player must not be behind a wall and must be within the guard's field of view (180 degrees based on the guard's direction)
The player has the following optional Defenses:
1. Disguise. Each guard might have an "alliance." If the player is wearing at least 1 piece of equipment from the same alliance, and NO equipment from another alliance, the guard thinks the player is friendly --- and will continue patrolling UNLESS the player gets within the visual detection radius (disguise isn't perfect)
2. Tiles and equipment can make the player easier or harder to see/hear (padded shoes and, say, leather vs iron armor, and walking over a carpet vs walking over stone tile)
3. Sleep gas. Using an item, player can make all guards within a radius go to sleep
4. Stun item. Using an item, player can stun the guards, reducing their vision/hearing acuity for some time
5. Distractions. Using an item/throwing a switch, player triggers noise and light elsewhere, causing the guards to investigate IF the player is quieter and less visible than the noise. These last for a short amount of time or until the guard touches the distraction
All behavior is deterministic -- a guard will always respond the same way, if the guard is looking the same way, player is on the same tile, wearing the same equipment, and the guard is in the same state.
Am I missing anything in my stealth script? If not, is this an ideal set of behavior for a stealth mission?
Obviously, I need to make certain compromises such as: Guard should not be able to detect the player before player can see him --- otherwise player can't observe the guards' patrol routes.
Thanks.