Found a way to easily adjust the AI, which is available to all modders as it's in the open variables in an XML.

These default values can be set, and also adjusted for each mission inside the mission script itself:
- Auto detect range (in cm)
- Seeing radius (in cm and with 4 stages)
- Seeing cone angle (in degrees, 1 setting for stage 1 and 1 for stages 2-4)
- Hearing radius (in cm and with 4 stages)
All these are also available for separate settings for the Ghosts, which in the original game are set to be the exact same.
How do the stages work? Well... basically they work like follows (with some special cases and such which I 'm not really sure how to explain yet):
Everything is overridden if the AI already knows where the target is and their memory time has yet not expired (det_memory_see or det_memory_hear depending on situation). So then it's all a game of run and hide to try and get away again.
SEEING
- STAGE1: Detects target if seen inside set range and cone, no matter which mode they are using.
- STAGE2: Detects target if seen inside set range and cone, if in assault mode or if in recon mode and has a stance higher then prone.
- STAGE3: Detects target if seen inside set range and cone, if in assault mode and with a stance higher then prone or if in recon mode and with a stance higher then crouch.
- STAGE4: Detects target if seen inside set range and cone, if in assault mode and with a stance higher then crouch.
HEARING
- STAGE1: Detects target if noise made within range and noise is player moving in assault mode, in the open or behind cover, or player running in either mode, in the open or behind cover, or weapon fired.
- STAGE2: Detects target if noise made within range and noise is player moving in assault mode in the open, or if weapon fired in the open, or unsilenced weapon fired behind cover.
- STAGE3: Detects target if noise made within range and noise is unsilenced weapon fired in the open or behind cover.
- STAGE4: Detects target if noise made within range and noise is unsilenced weapon fired in the open.
So by looking at these, the correct stance and mode does affect the AI significantly. wink.gif
Then there is also the det_shot_timer that says how long the sound stays and is in the risk of getting into the detection range for a moving enemy, and explosion_alert_range for the how long the AI will detect detonations.
So I'm gonna do some adjustments to these values as well for the raw distance mod so it works better in SP as well.
