XCOM 2
57 oy
AI Distributes Attacks [WOTC]
   
Ödül
Favorilere Ekle
Favorilere Eklendi
Favorilerden Çıkar
Dosya Boyutu
Gönderilme
Güncellenme
702.439 KB
19 May 2020 @ 19:59
22 May 2020 @ 16:10
2 Değişiklik Notu ( görüntüle )

İndirmek için abone ol
AI Distributes Attacks [WOTC]

Açıklama
Enemies will be more likely to distribute their attacks and spread out the damage between different soldiers in your squad, and give more priority to targeting higher-HP soldiers (instead of lower-HP ones).

The default AI uses a target scoring point-system to evaluate which soldiers to shoot. This scoring system considers a large variety of factors and adds points for different things, such as Aim %, distance to target, flanked, etc. Whichever XCOM soldier was scored the highest, would get attacked.

One of the factors considered is how much HP the XCOM units have. The AI would previously try to prioritize lower HP soldiers to make kill shots whenever possible. The lower your soldiers' HP, the higher the chance they would get shot. The AI would even try to take difficult shots just for the possibility of a kill shot. <--- This is the default game.

This mod changes a series of score values so that high-HP soldiers will be a more attractive target for enemies. This will result in the AI distributing their attacks amongst your squad and giving a higher priority on shooting high-HP targets that can probably survive the attack if it hits.

These bonuses are not absolute however, it just gives more weight to higher HP - so the AI will not try to make an impossible shot on a high-HP soldier when there is an easy shot available on a lower HP soldier. This mod pretty much acts as a tie-breaker whenever most of the targets are similar in score to each other. (with maybe a little more importance on shooting high-HP targets)

This will also result in more soldiers wounded and recovering in the infirmary - but less soldier deaths.

--- Breakdown of Point Adjustment ---
Target is Killable = -15 (was +15)
Target has low HP = 0 (was +10)
Target is wounded = 0 (was +5)
Add to score x Max HP = 0 (was 10)
Add to score x Current HP = 10 (was 1) <-- This means 10 points for each 1 HP


100% safe to enable or disable any time. Should work with ABA and other AI mods - because this does not add any new AI behaviors - it just modifies base-game point values for target HP scoring and makes previous AI behaviors look at additional factors.

For another AI tweak, check out Less Enemy Spacing.
23 Yorum
Alex Nares  [yaratıcı] 29 Ara 2020 @ 23:43 
I am not sure, I would have to check the INI code to see how it is written and decipher it. I did have conclusive results during testing though to verify that the AI is properly distributing attacks. Note that this mod only *influences* their target selection - it does not *override* it completely.
Thalioden 29 Ara 2020 @ 21:19 
Since TargetScoreHealth_HighFirst and TargetScoreHealth are Selector Nodetypes, does that mean only the first true child node will be applied?
Creed 24 Eyl 2020 @ 19:29 
Makes sense, thanks for the clarification.
Alex Nares  [yaratıcı] 23 Eyl 2020 @ 23:18 
Yes that is correct. However the default AI also weighs Soldier rank (more rank adds more points and preference to shoot). However, keep in mind that you are essentially "dumbing down" the AI. They will be less sophisticated and more predictable - most gamers will agree that a more sophisticated AI is "better".
Creed 23 Eyl 2020 @ 21:26 
I am curious, what would happen if I made all of the base score values zero? As in what would happen if the AI didnt weigh health at all? Would it just prioritize the highest chance to hit? If so wouldnt that potentially be the most dangerous? The AI isnt showing favorite to anything other than getting the best possible shot? If so I would like to do this
TachiKami 21 May 2020 @ 18:23 
Nice one!
Alex Nares  [yaratıcı] 21 May 2020 @ 8:07 
Yes, although if you are mid-mission, changes might not take effect until next mission.
EvilPolygons 21 May 2020 @ 5:37 
@Alex Nares:
Awesome, thanks. :steamhappy:
It should be safe to tinker around with the numbers mid-game, right?
Alex Nares  [yaratıcı] 20 May 2020 @ 17:12 
Yes, you can open the config file from the mod folder 268500\2102632326\Config\XComAI.ini.

Don't change anything on the lines with a minus ( - ) in front of it. Only change lines with a + in front of it. The scores are located under each parameter "AddToTargetScore". Be careful not to set any parameter too far into the negatives - because then it could completely invalidate targets and the AI absolutely WILL NOT attack them, ever.
EvilPolygons 20 May 2020 @ 15:10 
@Alex Nares:
So in your mod, it seems that the AI won't waste turns trying to make impossible kill shots, but also prefers to avoid kill shots. I'm not really a fan of that last bit there.

I'd prefer that the AI continue to prioritize low HP/killable targets -- but only when the odds of landing a hit are equal to (or greater) than the odds of hitting any other available target. I think this would make the AI a lot more difficult and act more like a real human player.

Do you expose your mod settings in the ini file? I'd love to be able to tweak those numbers.