aliens

Author Topic: [SOURCEMOD] Brutal-OXCE 7.12.1  (Read 75065 times)

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 605
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.0.2
« Reply #225 on: July 12, 2023, 12:35:24 pm »
Xilmi, I'm not english native speaker, I do what I can.
Incase you are using a translation-tool, I'd personally recommend ChatGPT. I've been getting some pretty good results with it.

But the basis is set clear: more slider tools for modders to adjust -  more attention BAI will eventually get.
I think majority of attention is likely generated by streamers like Beagle, Speedislife and 14SilverX who stream existing mods like Rosigma, XCF and Hardmode Expansion with Brutal AI enabled.
It's also not as if I didn't listen if I was contacted by mod-authors themselves.
But adding "more slider tools for modders to adjust" without modders even asking for them and while none of the modders have even used any of the already existing ones simply doesn't seem like a worthwhile investment of my time. Especially since I'm getting enough feedback for other things that affect everyone who already uses it rather than the ones who say: "I would maybe use it if it had this feature for modders"

I've seen so much things that are wrong in nature.

Like, ant behavior for groups of enemies, no long-range camping at all for guys with sniper rifles,
Enemies run from the door into night field which is lighted with flares, one after one, while other 3 doors are present, two of which aren't lighted. (Bunker from Red Dawn HQ)
I didn't even have to get down the stairs into the fortified part of the base, where second part of the battle has to be set.
This kind of feedback about questionable behavior from the AI is already much more valuable to me than requests for more modable tools.
I can draw direct conclusions from them.

Avoiding light-sources in night missions is something that can easily be fixed and would positively impact everything from base-game to mods. I just didn't really think of that, since I mostly did benchmarking in daylight. Giving a score-penalty to all tiles that are illuminated above the visibility at night-threshold is a good idea in order to avoid scenarios where enemies keep themselves revealed unnecessarily.

As I said in my reply to Juku121, I think there is logical room to add an aggressiveness lower than 1 that is particularly about camping. So if players like it much more to search for the enemies that are camping indoors instead of being confronted on the outside, they can use that. I think I will add this.

Ant-like behavior and snipers not camping is something that needs to be discussed in more detail and maybe with examples in video- or ideally save-game format.

The latter could refer to the sniper coming closer once you break line of sight to them. This would probably not even fully be addressed by the intended behavior for 0 aggressiveness. I suppose this could be because the regular behavior is to still try and hide.
I'm aware that there is a sniper-tag for modding, that is currently ignored by BAI. It could be used for a specifc kind of behavior that is about maximizing range while at the same time avoiding to break line of sight.

Ant-behavior may refer to trickling out of buildings and ending out in the open while not in range to attack. This should not happen on any aggressiveness below 3 and could relate to improper mapping of aggressiveness when inherit is activated.
The plan is to change the mapping to not use the max aggressiveness and leave it to only work when manually picked or for units with leeroy-flag.

Offline Juku121

  • Commander
  • *****
  • Posts: 1639
  • We're all mad here.
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.0.0
« Reply #226 on: July 12, 2023, 01:18:30 pm »
The primary one that comes to mind is a preference for having a roof above their head.
Won't work for making aliens camp on top of their UFO, snipers in open-topped towers, or demons at their summoning circle.

That can also be coupled with disregarding "getting closer to the player" as a factor for looking for hiding-tiles.
This could be inserted at the lower end of the aggressiveness-scale.
I could add an aggressiveness 0...
These sound more like it.

I for one have always liked close-quarters combat where you've got to dig the enemy out of their positions while sightseeing all over the map. JA2 had an entire mod dedicated to urban combat back in the day.

Ant-behavior may refer to trickling out of buildings and ending out in the open while not in range to attack.
I think it refers to the enemy always taking the same routes even when they've been getting shot up for it. Not sure how you could avoid that if you don't add randomness or some sort of memory to the algorithm.
« Last Edit: July 12, 2023, 01:22:24 pm by Juku121 »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 605
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.0.0
« Reply #227 on: July 12, 2023, 03:11:41 pm »
Won't work for making aliens camp on top of their UFO, snipers in open-topped towers, or demons at their summoning circle.
Well, yes. Taking cover and breaking line of sight is pretty-much at the core of what my AI wants to do. So being forced to stick to a place that doesn't provide cover would be taking away a big part of what it is about.
Theoretically modders could enforce this by using-base-AI with these units and doing whatever is currently done to make base-AI to do this.
But this really once again gets into the territory of contradicting my design-goals. Sticking to a place that offers a tactical advantage and still remaining adaptive is something I can get behind with. But sticking to a place because they are told to, even if doing so is obviously suicidal, is not something I'm willing to invest my time for.
In general: I'm much more willing to work on stuff that every user is likely to experience and that don't require someone to first make a mod to use them.

I think it refers to the enemy always taking the same routes even when they've been getting shot up for it. Not sure how you could avoid that if you don't add randomness or some sort of memory to the algorithm.
If a unit gets shot on their way to somewhere, this should update the threat-map for everyone else and thus impact where other units are willing to go. Unless it's running on Leeroy/Max aggressiveness, where the threat-map is ignored.
By changing the mapping of the aggression to the behaviours in a way that max-aggression no longer will be used except for Leeroy, this issue shall be alleviated. If not, I'd need concrete examples of where it still happens to investigate.

But stuff like this shows also the problem with making too many things optional. It becomes increasingly difficult to tell intentional and unintentional behavior apart. Savegame no longer is enough for debugging, I also need the settings under which it happened.
Fixing stuff that happens on non-default-settings would take up more and more of my time the more settings there are.

I'm rather considering taking some of the options out again. Targetting-Mode for example or Bughunt for AI. The inherit-option could be renamed to something like "respect mod-options" and then include the explosive-delay and whether Leeroy/sniper/spotter-tags do something.

Offline Abyss

  • Colonel
  • ****
  • Posts: 327
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.0.2
« Reply #228 on: July 12, 2023, 09:55:33 pm »
I write w/o translators.

So. When I previously asked whether you have played XCF or not, that wasn't idle curiosity.
In early to mid game, nighttime operations are preferred to player, and balanced such. Because you will be, literally, wiped out doing assault daytime. Visibility options (flares, fire and flashlights) are the same tools of victory for player, same to mines, proximity grenades, mind control and armor.
In the beginning of XCF campaign, you don't have other tools except enemy spotting options.

I suggest we call tools of victory "ToVs".
It will be very unfortunate to completely lose ToVs, but they shouldn't be very OP. Light option is OP because BAI doesn't pay too much attention to lights. Dumb AI doesn't either, but due to randomness of waypoint patterns, the player feels like DAI-controlled enemy units are more chaotic and "living" than BAI-units, which just try to eliminate player, no matter what.

One more strange pattern I've got recently.
Underwater mission vs Aquatoids, who rushed from their USO towards my submarine, one by one, divided by 6-7 tiles, letting me open the doors and kill them one by one (as they rarely preserve TU's).
What is even more strange, if player skips couple of turns, doing nothing, aquatoids surround the exit within the vision range (4-8 tiles away).
What is even more strange, they are completely helpless on their relocation.
What is super-strange here, from player's perspective:
- Aquatoids have 25(30) vision, PSI options (cross-wall vision, panic attacks and mind control) and strong weapons
- Aquanauts have 7 underwater vision.
The best option for BAI is rush and kill.
The best option for Aquatoids, in common sense, is to camp beyond player's vision and force player to leave the map. If player is locked in a condition, when he cannot pass the doors, it's also enemy victory.
Save is attached.

bai 7.0.2.
xcf 3.0.2
Aggressiveness 1
Firing method 2
« Last Edit: July 12, 2023, 10:02:44 pm by Abyss »

Offline Juku121

  • Commander
  • *****
  • Posts: 1639
  • We're all mad here.
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.0.2
« Reply #229 on: July 12, 2023, 10:49:06 pm »
But this really once again gets into the territory of contradicting my design-goals. Sticking to a place that offers a tactical advantage and still remaining adaptive is something I can get behind with. But sticking to a place because they are told to, even if doing so is obviously suicidal, is not something I'm willing to invest my time for.
Fair enough. But remember, modders can make maps and enemies with specific goals in mind. They might have a relatively open forest with a sacrificial circle in the middle, and the enemies are supposed to guard the sacrifices, not leapfrog around flushing out intruders. You can have Commanders in UFO control rooms who are supposed to stay put and present a nasty final surprise to the player or just provide psionic backup and psi vision to the rest in relative safety. You can have a ghost who's largely invulnerable to conventional weapons haunting his grave and ignoring your fire instead of sneaking around corners and trying to jumpscare your troops.

If BAI can support that with a 'tethered' aggressiveness level, it would make it much more 'compatible' with these kinds of interesting unconventional missions, even if the overall challenge might get lowered a bit.

In general: I'm much more willing to work on stuff that every user is likely to experience and that don't require someone to first make a mod to use them.
Some of the megamods already have such kinds of missions. They're not perfect due to vanilla AI being opaque and, well, what it is, but they're already there.

If a unit gets shot on their way to somewhere, this should update the threat-map for everyone else and thus impact where other units are willing to go. Unless it's running on Leeroy/Max aggressiveness, where the threat-map is ignored.
Ah, so there is a memory mechanism.

I think it might actually be max aggressiveness, since a whole bunch of XCF enemies have elevated aggression stats without beeing leeroys due to vanilla AI being too passive.

I'm rather considering taking some of the options out again. Targetting-Mode for example or Bughunt for AI.
Isn't targetting mode selection a big part of how BAI actually functions? How would taking that away work?

In early to mid game, nighttime operations are preferred to player, and balanced such.
Not really. Smoke and hard cover are viable alternatives, especially with smoke grenades being moved back to Promo I in 1.8 or so. And the whole mod has never been balanced not developed with the goal of having balance in the first place.

Visibility options (flares, fire and flashlights) are the same tools of victory for player...
Flashlights are not tools of victory, they're a way of showing the enemy where you are. :D

...are more chaotic and "living" than BAI-units, which just try to eliminate player, no matter what.
Well, that's almost the entire point of this fork. :)

Offline Abyss

  • Colonel
  • ****
  • Posts: 327
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.0.2
« Reply #230 on: July 12, 2023, 11:31:59 pm »
Flashlights are not tools of victory, they're a way of showing the enemy where you are. :D
If you keep them on. On my first playthrough I abused flashlight on/off before shooting and then fired without line of sight.
As my troops were out of enemy's sight, no reaction fire followed.

But, that trick doesn't work with BAI, as enemies are pro-active and shoot back to the place from all sides.
I have to notice,
I see how BAI is better, but not yet see much surprising tactics from it, apart from it's usual all-side dynamite bombardment.
Which is overhelming, given weird OXCE toss mechanics.

Example is right here: soldier with a rifle and a grenade, all 50 stats, shoots enemy 30 tiles away - misses forever, then tosses grenade and grenade, to our surprise, arrives right under enemy feet with plain 50% chance.
Same to enemy - 30 enemies miss all shots, then three grenades from outside the wall get straight under your best soldiers.
« Last Edit: July 12, 2023, 11:34:57 pm by Abyss »

Offline Juku121

  • Commander
  • *****
  • Posts: 1639
  • We're all mad here.
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.0.2
« Reply #231 on: July 13, 2023, 09:00:37 am »
If you keep them on. On my first playthrough I abused flashlight on/off before shooting and then fired without line of sight.

As my troops were out of enemy's sight, no reaction fire followed.

But, that trick doesn't work with BAI, as enemies are pro-active and shoot back to the place from all sides.
Lack of reaction fire is a good point. But otherwise, merely turning flashlights on and off lights you up for anyone with a daytime LoS. And once you're spotted, you remain spotted for a while, depending on enemy intelligence. Worse if the spotter was an actual spotter for snipers, and there are snipers around.

Vanilla snipers also shoot back at spotted but unvisible troops, but much less consistently than BAI. Although I guess the reaction fire part still works.

Which is overhelming, given weird OXCE toss mechanics.
Yeah, the ridiculous range and accuracy of grenades inherited from the original are my pet peeves as well. You can limit grenade ranges and lower the accuracy via 'throwRange' and 'throwMultiplier', but that's a bit tedious when there are a zillion grenade types around.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 605
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.0.2
« Reply #232 on: July 13, 2023, 11:17:26 am »
So. When I previously asked whether you have played XCF or not, that wasn't idle curiosity.
I played through January and lost plenty of cars and agents. But I've watched Speedislife's playthroughs on BAI which showed me what I was doing wrong. The meta mostly revolved around hit and run. Often only staying one turn and leaving before the AI gets to move to get some XP for the agents and only doing melee-units until getting access to armor.

One more strange pattern I've got recently.

bai 7.0.2.
xcf 3.0.2
Aggressiveness 1
Firing method 2
Your screenshot says that inherit aggression is enabled. This means that Aggressiveness of 1 is overruled by what's in the rul-files for these units. So they play like Leeroy-units.
This will definitely be changed next patch. The inherit aggressiveness gets a new option on the lower end and the maximum it can get from inheriting is "2" except when Leeroy is enabled, only then the most aggressive behavior will be employed.

Offline Abyss

  • Colonel
  • ****
  • Posts: 327
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.0.2
« Reply #233 on: July 13, 2023, 02:03:24 pm »
I thought that's just for zombies & Cryssalids, etc.
Not sure, have to test if zombies will play hide'n'seek with me on aggressiveness 1.

This will definitely be changed next patch. The inherit aggressiveness gets a new option on the lower end and the maximum it can get from inheriting is "2" except when Leeroy is enabled, only then the most aggressive behavior will be employed.
What about Leeroys from vanilla? The enemies, that are supposed to move towards on you, no matter what?
Actually, the BAI-only code block I was trying to describe, could solve that problem.
BAI checks rulesets, and if modder adds BAI-related aggressiveness for each enemy unit, then everything go smooth and nice.
If not modder himself, anyone can do it and paste the patch to the forum. Then, there comes little from player's end. Just play and watch the story that megamod generates. 
« Last Edit: July 13, 2023, 02:12:25 pm by Abyss »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 605
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.1.0
« Reply #234 on: July 13, 2023, 08:13:59 pm »
Brutal-OXCE 7.1.0 - Silent Steps of Stealth

There now is a new aggressiveness-value at the lower end of the spectrum, aggressiveness 0.
In this mode the AI will try to avoid being outdoors and it will not try to inch up on the player's units at all and instead exclusively look for how save they consider a hiding-spot to be. They will still peek out and attack when possible but usually most of them stay close to where they spawn until their enemies get near.

The mapping of the aggression-stat to the Brutal-AI aggressiveness when using the inherit aggression-option was changed:
Aggression 0 and 1 map to their equivalents in brutal-AI-aggressiveness.
Everything else maps to 2.
This means the sweep-mode-behavior now only happens if you either manually set the aggressiveness to 3 or the unit has the LeeroyJenkins-flag set.

As the LeeroyJenkins-mode is closely tied to Aggressiveness, it now also is only is taken into account by Brutal-AI when iherit unit-aggression is enabled.

Fixed a bracket-error in the code that decides whether a unit shall kneel down.

Fixed a bracket-error in the code that determines whether to reserve time-units for hiding.

Units controlled by Brutal-AI will now actively avoid light-sources in the darkness instead of ignoring their existence.

AI-units that would survive a proximity-grenade with more than half of their health, such as Lobstermen in Terror from the Deep, will now volunteer to walk over them in order to disarm them.

The AI now realizes that it is save to open a door if a proximity-grenade is one tile away from it and that they won't step onto it yet by doing so.

Fixed an issue that caused the code for checking how save a path is in terms of probable reaction-fire to only be run when the proximity-grenade-avoiding-logic was disabled.

Fixed an issue where blind-grenades were thrown at locations where targets were spotted several turns ago and likely long since have walked away instead of just when they were spotted during the last turn of the other faction.

Offline Abyss

  • Colonel
  • ****
  • Posts: 327
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.1.0
« Reply #235 on: July 13, 2023, 11:28:23 pm »
BTW I further played with inherit aggression mode off, aggressiveness = 2,  and enemies mostly stood on their places and were actively seeking for cover. Moreover, they tried to take places for some reaction-fire traps.
I liked it more.

Units controlled by Brutal-AI will now actively avoid light-sources in the darkness instead of ignoring their existence.
Sounds good, but what then is priority of BAI: to kill visible enemy, while standing near the light source, or run away?
I presume both scenarios will result in reaction fire from player's units.

The AI now realizes that it is save to open a door if a proximity-grenade is one tile away from it and that they won't step onto it yet by doing so.

The proximity grenade avoiding still can be turned on/off, right?

I'll upgrade and play further next week, to give the feedback, if you interested.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 605
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.1.0
« Reply #236 on: July 14, 2023, 10:34:26 am »
Sounds good, but what then is priority of BAI: to kill visible enemy, while standing near the light source, or run away?
I presume both scenarios will result in reaction fire from player's units.
A brief description of how the decisionmaking about the movement works might bring some clarification here.
When it iterates through all tiles it could walk to it evaluates them for different purposes. These purposes have different priorities.
Highest one is positioning in order to be able to attack. For that one they need to already know a position of a target. So if they can't see your units, that won't be taken into consideration.
If they need to expose themselves to light in order to attack a visible target, they would do so. If there are several positions to attack from, the preference is usually for the one that they need the fewest amount of TUs to get to in order to minimize reaction-shots. They now also will give a bonus to tiles where they wouldn't be exposed by light for that.

The other priorities are for different forms of peeking, given there's enough TUs left to hide again after and then for hiding. Hiding also has different priorities within itself. Those are impacted by the aggression. For example aggression 0 uses a different algorithm for hiding than aggression 2. 0 just wants the savest spot possible, whereas 2 wants a compromise between safety and being close to the enemy.

Aggression 3/Leeroy skipped the peeking and hiding-phase completely and use a fallback-score which just gets better with getting closer to the enemy.

The impact of darkness is that it gives a significant bonus to all hiding and peeking-scores. So they will avoid going to the light-sources for these purposes. But they won't miss out on an opportunity to actually attack when presented with one as that has the highest priority.

Actually it's a bit more complicated since 7.0.0 because it remembers parts of the results of the last pass to see if it still has enough TUs to break LoS.
 
The proximity grenade avoiding still can be turned on/off, right?

I'll upgrade and play further next week, to give the feedback, if you interested.
Yes, can still be turned off. I did not remove any options so far. Just moved respecting Leeroy to the inherit-aggression-option, which now should be a lot more usable due to no longer putting a large amount of units without the leeroy-flag into leeroyesque behavior.

I am always interested in feedback as long as it is in accordance to my goal of making the AI stronger.

Offline Abyss

  • Colonel
  • ****
  • Posts: 327
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.1.0
« Reply #237 on: July 14, 2023, 02:17:37 pm »
Just tested the last version in zombie mission, aggressiveness 2.
Works as intended.

BTW, in personal, I think BAI very much lacks Aggressiveness level between 2 and 3.
On level 2 units prefer to take keypoints, if no players units are known as possible targets. The next amount of turns they just wait, standing there. 
Example: sectoids and aquatoids, known for their low melee, but available psi-vision (they see through walls within 20-30 range).
The weird things about the picture below:
- aquatoid stands in the tile near to exit, so reaction fire, if someone walks in, will result in misses due to OXCE close-combat mechanics;
- aquatoid with his vision of 25 can actually stay on open terrain, ready to react, beyond visibility of player units.
- once BAI holds all keypoints, there's nothing much happens. E.g. if player skips 10 turns in the closed vehicle, nothing particular.
Only when player unit comes to the place where it can be damaged, action takes place.
There must be something pro-active, even if potentially harmful to enemy units, but less suicidal than aggression 3.

I think camping AI is good, but again, what makes the game? Excitement of unpredictability. Whether it will do so or so?
What do you think? Still wowing for some randomization, this game isn't chess, for good or bad.

I am always interested in feedback as long as it is in accordance to my goal of making the AI stronger.
You can make such strong AI, that no one will actually play the game past first 20 minutes.
Think of mass market segment, not game for 3 geniuses around the globe.
« Last Edit: July 15, 2023, 03:57:30 am by Abyss »

Offline panzer

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.1.0
« Reply #238 on: July 18, 2023, 02:33:09 pm »

BTW, in personal, I think BAI very much lacks Aggressiveness level between 2 and 3.

For certain missions, such as protecting a mansion, defending a base, and some others, this would be really useful. aliens with aggression 1, especially those with a psi vision like Ethereals, try to attack when one of them sees your units. Enemies with an aggression level between 2 and 3 could act as scouts for aggression level 1/2 and create a more attacking style of combat.
 Of course, units with this aggression should also sometimes use cover and preserve  TUs. However, their priority is to move forward to detect the enemy.
« Last Edit: July 18, 2023, 02:36:25 pm by panzer »

Offline eagles980

  • Squaddie
  • *
  • Posts: 9
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.1.0
« Reply #239 on: July 19, 2023, 05:59:29 pm »
Major props on implementing the tough units purposefully triggering mines idea, Xilmi. Quite enjoying all the other updates and improvements you've made thus far as well.

Have a couple questions, though: Would you be willing to make the better pathing for UFOs on search missions default or at least separate from 'aggressive retaliation' option? The fact that this also triggers retaliation missions on landed craft and means UFOs also always search for bases means it just never goes on for me despite the objective improvement.

Also is there a meaningful difference if one decides to manually designate the targetting mode of melee units? I wouldn't expect there to be since they need to get into visual range to attack you anyway but want to make sure. Made a mod for use with 'inherit unit aggression' base game that along with assigning sensible (to my eye anyway) aggression levels to the individual units also designates which units can target what based on their class and abilities. Essentially bulky units and soldiers position themselves closest to your units as the heavys / defacto scouts with the rarer, more specialized units having the ability to target what these guys see with only leaders generally being able to blindly target your units based on their relative position and activity thanks to their big brains (specifically thinking about blaster bombs.) Expanded this role to navigators who won by default (engineers get blaster bombs and I want to contrast their lack of "skill" using them with the leaders, medics I want being more passive) so there's a at least a theoretical threat of the AI blindly grenading your units on regular missions.

Edit: Updated the mod to toggle 'Leeroy Jenkins' mode properly.
« Last Edit: July 23, 2023, 06:04:33 am by eagles980 »