Author Topic: [WIP][SOURCEMOD][OXCE] Brutal-AI  (Read 20191 times)

Offline Legacy

  • Sergeant
  • **
  • Posts: 20
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #45 on: November 26, 2022, 01:44:20 am »
I think it would be neat to have a random chance that the AI uses new tactics, old tactics, sneaky tactics, etc. just to mix up battle even more

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #46 on: December 01, 2022, 10:08:15 pm »
There's now a new version that also adds an option to make UFOs in air-to-air-combat more intelligent.
Given how one-dimensional the air-to-air-combat is, having the UFOs make the best possible decision there is probably not really a desirable feature so it's not enabled by default.
https://github.com/Xilmi/OpenXcom/releases

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #47 on: December 02, 2022, 11:37:31 pm »
https://github.com/Xilmi/OpenXcom/releases

There's now an option to play without AI-cheating and another parameter to modify their targeting-behavior.

Offline Rangerh

  • Colonel
  • ****
  • Posts: 126
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #48 on: December 03, 2022, 02:30:55 pm »
Being able to adjust the AI to your needs is truly great ! Thank you for implementing those options.
A question : OXCE features a quick battle mode to quickly setup a battle, as i don't know how the AI is coded, will the brutal AI works on this game mode or is it only for the campaign battlescape ?
« Last Edit: December 03, 2022, 02:32:50 pm by Rangerh »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #49 on: December 04, 2022, 08:05:17 pm »
Yes, it does work in the quick-battles. That's how I primarily test it.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #50 on: December 06, 2022, 09:21:07 pm »
1.4.0 available:

https://github.com/Xilmi/OpenXcom/releases

In Non-omniscient-mode visiting or seeing a tile that an enemy unit was suspected to be at will now make the AI realize that the enemy is not there and it will keep searching.

Lowered the prerequisite of pre-priming grenades. That will happen much more frequently now.

Completely new hide&peak default-behaviour that is much more about safety and getting the first-strike. AI will avoid open territory but still seek for spots to perform this behaviour on.
However, there is a morale-based "flipswitch" that turns the AI back into sweeping-mode, where it chase down enemy-units.

This sweeping-mode can be enforced by mods to always be active by enabling the unit's Leeroy-flag.

The AI switching between two modes of operation based on morale creates more dynamic and immersive gameplay than sticking to one behaviour would have.

Fixed that clearsight and quicklineoffire-functions did not consider terrain-elavation which could cause units falsely thinking they are hidden when standing on a hill, as they are common on desert and forrest maps.

Fixed a crash that could happen at the end of a mission and was introduced by one of the previous versions.

Offline Juku121

  • Commander
  • *****
  • Posts: 1798
  • We're all mad here.
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #51 on: December 06, 2022, 10:07:11 pm »
Completely new hide&peak default-behaviour...
Does this interact with sneaky AI in any way? Is the sneaky AI used for brutal AI?

This sweeping-mode can be enforced by mods to always be active by enabling the unit's Leeroy-flag.
Do leeroys with ranged weapons still charge into melee? Would make this option kinda useless.

Offline Rangerh

  • Colonel
  • ****
  • Posts: 126
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #52 on: December 07, 2022, 01:04:12 am »
Gave a test with the v7 of my save from the previous page of this thread and noticed it the loading time for the 1st AI turn is roughly the same as on that previous Brutal AI .
I decided to play out this battle to the end this time to see the AI behaviour and grouping attack
First as expected the turn time go lower as AI enemies are dying.

But in term of strategy while with the default AI the mission is still winnable, with BrutalAI that mission is pure impossible to win hell :D

I liked a lot the AI deciding to attack in group (and that's also make it insanely hard in this mission considering the very high number of AI troops) :D with them outnumbered me by far it was really good strategy for the enemy to attack in group like that, as there's nowhere near the firepower to contain such a full scale assault before the enemies weapon tear your troops down .

Spoilerwhen you see that you know your squad is just going to die:


I observed some of those flying enemies really liked to fly very high (i don't think the default AI fly that high) and drop the various type of grenades they were carrying. It's a funny equivalent to a bombing run with airplanes , though not much funny for my poor troops, fortunately with their good armor they managed to survive for a while that insanity.

Spoilerin the end things we still did some good but it didn't worked out nicely for the player:


I wish i had the better troops and weaponry from my current run with that mod, but even with those older weaponry it was very fun to fight what went from a hard battle in default AI into an impossible one with Brutal AI.

So as a conclusion, it's frankly great and defintively give the feeling the AI is actually attacking and move in squad now, but i guess it also mean some mods will have to tone down on the enemy number now (as those mods increased enemy numbers were to increase difficulty) but now it's unchained defeat masochism and pain :D
Will have to play without mods next time to enjoy fully how the battles go witha a bit less enemies.
« Last Edit: December 07, 2022, 01:26:29 am by Rangerh »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #53 on: December 08, 2022, 08:03:59 pm »
https://github.com/Xilmi/OpenXcom/releases

Fixed some issues with regards to fleeing and non-cheating AI not working properly.

Being aware of a valid target will now also trigger switching into the sweeping-mode.

Renamed and changed the "Dogfight AI" to "Enhanced dogfight behaviour".
It no longer impacts UFOs retreat-behaviour and makes your buttons disappear. It only makes sure that faster UFOs get into firing-range once they are being fired at.

With brutal AI enabled successfully concluding a mission against a landed UFO will now have the same chance to trigger retaliation as shooting down an UFO.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #54 on: December 08, 2022, 08:11:32 pm »
Does this interact with sneaky AI in any way? Is the sneaky AI used for brutal AI?
Do leeroys with ranged weapons still charge into melee? Would make this option kinda useless.
Sneaky-AI impacts path-finding but not decision-making itself. Sneaky-AI might actually harm the intended behaviour of brutal-AI in cases where brutal AI determined it can go somewhere and then shoot. And sneaky-AI taking a longer path leading that plan to fail. So I recommend against combining them. Theorethically there could also be scenarios where it's the better choice. Overall it won't matter too much.

No, the leeroy is interpreted differently with enabled Brutal-AI. It just switches them into the mode where they will expend all their TUs to get closer to a target they can't already attack. There's still an interrupt when they get vision of something and they would then try target-selection again. So no melee-range for ranged-units with it.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #55 on: December 08, 2022, 08:25:18 pm »
So as a conclusion, it's frankly great and defintively give the feeling the AI is actually attacking and move in squad now, but i guess it also mean some mods will have to tone down on the enemy number now (as those mods increased enemy numbers were to increase difficulty) but now it's unchained defeat masochism and pain :D
Will have to play without mods next time to enjoy fully how the battles go witha a bit less enemies.
Thanks for the positive feedback! :)
Yes, I have made pretty much the same observation with several mods I tried. Mods compensate inaptitude of base-AI with greater numbers/better stats. So having both at once will very often be overkill.

Note there's now some ways to customize the Brutal-AI:

You can make it stop cheating completely. Without cheating you can at least sneak up on them and they have to find you first. Of course it won't make a difference on extremely open maps with many enemies.

Then there's also 4 different 4 modes. Mode 1 means they can't attack things they don't see themselves. Mode 2 means they can't retaliate against units they can't see but know are there. Mode 3 is the default, which I think is reasonably smart. Mode 4, is even harder. They don't need to scout at all and can shoot all over the map. :D

"YES/NO/1" would maybe be a compromise that's much closer to base-behaviour but still smarter.
"YES/NO/3" is the best that I still consider fair. Unless people are save-scumming. Then "YES/YES/3" is more fair, as it kinda emulates save-scumming from the enemies.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #56 on: December 14, 2022, 02:17:58 pm »
https://github.com/Xilmi/OpenXcom/releases

This version changes how "Aggressive retaliation" works:

With aggressive-retaliation enabled UFOs searching for a base will now search around the base in a radius of roughly 2670 km from it's actual location. This means you can't hide the base in locations like crete or turkey where there's either no mission-zones at all or the mission-zone there doesn't belong to the right region.

Fixed broken movement-logic that occured when using Targeting-Mode 1 or 4. (It was broken in different ways)
It now takes a bigger morale-advantage before the AI will go into sweeping mode, making it slightly less aggressive and more campy.
Fixed an issue where camping aliens wouldn't look towards the intended direction under certain circumstances.

Offline Anon011

  • Sergeant
  • **
  • Posts: 42
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #57 on: December 15, 2022, 08:30:38 pm »
Wow great work, this is probably the most revolutionary mod ive seen for OXCE in a long long time.
I really enjoyed playing various megamods with the Brutal AI.

Offline CaptainVietnam

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #58 on: December 15, 2022, 11:54:26 pm »
would this overwrite mods that have sniper spotter? Example If I play a mod that uses sniper/spotter along with this mod will the still be snipers follow these new rules of this mod or would they stick to their original roles.

Love the fact that you made this optional so we can tweak it the way we like.

 

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [WIP][SOURCEMOD][OXCE] Brutal-AI
« Reply #59 on: December 19, 2022, 01:17:57 am »
would this overwrite mods that have sniper spotter?
Yes. With Brutal-AI every unit can be both a sniper and a spotter. I didn't like the cheaty-nature of how the normal sniper-spotter logic worked where the AI-units can still shoot you intelligence turns after your unit was spotted. So I wrote my own tracking that runs in parallel and needs current information.

Wow great work, this is probably the most revolutionary mod ive seen for OXCE in a long long time.
I really enjoyed playing various megamods with the Brutal AI.
Thanks! Let me know how it's going or ideally share some footage! :D