Author Topic: Is the realistic accuracy/cover mod a better way to play BrutalAI? Sneaky AI?  (Read 481 times)

Offline xenoroyal

  • Squaddie
  • *
  • Posts: 9
    • View Profile
i plan on playing on the AI setting of 2.

I was considering using the accuracy/cover mod, and using sneaky AI so the AI would use cover too and not leeroy charge across fields while my guys are all setup in the first building/cover by drop zone.

Im predicting TFTD og where you setup and camp as entire enemy force bum rushes you.  If im using the cover system, and the ai isnt, it will be a turkey shoot.  like in the accuracy mod video where the guys in behind cover kill the mutons in the field.

i figured i could get cover and just let them swarm me and die in fields
i figured if i used sneaky AI, we'd be fighting cover to cover and it would be more intense

what is your experience?
« Last Edit: April 05, 2025, 07:51:51 am by xenoroyal »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 667
    • View Profile
What exactly do you mean with "AI setting of 2"?

The important setting for "cover to cover fights" is the "Aggressiveness"-setting in Advanced=>BOXCE=>AI.

It needs to be "0" or "1".

"2" means the AI will just try to end their turn in cover but does not consider the movement of your units. So they will leave their own cover, when you leave line of sight.
"3" means the AI will run towards where it thinks (or knows) your units are without any consideration of cover at all.

The "Sneaky AI" option doesn't have all that much impact. It messes with the path-finding by making pathes that go through the players current vision-radius less attractive. So when there's several alternatives to get to a position the AI will prefer the one where it's not seen.

However, "Brutal-AI" is not really meant to be played in conjunction with "Sneaky-AI". It might even make the AI miscalculate moves. As in: It thinks it can reach a certain position but then it takes a detour and has less TUs left than it though it would.

So I recommend to leave "Sneaky AI" and set Advanced=>BOXCE=>AI=>Aggressiveness to "1".

This is the strongest setting available in that regard and will make the AI do cover to cover fights.

Offline xenoroyal

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Quote
What exactly do you mean with "AI setting of 2"?
"Targeting behaviour for Brutal AI" =>
2 => AI units can also attack whatever any of their friends see."

i plan on using that.  so im wondering now if the game would best be played normally or with advanced cover/accuracy mod.

Thank you for telling me sneaky AI wouldnt work well with the mod.   My concern is, I give myself a huge advantage with advanced cover mod while the AI makes no use of it.  I thought sneaky AI would push them into using cover more.  I dont want to give myself an insane advantage. 

with your experience, would playing on targeting behavior 2 with advanced cover/accuracy mod be too easy?  Im looking for a challenge harder than superhuman (I do not use PSI) but allow them to use it normally.  Im thinking the cover mod would need its own ai to go with it to really reach full potential.   otherwise its just like in his demo video.  4 soldiers in cover turkey shooting  mutons in a field

so what do you think?  is it just too advantageous to be able to camp behind walls and skyranger legs and makes it too easy?

thank you for explaining what aggresion 2 and 3 would do.   but whats the difference between 1 and 0?  i planned on using 0 initially with no knowledge

Online jnarical

  • Captain
  • ***
  • Posts: 99
    • View Profile
That video is like 1 year old or something. Its sole point was to show what gunfight looks like when units shoot in targets’ direction, unlike it was in the original game. Can’t say for sure but most probably Brutal AI was disabled. You won’t experience such dumb behaviour from current BAI version until you crank up aggressiveness to max level.

And please don’t overestimate cover - if you’re targeting heavily covered unit with auto-fire from close to midrange, and get for example 5% chance to hit due to cover - that means that with good probability first shot will hit and destroy the cover, and all next shots will go straight to the target with full accuracy. RA makes game more “tactical” cause you have to manoeuvre, moving every time your cover got destroyed.

Offline xenoroyal

  • Squaddie
  • *
  • Posts: 9
    • View Profile
cool thanks for the insight

anyone else whos played with/without cover/accuracy mod would be appreciated


Also Xilmi, I appreciate you answering its very graceful. feel free not to answer but two years ago a guy said "Damn, I was just looking for a nice UFO Defence challenge above Superhuman. I'm definitely going to completely disable cheatTurn for this. "Smart AI that doesn't cheat" is a hard thing to make work, but it's what I love."
 and you responded
Quote
Xilmi
Team member

2y ago
I guess I shall look into improving the search-pattern for the non-cheating AI for when they don't know any of your unit's positions. Currently it's rather random. I think it should probably be more systematic about that.

that was two years ago, I am assuming when you talk about non cheating AI you are talking about Bug Hunt mode?  Did you ever get around to making Bug Hunt aliens a little smarter at searching for and finding Xcom agents?  Perhaps they communicate with eachother or something in Bug Hunt mode now?  maybe they communicate the heat maps or something?  ur reply was a long time ago and i just wondered if u improved it .  im wondering if half the aliens will be randomly wandering around mindlessly while a big firefight is going down, instead of moving to help their team in the fight.   like, if they had radio coms or something

i promise i wont ask any more questions, its just you basically made X-Com 2.  Brutal AI almost needs it on ufopaedia on how some of the features work, but you've done enough work already! 
« Last Edit: April 06, 2025, 09:06:12 am by xenoroyal »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 667
    • View Profile
with your experience, would playing on targeting behavior 2 with advanced cover/accuracy mod be too easy?
No. I'm not a pro at this game by any means but I could easily beat vanilla Super-Human while I struggle really hard with BAI enabled.
It really is a lot harder than what you'll be used to!

There is certain things that make it easier. Most people who use advanced cover/accuracy mod also enable extender-accuracy. And extender accuracy makes the game easier due to shifting a lot of power towards explosives. In vanilla the aliens rarely have grenades, especially early on. So you are nerfing their shooting-weapons with these settings while you can compensate by using grenades.

Since you mentioned something about TFTD, however, that's not so much the case because the AI also gets a lot of grenades early on that they can use.

Using Cover-mod without also using extender-accuracy, however does not make it significantly easier. Maybe a little bit.

Im looking for a challenge harder than superhuman (I do not use PSI) but allow them to use it normally.
This is actually available as mod in BOXCE. It's the mod called Brutal-AI: It disables the research-option for the PSI-weapons but you can still use labs to filter your units for who is good defensively against PSI. I made this both for Vanilla and TFTD. In TFTD it changes the score-threshold from -300 to -500 to make the first 2 months a little easier even because I could otherwise never make it past them. Terror-missions in TFTD against Brutal-AI really are very hard.

otherwise its just like in his demo video.  4 soldiers in cover turkey shooting  mutons in a field

so what do you think?  is it just too advantageous to be able to camp behind walls and skyranger legs and makes it too easy?
The situation you saw in the demo-video will not happen when you play on Aggression 0 or 1. Aliens will not be "in a field" if they can help it. They will always seek out cover and either end their turn after dealing a lot of damage to you or in cover. They will usually stay in buildings or their UFO and wait for you to be out in the field or leave your cover.

whats the difference between 1 and 0?  i planned on using 0 initially with no knowledge
Brutal AI usually has 3 phases in their actions. A seeking-phase, an attacking phase and a repositioning/hiding phase.
The attacking-phase works the same regardless of aggressiveness: If they know about something they can attack, they will do so.
The seeking- and repositioning-phases differ between all aggressivenesses:
3 has no repositining-phase. They will spend all of their TUs for seeking and attacking. And if they don't find you, they will just seek.
0, 1 and 2 have a concept of cover. However, "2s" concept of cover is highly flawed and doesn't have any foresight. Just currently not being seen is good enough for them.
They will reserve TUs of their seeking-phase to go back to what they consider cover and spend at the very most half of their TUs for seeking.
The difference between 0 and 1 is what they do in their hiding/repositioning-phase:
0 will try to preserve as many TUs as possible to go back to cover. So if they think they are already in cover, they will remain where they are after the seeking-phase.
1 will try to get closer to the enemy while remaining in cover.
The difference in practice is, that on 0, aliens will remain mostly where they are spawned, as long as they seem the location save. They look around some corners and then end their turn. On 1, they will move towards "where the enemy is". So they will mostly go near the UFO-doors so they are better positioned to attack you on the next turn.

0 is a more vanilla-esque-feeling. You must search the enemies more because they will be more hidden. Chances are higher you'll walk in to reaction fire but you are more likely to have the numerical advantage in fire-fights.

1 is imho the overall strongest setting/best compromise when it comes to playing-strength. They still want to be in good cover but they want to position in places that allow them to attack you on their next turn. It is not uncommon that a soldier they spotted will be attacked by 5 or more aliens that are all in positions from where they can peek out, shoot and hide again. The disadvantage for them would be that they also give away a lot of their own positions that way.

So it's hard to say if 0 or 1 is really harder. I'd say it depends.

Oh, and if it isn't difficult enough for you, you can enable "Bug hunt mode for AI".
The AI's ability to find your units on their turn and find good cover is much better when they actually know (via cheating) where your units are on the minimap as opposed of having to make educated guesses. ;)
« Last Edit: April 06, 2025, 01:10:46 pm by Xilmi »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 667
    • View Profile
"Damn, I was just looking for a nice UFO Defence challenge above Superhuman. I'm definitely going to completely disable cheatTurn for this. "Smart AI that doesn't cheat" is a hard thing to make work, but it's what I love."
 and you responded
that was two years ago, I am assuming when you talk about non cheating AI you are talking about Bug Hunt mode?  Did you ever get around to making Bug Hunt aliens a little smarter at searching for and finding Xcom agents?  Perhaps they communicate with eachother or something in Bug Hunt mode now?  maybe they communicate the heat maps or something?  ur reply was a long time ago and i just wondered if u improved it .  im wondering if half the aliens will be randomly wandering around mindlessly while a big firefight is going down, instead of moving to help their team in the fight.   like, if they had radio coms or something

i promise i wont ask any more questions, its just you basically made X-Com 2.  Brutal AI almost needs it on ufopaedia on how some of the features work, but you've done enough work already!
There is no "randomly wandering aorund mindlessly" in BAI. Whether you use bug-hunt-mode or not. The aliens always "communicate with eachother". That was pretty much the point of all of this. They play like a team just like the player plays their soldiers. If one alien spots one of your units all of the aliens know where your unit is and they calculate if they can attack them and where the best hiding-spots relative to the units, they have knowledge of, are.

The bug-hunt-mode differs in the sense that they don't need to spot your units in order to know whether they can move to a place from where they can attack them or where they can avoid being found on your next turn. With how good the AI is at determining good hiding-spots, I'd say giving the AI bug-hunt-mode is even a bit too much of an advantage.

And even harder than that is using fire-mode 4. This is not just knowing where your units are on the map, it's seeing them all the time.

The biggest improvement over the version from the time that post you cited likely is from, is the complete revamp of the cover-detection-logic. It is really sophisticated now and actually takes a considerable amount of processing power.
Because on Aggressiveness 0 and 1 they basically think one move ahead to determine how good cover-locations are.

This helps both the cheating- and non-cheating variant tremendously to stay save. It helps the cheating one even more. A common technique against the non-cheating one is to let them know a few of your units you keep in good cover and then flank them from behind. However, the seeking-logic has also be improved to check for potential flanks. But it's not perfect.
With cheating you can't surprise flank-them. They don't have to expend TUs in order to check if they are being flanked.

Basically the 3 phases I mentioned earlier:
seeking-phase, attacking phase and repositioning/hiding phase

There is no seeking-phase when bug-hunt is active. They don't have to expend TUs to look around because they already know where you are. They just attack or reposition.

You can try to replay the same mission with and without that enabled to see if you need the increased difficulty of the aliens always knowing where you are to make it challenging.

Also: I don't mind your questions at all. For open-source-developers questions, feedback and let's-plays is all they get as reward for their efforts! ;)
« Last Edit: April 06, 2025, 01:34:33 pm by Xilmi »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 667
    • View Profile
I did some testing with the bug-hunt-mode and it actually does some things that can be considered less smart.

Mostly going for attacks that are likely to fail and leave the unit in a vulnerable position.

Sometimes there's some odd angle from where you can attack a unit through a window or so. And the AI knows this angle exists because it knows your unit is there. So it goes for it and does it's 13% shot just to not have enough TU to go back somewhere safe.

So technically there's room for improvement in that regard. Probably better not to take all possible attacks.

Edit: Upon further investigation: That's not what happened. The AI already has safeguards against exposing itself like that. But there was another mechanism, which I had forgotten: The reaction to the enemies' panic. Seeing units on the enemies' team panick bumps up the AI's aggression-level because players usually tend to flee when their soldiers panick. This way the AI tries to capitalize on the panic.

So it's working as intended afterall.
« Last Edit: April 07, 2025, 01:18:42 am by Xilmi »

Offline xenoroyal

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Good lord I now have some experience.

Targeting 1.  Agression 1.

Large scout.  They didnt all pile out into my firing line after round 20.  Guess it didnt matter.  single aliens would pop out and destroy my "high reaction" firing line anyways.

So there were two aliens in the Large scout, one behind each of the two doors after you enter.  every turn they would pop out, shoot, go back in.   Theres no way I could assault that.  Those two guys decimated 8 of my guys.

and holy shit do they camp buildings, its like assaulting the alamo.  I decided on bringing 2 Rocket Men just to pound the buildings into the ground, probably gonna bring rocket tank too.

this is a whole different ball game, but i think playing on aggression 2 might be too easy, since i could just camp em out like in basic right
« Last Edit: April 07, 2025, 08:01:32 am by xenoroyal »

Online jnarical

  • Captain
  • ***
  • Posts: 99
    • View Profile
Good lord I now have some experience.

Targeting 1.  Agression 1.

Large scout.  They didnt all pile out into my firing line after round 20.  Guess it didnt matter.  single aliens would pop out and destroy my "high reaction" firing line anyways.

So there were two aliens in the Large scout, one behind each of the two doors after you enter.  every turn they would pop out, shoot, go back in.   Theres no way I could assault that.  Those two guys decimated 8 of my guys.

and holy shit do they camp buildings, its like assaulting the alamo.  I decided on bringing 2 Rocket Men just to pound the buildings into the ground, probably gonna bring rocket tank too.

this is a whole different ball game, but i think playing on aggression 2 might be too easy, since i could just camp em out like in basic right
Use grenades. Smoke grenades. Mines. Enable option for powerful high explosives in mods and breach through the ufo’s hull somewhere else.

Maybe, final reaction time depends not only on unit’s reaction but on time needed for shot, so you should use “fast” weapons (hard to compete with plasma pistols anyway). I’m not sure this is the thing, should check ufopaedia.org for reaction fire article.

UPD: I was wrong, the formula is
Quote
Current Reaction Score = (Reactions Stat) × (Current Time Units / Max TUs)
« Last Edit: April 07, 2025, 08:45:23 am by jnarical »

Offline xenoroyal

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Wow i had really thought that pistols were better for reaction fire. Im going to be firing soldiers looking for high reaction guys a LOT sooner in game than normally.

 Yes, i had opportounity to smoke the inside of the ship and I should have taken it.  It looks like proximity mines are going to be used vs sectoids/floaters, at least until i get some better weapons.

honestly its pretty cool how 2-3 of them post up in a defensive position and are playing like a real human.  Its just a whole new ballgame to learn.  Once I get heavy plasma and power suits, im worried my old firing line outside of supply ships still isnt gonna work.  (maybe flying suits to beat the grenades)

I considered the 200 damage charge idea, but I decided im going to try to be vanilla as possible.  I already refuse to use psi.  Im just gonna try to step my game up.

 Im considering finding a mod to make blaster launcher either have 1 WP or be dumbfire like rocket launcher.   I dont really like using it, it feels cheap like psi amp which I strictly never have used.   So if im prone to not using it, I really dont want these motherfuckers using it to its potential.  These ai are FUCKING BASED.

For example, on cydonia superhuman... i just take a guy to max height and bomb every pyramid.  If it was dumbfire, shit would get serious.

Im def using ur accuracy/cover mod, i need every edge I can get.  And im liking the rockets hitting the ground near where i aim instead of flying to the moon.  And the rifle doing 90 degree shots from where i aimed always pissed me off :P


but seriously thanks to you and Xil for being willing to explain how some of this works under the hood.  Normally we have UFOPAEDIA and we get DEEP in that shit with #'s and stats and shit, but we have to rely on you guys taking your time and explaining.  really appreciated

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 667
    • View Profile
When it comes to reaction-fire, what many people don't know is the "mutual surprise"-rule.

I learned about it when writing the AI so I did take it into account.

Basically: When two units spot each other, the one who's turn it is still gets to act first.

For the player: The turn gets interrupted and you get the little red icon in the corner showing you, you see an enemy. If you shoot immediately the enemy can only shoot back once you are done.

The base-AI cannot open doors without stepping through them. This is one of it's major-weaknesses, which are so easily exploitable.
This way they do not benefit from mutual-surprise and instead get shot by your reaction-fire.

By teaching the AI to open doors via "right-click" before walking through them, they can see you first and attack first. Even if the conditions for reaction-fire are otherwise met.

The base-AI also has randomization in their actions. Instead of attack right when they see something, they can also roll another action, which also allows for reaction-fire. Brutal-AI will attack right away which only causes reaction-fire if the unit they shoot at survives.

BAI will also deliberately avoid walking through areas where it suspects it would be reaction-fired at. E.g. if it opens the door and doesn't see you from inside but suspects or knows you are camping somewhere around the corner, it won't come out to look for you, if it means it would likely trigger reaction-fire.


Tools like smoke-grenades are not something that totally trivializes the game. It's more like they become mandatory to even stand a chance at safely unboarding the Skyranger in many scenarios. There's also quite a bunch of code for the AI to be smarter around the usage of smoke.

"but i think playing on aggression 2 might be too easy, since i could just camp em out like in basic right"
While it is a lot easier than 1 or 0, It's still significantly harder than basic. They still won't walk into your reaction-fire-traps. But they don't think one turn in advance. So they only try to avoid your direct line of sight. They might get really close to you and then get surprised by your units who look around a corner. For example if you stay in the Skyranger aliens on aggression 2 might come really close to it, as long as they don't have to walk directly through your vision.

They still won't just stand around somewhere doing nothing. If you do nothing on your turn and just hope for getting reaction-fire, the Aggression 2 AI will still beat you up by using the aforementioned mutual-surprise-rule.

If you use firing-mode 1 (instead of 2 or 3) the blaster-launcher-aliens are nerfed tremendously. Blaster Launchers mostly benefit from being able to shoot them without seeing your enemy yourself. When this isn't enabled, they are much less scary.

Online jnarical

  • Captain
  • ***
  • Posts: 99
    • View Profile
TBH the idea of direct-fire blaster launcher seems interesting to me. In original, blaster launcher trivialises game for you and at the same time leads to mass xcom casualties which you cannot prevent. This is just not fun game design. I mean, it IS fun to wipe out whole maps entirely but it changes the game drastically making you lose interest in playing the game. Same with Psi - it’s fun at the beginning but every time I drop the game shortly after I got to it (or just won it in a matter of hour)

It could be fixed - by using mandatory direct LoS for Psi, not allowing “chaining it” by captured unit, and maybe limiting the effect. Imagine when you’re storming UFO, found the enemy and instead of shooting and possibly getting reaction, your leading unit uses PSI to knock off reaction fire or reduce accuracy, and your next one shoots at enemy.

Offline xenoroyal

  • Squaddie
  • *
  • Posts: 9
    • View Profile
I just think no psi amp is the fix.  I dont think alien AI vs me is TOO HARD.   I want it to be THAT HARD.  I want a sectoid leader to completely fuck my terror mission because i messed up.   I want ethereals to be scary if i didnt prepare in time.

Xilmi agrees and very oddly takes psi amp out of his prefered game settings ( i couldnt believe he did exactally what I was doing) 

My strongest feeling is that a direct fire blaster launcher would be way more balanced.   It could be 100% accurate, it could be pretty accurate, it could have same stats as rocket launcher.  It could have 1 WP.  lots of ways to do it to make game more fair.  but thats the most game shattering change I could think of after removing PSI amp and fixing AI.  I think it has some kind of hidden launch mode, refered to in ufopaedia as aimed fire.  id still want it to take just as long (or longer) to reload and fire

Is there a way I can open a text file and just change the stats of blaster rifle to those of the rocket launcher?  Just with a way stronger rocket
« Last Edit: April 08, 2025, 05:43:24 am by xenoroyal »

Online jnarical

  • Captain
  • ***
  • Posts: 99
    • View Profile
Is there a way I can open a text file and just change the stats of blaster rifle to those of the rocket launcher?  Just with a way stronger rocket
Easy. I attached the mod. It's still a "launcher" weapon, with waypoints and a designated button "launch". Maybe it could be easily changed to direct fire in ruleset - you could look into /standart/xcom1/items.rul, experiment with it, and then copy needed lines to attached mod. I changed waypoints count to 2, and there's the reason. The thing is, launcher accuracy is treated in game code differently, and has low value to make a chance for rocket to drift between waypoints. In other words, it's designed to use waypoints, and hardcoded that way. I've just tried to test the tank with 1 waypoint, extremely low accuracy combined with devastating power makes it almost unusuable. And with 2 waypoints - blaster weapons are still extremely powerful, just not game-breaking anymore. You still couldn't open all the doors on map with mind controlled aliens and then launch blaster rocket along the corridors as you like. And 2 waypoints restriction makes it really hard do accurately fire at long distances, due to low accuracy. And of course, no more launching this thing in narrow spaces.

I could "fix" that launcher accuracy code but this is really out of scope of Realistic Accuracy.
« Last Edit: April 08, 2025, 10:09:49 am by jnarical »