XCOM 2
281 betyg
[WOTC] Sniper Defense Fix
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Filstorlek
Lades upp
Uppdaterades
1.020 MB
3 sep, 2018 @ 14:44
21 sep, 2019 @ 15:52
6 ändringsnotiser ( visa )
Du behöver DLC för att kunna använda denna artikel.

Abonnera för att ladda ner
[WOTC] Sniper Defense Fix

I 2 samlingar av RedDobe
V5.3 RedDobe Challenging Gameplay
213 artiklar
RedDobe V6.0 (Everything you need for a unique fresh campaign)
251 artiklar
Beskrivning
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).
61 kommentarer
RedDobe  [skapare] 24 jul, 2024 @ 17:26 
What a coincidence! Glad that you worked it out.
BlackDog 20 jul, 2024 @ 23:38 
I looked into this some more this morning - basically the alien pack sniper defense is just hooked into the scamper-root for the naja, while the 'sniper defense' mod adds the behaviour into the alert handler for all units, so me just renaming the AI nodes in the pack is the safer option. I've therefore pushed an update this morning which should resolve the conflict. I can't say for sure which behaviour will take precedence when you alert a naja unit because I don't know whether the alert handler or unit scamper takes precedance but in any case, the behaviours are virtually identical anyway so there shouldn't be any obvious difference in gameplay terms.
Dragon32 25 jun, 2024 @ 12:33 
@RedDobe
OK, thanks mate. I'll mess around with that now I'm back from holiday. Apparently it's a behaviour just used by the Naja enemy from that mod. FYI, the scoring behaviour in this mod has
AddToAlertDataScore_-100
and that
AddToAlertDataScore_100

So not sure which version of the behaviour would actually take effect but if it's that one it looks to an amateur like it'd break this mod.
RedDobe  [skapare] 25 jun, 2024 @ 10:47 
It sounds like the same ai behavior name was used. You would just have to negate the behavior and rename it.
Dragon32 19 jun, 2024 @ 10:15 
I'm getting a Redscreen error about a duplicate behaviour with this mod and BlackDog's Standalone LWOTC Alien Pack mod .

BehaviorTable index 4693 has a duplicate name (ScoreSniperFire) - INVALID

Looking at the two XcomAI.ini files makes me wonder if that mod incorporates this mod's functionality. I'm not the best at parsing AI behaviours but they sure seem to be using similar names and values.
Dragon32 10 maj, 2024 @ 8:38 
no worries
Phoenix 9 maj, 2024 @ 17:27 
@Dragon32 Ok, thanks again man.
Dragon32 9 maj, 2024 @ 7:02 
@Phoenix
I use both. AFAIK this will alert if units in a pod are damaged, the other mod when objectives are
Phoenix 8 maj, 2024 @ 17:48 
With this mod I wouldn't need the Anti Relay Cheese [WOTC] mod anymore right? This mod would do the same thing but better right?
RedDobe  [skapare] 10 jun, 2023 @ 17:24 
Oh I see. Yes it would bring them towards avenger.