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

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.11.0
« Reply #510 on: December 07, 2023, 12:30:41 am »
I guess so. Will keep an eye on this.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.11.0
« Reply #511 on: December 07, 2023, 12:56:57 pm »
Without it, I would have played on lower difficulty.
I played this mission yesterday evening with full intelligence and without spending-TU-to-avoid-reaction-fire-shenanigans.
I normally test vanilla or tftd against sectoids or aquatoids.
My soldiers simply shrugged off most attacks and took 0 damage. When they were hit in the first place. They also very often just one-shot the enemies with reaction-fire.
Most of those enemies have way worse stats and weren't a threat either way.
Eventually they stopped walking into my reaction-shots and I had to move. In the house it got dangerous because they would use melee and actually hit with their auto-shots.
Without full intelligence I suppose eventually all of them would have walked into my snipers. I think in situations like that any randomness can eventually backfire. THe only behavior that was good by them was to not show themselves at all until I get really close. And as long as randomness is enabled this is only guaranteed at the lowest aggressiveness.
Basically: They were way too outgunned for them to have a chance with more aggressive behavior. And morale takes a long time to drop low enough for them to learn their lesson. So this is a bit of a dilemma. Enemies with worse stats relative to the player's units would need to be less aggressive. I think I'll use this save for some more experiments. It's very different from my usual test-saves.

Sectoids have psi-vision. It's not even cheat, it's their feature. The know of biological objects via psi-field. This is X-COM lore.
Maybe in various mods but not in the base-game.

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.11.0
« Reply #512 on: December 07, 2023, 04:23:37 pm »
I played this mission yesterday evening with full intelligence and without spending-TU-to-avoid-reaction-fire-shenanigans.
This one particular mission is not the case.
It is clearly doable w/o loses because entire church of dagon fraction is lowest difficulty among 4 Tier 1 fractions (no armor, no good weapons, only gillmen, dynamite and incendiary grenades actually kill)
I'll bring you the saves with HQ assaults, right after get something.
The strongest are Red Dawn in terms of unit durability and poison grenades/high explosives and Black Lotus with their invisible assassin ninjas, who both have powerful melee and powerful, yet limited-range snap attacks.

Here's the video which shows case where AI could have made much better is used:
1) BS mechanics
2) more grenading
3) thrown flares back
4) Armored vehicles with 200+ TU's and enhanced night vision actually tried to scout our positions.
UPD. and I forgot to tell that pre-primed high explosives are kind of good stuff for suicide runs.
Like, some enemies can sacrifice themselves while taking 2-5 units to the hell as side effect. These thoughts are close to the end of the video.
 
« Last Edit: December 07, 2023, 04:35:13 pm by Abyss »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.11.0
« Reply #513 on: December 07, 2023, 05:38:21 pm »
I looked at the previous-savegame in debug-mode and immediately spotted an issue with the AI's intended behavior. They have a line of fire but due to the combination of "Extender Accuracy" but not "Realistic Accuracy" their is a discrapency.

They go to a position from where they want to shoot from but then realize: OH, my target is too far, I only get 0%.

This has dramatic consequences on the rest of their behavior. They basically waste their move for preparing something that they won't do instead of using their TUs for something useful.

So further reports from sub-optimal XCF-behavior currently are not needed as chances are a lot of the bad behavior of the AI is a result of this mismatch between moving to attack-positions but then not actually attacking.

I also saw another issue related to updating assumed positions of units, where it returns the same location the unit was guessed to be before.

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.11.0
« Reply #514 on: December 07, 2023, 05:54:15 pm »
I looked at the previous-savegame in debug-mode and immediately spotted an issue with the AI's intended behavior. They have a line of fire but due to the combination of "Extender Accuracy" but not "Realistic Accuracy" their is a discrapency.
So, long story short, BAI right now performs as intended with Joy's Realistic Accuracy only?

Quote
spending-TU-to-avoid-reaction-fire-shenanigans
Player is allowed to do so by interface. It's BAI that never considered this as potential player's playstyle. Just opinion.
« Last Edit: December 07, 2023, 10:31:36 pm by Abyss »

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.11.0
« Reply #515 on: December 07, 2023, 09:17:58 pm »
Interesting effect on aliens carrying preprimed grenades. One can kill them and pick/throw their preprimed grenades without even knowing appropriate technology. Fun.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.11.0
« Reply #516 on: December 07, 2023, 11:35:01 pm »
So, long story short, BAI right now performs as intended with Joy's Realistic Accuracy only?
Player is allowed to do so by interface. It's BAI that never considered this as potential player's playstyle. Just opinion.
No, this is not the whole story. I debugged all day long and there were numerous bugs of the AI not working properly due to various reasons. The biggest issue was a totally wrong way of applying the no-LOS-accuracy-penalty. It made the AI think it won't be able to attack from where it stands despite the possibility being there. This lead to a lot of cases where the AI went into your firing-range and then walked back out without shooting.

Another one was related to the reduced overall range of their weapons. They did correctly notice the range but they compared it to the wrong variable reaching wrong conclusions.

I also noticed that units with arcing-attacks checked as if their attacks were normal straight-line-attacks. Now they check for arcing, which makes them way better.

Thing is most of these things were unnoticed because the vanilla-ruleset doesn't really have any of this. No No-Los-penalty, no limited weapon-range and only celatids have arcing attacks.

So overall 7.12.0 should tremendously help them with the XCF-ruleset.

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.11.0
« Reply #517 on: December 08, 2023, 12:34:39 am »
I also noticed that units with arcing-attacks checked as if their attacks were normal straight-line-attacks. Now they check for arcing, which makes them way better.
Even 6.X.X versions clearly used gillmen arching attacks very well from no-LoS terrain. I did playthrough of XCF with it some time ago.
Randomization implementation triggered me to restart, because now I have a little, yet chance to beat SH difficulty.

Checked Github, tremendous work done. Should we again expect hail of bullets and grenades?
Will check it ASAP, sounds too delicious to wait for the weekend

Few fast questions:
1) BAI on extender accuracy (not RA) - works same well as with RA?
2) Will you somehow teach BAI to throw flares back?
3) Will super-high TU units scout (last video shows how Armored cars dispose their TU's instead of best solution)?
4) What was with these gillmen, did they see me? If they did, why human units didn't attack at all this turn?
« Last Edit: December 08, 2023, 01:04:15 am by Abyss »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.11.0
« Reply #518 on: December 08, 2023, 10:52:45 am »
Even 6.X.X versions clearly used gillmen arching attacks very well from no-LoS terrain. I did playthrough of XCF with it some time ago.
The arcing-shot-logic was correctly applied for the "can I attack from where I stand?"-logic. But it was not applied by the "where do I have to go to attack?"-logic.
That's why they sometimes would indeed attack from positions without having LOS. But with the change they should do so way more often. I tested it in TFTD with a terror-mission where there's a lot of these enemies and they killed everyone in one turn. I feared that it would be expensive to call that because they try 10 different angles. But then again it's tile-based not voxel-based so they don't do it as often. And it's done instead of the other line-of-sight-check, so it does not have significant impact on turn-time.

1) BAI on extender accuracy (not RA) - works same well as with RA?
2) Will you somehow teach BAI to throw flares back?
3) Will super-high TU units scout (last video shows how Armored cars dispose their TU's instead of best solution)?
4) What was with these gillmen, did they see me? If they did, why human units didn't attack at all this turn?
1) I did all my testing without RA. So I can't tell for RA for sure. But most issues were AI-bugs afterall, so they should be fixed now either way.
2) Not planned so far. Maybe something for the backlog.
3) Currently the scouting logic works in a way that may not be ideal for scenarios often encountered in mods. On aggressiveness 3 units now should scout much more aggressively at the expense of their own safety. On lower aggressiveness, they will scout but also preserve TUs to go back into cover. And they won't scout very much when they have low weapon-range. The idea is to force you to scout them instead. Playing with sub 100% intelligence however will likely backfire. Because the units who roll a random move might just put themselves out somewhere with no real purpose. Testing under these circumstances is definitely not ideal to make conclusions about the AI's tactics.
Fixed max intelligence and ideally also no randomization is way more conclusive as then you can be sure that the bad moves are actually bad decisions by the AI and not the result of a random-roll.
4) The Gillmen simply didn't suffer from the bug that the other units suffered from as they used an arcing attack and the bug only affected direct attacks. What I did wrong was to subtract the No-LOF-Penalty, which was 50%. That means if their normal hit-chance would have been below 50% they thought they wouldn't hit you at all. The correct application would have been Accuracy *= NoLOFPenalty / 100.0, so halfing their accuracy and not making them think it's negative now. The result was a lot of units simply not attacking at all, when they should have.
So morale of the story: You don't always need a new mechanism of how the AI should behave when they don't work as intended in the first place.

Your savegame definitely was very valuable in improving flaws in the AI.

Wait a minute... Accuracy *= NoLOFPenalty / 100.0 might still be wrong and only work because it was 50. But that's what I think it was also used like in the other code. I need to check. Question is: does it mean: "That much percent of the accuracy is it reduced by" or does it mean "That much percent of the accuracy will be left"? It's same at 50, but what about 25 or 75? In the end it wouldn't matter too much as long as it won't turn the accuracy negative. But I'd still like to understand how it's supposed to be used.

Edit: Just checked again in Projectile.cpp
Code: [Select]
if (noLOSAccuracyPenalty != -1 && !hasLOS)
{
real_accuracy = real_accuracy * noLOSAccuracyPenalty / 100;
}
Not really intuitive. :o

Offline jnarical

  • Captain
  • ***
  • Posts: 78
    • View Profile
[SOURCEMOD] Brutal-OXCE 7.12.0
« Reply #519 on: December 08, 2023, 11:03:13 am »
Edit: Just checked again in Projectile.cpp
Code: [Select]
if (noLOSAccuracyPenalty != -1 && !hasLOS)
{
real_accuracy = real_accuracy * noLOSAccuracyPenalty / 100;
}
Not really intuitive. :o
This code is mine but it has always been that way. If you’re not sure - use “vanilla” OXCE to check such things.

I think it could be confusing for other people too, so we possibly would find out that in mods some dev’ve decided it works in one way, and another dev thinks it works just the opposite. I feel like it’s totally possible situation. I haven’t thought about that myself and just acted as “one way” seemed obvious to me.
« Last Edit: December 08, 2023, 11:07:54 am by jnarical »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.12.0
« Reply #520 on: December 08, 2023, 01:34:55 pm »
This code is mine but it has always been that way. If you’re not sure - use “vanilla” OXCE to check such things.

I think it could be confusing for other people too, so we possibly would find out that in mods some dev’ve decided it works in one way, and another dev thinks it works just the opposite. I feel like it’s totally possible situation. I haven’t thought about that myself and just acted as “one way” seemed obvious to me.
2 Days ago someone asked what this parameter does on the OpenXCom-Discord. I confidently gave a wrong answer and no one corrected me. So I think the likelihood that at least some modders who use it, got it wrong too is pretty significant. :o

I just checked the official documentary:
"noLOSAccuracyPenalty    The penalty (in percent) to accuracy applied when attacking a unit or a tile outside of LOS. Overrides global setting."

So no way to deduce how it actually works from there either.

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.12.0
« Reply #521 on: December 08, 2023, 03:37:17 pm »
Apologies. I may be late to discussion but why vanilla accuracy is no good?

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.12.0
« Reply #522 on: December 08, 2023, 04:37:38 pm »
BAI authors,

OXCE don't want to add this UI QoL feature as indicating whether tile is in day or night mode visibility. Maybe you would?

https://openxcom.org/forum/index.php/topic,10898.msg150927.html
https://openxcom.org/forum/index.php/topic,10076.0.html
https://openxcom.org/forum/index.php/topic,6869.0.html


Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.12.0
« Reply #523 on: December 08, 2023, 04:55:35 pm »
OXCE don't want to add this UI QoL feature as indicating whether tile is in day or night mode visibility. Maybe you would?

Small correction, we don't want to add this non-QoL feature.

QoL is defined as: "What does “quality of life” refer to? Quality of life (or “QoL”) elements cover a broad range of features that are designed to make games easier to play without changing the gameplay itself." (source: https://www.vintageisthenewold.com/game-pedia/what-is-quality-of-life-for-gamers but you can google yourself and find hundreds of definitions saying the same thing, I just took the first one)

Adding this feature has a HUGE impact on the gameplay itself, and thus doesn't qualify as a QoL feature.

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.12.0
« Reply #524 on: December 08, 2023, 05:28:00 pm »
Sorry for wrong used term. It was the attempt of describing it, not defining.
Didn't intend to offend anybody.