XCOM 2
Ocen: 277
[WOTC] Sniper Defense Fix
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Rozmiar pliku
Zamieszczono
Zaktualizowano
1.020 MB
3 września 2018 o 14:44
21 września 2019 o 15:52
Listy zmian: 6 ( zobacz )
Musisz posiadać DLC, aby użyć tego przedmiotu.

Zasubskrybuj, aby pobrać
[WOTC] Sniper Defense Fix

W 2 kolekcjach stworzonych przez RedDobe
V5.3 RedDobe Challenging Gameplay
Przedmioty: 213
RedDobe V6.0 (Everything you need for a unique fresh campaign)
Przedmioty: 251
Opis
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).
Komentarzy: 61
RedDobe  [autor] 24 lipca o 17:26 
What a coincidence! Glad that you worked it out.
BlackDog 20 lipca o 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 czerwca o 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  [autor] 25 czerwca o 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 czerwca o 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 maja o 8:38 
no worries
Phoenix 9 maja o 17:27 
@Dragon32 Ok, thanks again man.
Dragon32 9 maja o 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 maja o 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  [autor] 10 czerwca 2023 o 17:24 
Oh I see. Yes it would bring them towards avenger.