XCOM 2
50 ratings
[WOTC] Additional AI Behaviors
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
119.159 KB
26 Nov, 2019 @ 6:00pm
31 Jul, 2021 @ 9:38pm
5 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WOTC] Additional AI Behaviors

In 1 collection by RedDobe
RedDobe V6.0 (Everything you need for a unique fresh campaign)
251 items
Description
Creating New Actions and Conditions for the AI BT. At the time there is only one new behavior, TryStandardShotOnDestructible that modders and players can add to their ai behavior trees. This behavior allows enemy units to target and shoot destructible targets when their enemies are in the blast radius, the same way Xcom can. See XcomAI.ini for more info on how to add this to your bt trees.

For AI Mods who want to include this in their mod Add the X2AIBT_AdditionalAIActions.uc and X2AIBT_AdditionalAIConditions.uc files to your classes folder. Open this mods XComAI.ini and copy and paste the all of the code below the first line into your mods XComAI.ini Then for the following two lines:
+CustomNodes=(NodeTypeString="AddCondition", ExtendsFromType="Condition", ClassName="AdditionalAIBehaviors.X2AIBT_AdditionalAIConditions")
+CustomNodes=(NodeTypeString="AddAction", ExtendsFromType="Action", ClassName="AdditionalAIBehaviors.X2AIBT_AdditionalAIActions")

Replace AdditionalAIBehaviors with your mod's class folder name that you inserted X2AIBT_AdditionalAIActions.uc and X2AIBT_AdditionalAIConditions.uc in.
16 Comments
RedDobe  [author] 30 Nov, 2019 @ 7:02am 
@Syro System - That's correct. What you could do is edit or mod your own XComAI.ini and insert it to TryShootOrReloadOrOverwatch and TryShootOrReload as Child [0], that's what I am going to do for the timebeing.
@DerBK - My pleasure. Looking forward to it.
DerBK 30 Nov, 2019 @ 5:59am 
The behavior of enemies shooting at explodey barrels will be integrated into ABA soon.
Thanks for doing the dirty work, RedDobe :)
Syro System 30 Nov, 2019 @ 4:33am 
Just to make sure I'm understanding this correctly, this is a mod meant to be used by people who code mods right?
It won't take effect if I just play a vanilla game and use only this mod?
RedDobe  [author] 28 Nov, 2019 @ 4:47pm 
@MrMister - update posted to reflect your suggestions as I didn't even consider that once adding your first suggestion.
Star¤Dagger 28 Nov, 2019 @ 3:25pm 
@Rockfire X : He is doing some of the best work, I look forward to it to, though for some reason my infirmary order DOUBLE the bandages after reading your post!
MrMister 28 Nov, 2019 @ 3:07pm 
Also, in the case of 1 ally and at least 2 booguies - make sure that the ally is, yoy know, not self. And if not much harder to code, not chosen (it might still be worth it to ADVENT, but it very probably won't be worth it to the individual doing the shooting).
Rockfire ✘ 27 Nov, 2019 @ 5:52pm 
I can only fear for what advent avengers plans are for this.
RedDobe  [author] 27 Nov, 2019 @ 10:01am 
MrMister - Was considering that already, yes I can.
MrMister 27 Nov, 2019 @ 8:08am 
Could you add another situation for firing when there is 1 friendly in range of explosion but at least 2 non-Lost booguies too?
AaronOnMoon 26 Nov, 2019 @ 9:31pm 
@RedDobe
That's awesome, I love it when the AI gets a new tool under their belt, can't wait to see what Advent Avenger can do with this.

Imagine this, you're fighting with a pod of troopers, but then the chosen hunter shows up he's somewhere in the shadows, the troopers pin you down near a gas station, your rookie and squaddie are suppressed and stuck right behind one of the stations pumps, you hear a hook in the distance then BOOM, your squaddie is dead and your rookie is injured, all thanks to the hunter, that would be so cool!