[WOTC] Sniper Defense Fix

If you liked this item, please rate it up on Steam Workshop page.

Author: RedDobe

Last revision: 21 Sep, 2019 at 22:52 UTC (2)

File size: 996.35 KB

On Steam Workshop

Description:

Tired of how is easy it is to cheese the enemy AI when you have a concealed unit and sniper combo? Tired of units running right back to the same spot in the open where they were just shot or teammate was killed? Well, so am I! This mod attempts to resolve that problem by adding a new "Sniper Defense" selector in the behavior tree for enemies.

It works by adding a sniper defense selector in the Generic Alert Handler for Yellow alerts, which is where the problem lies. I use a trigger to select this sniper defense behavior only when the following are true:
1. There are no visible enemies to the unit
2. The Alert (Sniper Location) is more than 24 tiles away
3. One of the units in the pod took damage or if the shot is missed there is a 50% chance to alert the pod (This is configurable in the XcomSniperDefense.ini file.
4. The pod has not had any prior knowledge of your team
5. The alert is not older than 5 turns

When you have a sniper shooting an enemy unit with a concealed spotter, the enemy pod will now advanced towards the sniper fire using cover, instead of running in circles.

Safe to add and remove anytime as this only modifies the TrySelectYellowAlertAction behavior in the XcomAI.ini Behavior tree, which is a branch of the Generic Yellow Movement, which is a branch of the Generic Alert Handler.

All new Alien and AI mods that I am aware of use this same generic alert handler for their behaviors, so it should be compatable with every mod, especially ABA ( I made sure of this prior to creating the mod).

Download
Required DLC:

These DLC should be installed in order to use this item.


XCOM 2: War of the Chosen
Revisions:

Old revisions of this mod are available below. Click the link to download.