aliens

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

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.1.2
« Reply #15 on: January 05, 2023, 10:48:54 am »
Okay, I'll try it again with the sub-mod this evening to see whether the intervention I made yesterday helps in this case or if it is something else.

While testing around with the WH40k mod even after the changes that make the AI realize their range while walking, I noticed some other things in which my AI has issues with the 40k rule-set that also need to be taken care of.

The combination of very large sight-range and usually shorter range for the weapon is an issue for the code that is meant for the AI to prevent walking into reaction-fire. Funnily enough this might lead to the non-cheating AI to be stronger because it doesn't know when enemies would reaction fire and thus mostly ignores it. The reaction-fire-code definitely needs to check whether a tile is in range for that as otherwise the unit will freeze in place out of fear from reaction-fire and be susceptible to snipers.

In general the massive sight-ranges make the cheating kinda unnecessary. I think that the units probably shouldn't be afraid of reaction fire at all as long as they are further away than their own-weapon-range and ignore it the same as melee-units do who have to ignore it as they otherwise couldn't make it near their enemy. So I guess I'll do that instead. "If you are further away than your range-sweet-spot act as if you were a melee-unit" should be a good general rule. Better than what I suggested before as otherwise a single sniper could still freeze a lot of units simply by being visible to them.

In vanilla there is no weapon that doesn't have an aimed-shot so testing these things with extender-accuracy in vanilla won't really work. They'll just use aimed-shots a lot more.

Something that generally could need improvement is the logic for melee-units. I've won a base-defense-mission against Snakemen/Crysalid due to the Crysalids mindlessly charging at me and then getting stranded without TUs. I need to find a middle-ground between sneaking up and making a charge to make them more dangerous without making reapers less dangerous.
« Last Edit: January 05, 2023, 10:54:52 am by Xilmi »

Offline EttyKitty

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.1.2
« Reply #16 on: January 05, 2023, 02:46:02 pm »
Okay, I'll try it again with the sub-mod this evening to see whether the intervention I made yesterday helps in this case or if it is something else.
Actually, it seems that you've already figured out the source of the problem. Maybe there is no need waste time to test these exact saves. I played more and a lot of other missions had the same problem with enemies behaving weirdly, so those exact saves are not unique. It's, as you said, probably a 40k/ROSIGMA thing. I already saw quite some talks about the big view distance causing problems.

Let me know you want me to relay any information relating 40k/ROSIGMA rulesets to their respective devs. I didn't ask if they are interested in adjusting their mods to yours right now, but I'm sure that what you are trying to do will be interesting for them in the long run. Alternatively, you can check their discord by yourself. Both 40k and ROSIGMA devs reside in the ROSIGMA server.
I initially found out about your work because one of the people in that discord server created a submod that halves the number of enemies in 40k/R, because otherwise it's too hard and enemy turns take too long.
« Last Edit: January 05, 2023, 02:59:10 pm by Sayurime »

Offline N7Kopper

  • Captain
  • ***
  • Posts: 61
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.1.2
« Reply #17 on: January 05, 2023, 03:32:17 pm »
Sorry to be the bearer of bad news, but I found another crashing bug in UFO: the Brutal AI breaks entirely on the enemy turn if you mind control any enemies. (Checking civilians is likely also a good idea if they can use Brutal AI, because I believe they use the same AI packages, but allied with X-Com rather than opposing?) - having X-Com guys get mind controlled works just fine, however. They still act as if smoke grenades are deadly projectiles, but that's not a crashing bug, just vanilla stupidity. This bug existed in the version I reported the first crash on, and also on the latest build.

Unfortunately, in testing this I was shot at by a Muton hiding in a building that I had no idea was there when I turned off the Brutal AI. F for the purity of my Ironman run I suppose. I'm raiding a landed Alien Infiltration Battleship if that makes a difference.

As a side note, allowing the aliens to mind control their own guys to cure your mind control (like what you can do) would be a fun idea...
« Last Edit: January 05, 2023, 03:33:49 pm by N7Kopper »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.1.2
« Reply #18 on: January 05, 2023, 04:57:19 pm »
I already saw quite some talks about the big view distance causing problems.

Let me know you want me to relay any information relating 40k/ROSIGMA rulesets to their respective devs.
Don't worry. None of these are problems that can't be taken care of. Making the AI capable of dealing with other rule-sets sounds much more sustainable than forcing the mod-makers to adjust their rule-sets to be more suitable to the AI. Higher vision-range and accuracy-dropoff are not unique to 40k, so the interventions will be helpful for all the mods that use them.

High vision range might be something that could be taken care of regardless. I feel it's a bit detrimental to the atmosphere to be able to see basically everything right away without scouting.

I don't think it's a waste of time to test with the exact saves. It's always more helpful to be able to comprehend exactly what happened instead of assuming that one cause is the exact same that happened there. So saves of bug-reports keep being a really valuable tool and I still intend to test this exact mission.

In general: Testing, testing and more testing is the most important part about AI-development. Coding without making sure the code actually does what it's supposed to simply can't achieve the same results.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.1.2
« Reply #19 on: January 05, 2023, 05:07:52 pm »
Sorry to be the bearer of bad news, but I found another crashing bug in UFO: the Brutal AI breaks entirely on the enemy turn if you mind control any enemies. (Checking civilians is likely also a good idea if they can use Brutal AI, because I believe they use the same AI packages, but allied with X-Com rather than opposing?) - having X-Com guys get mind controlled works just fine, however. They still act as if smoke grenades are deadly projectiles, but that's not a crashing bug, just vanilla stupidity. This bug existed in the version I reported the first crash on, and also on the latest build.

Unfortunately, in testing this I was shot at by a Muton hiding in a building that I had no idea was there when I turned off the Brutal AI. F for the purity of my Ironman run I suppose. I'm raiding a landed Alien Infiltration Battleship if that makes a difference.

As a side note, allowing the aliens to mind control their own guys to cure your mind control (like what you can do) would be a fun idea...
Interaction with mind-control of the player really is one of the least tested things. I have tested it and made some changes to the behaviour. Didn't experience any crashes myself. What I changed was making them ignore their own mind-controlled units and becoming more aggressive. I'll try again and see if I can reproduce it. A save-game would be helpful though. I hope you play self-imposed Iron-Man and not with the in-game-option, as that's very risky in terms of any bug potentially breaking the entire run and not being able to provide save-games that could help fix the bugs.

I can see if I can identify the type of grenade somehow and not make them use them if it's smoke-grenades.

Edit: Tried reproducing it by doing a mission with a Muton-Battleship and a few psi-amps. To no avail. Neither did it crash nor did the Aliens act particularly wrong.
« Last Edit: January 05, 2023, 07:03:42 pm by Xilmi »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.1.2
« Reply #20 on: January 05, 2023, 05:21:24 pm »
I initially found out about your work because one of the people in that discord server created a submod that halves the number of enemies in 40k/R, because otherwise it's too hard and enemy turns take too long.
Joined their discord and while searching saw there's been a lot of talk about it. More than on the official OXC-discord. They discussed issues about it and made suggestions of what it could do better... all in my absence.
People should realize that their feedback is much more likely to have any impact when they make sure it's done some place I at least have the chance to listen! :D

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.2.0
« Reply #21 on: January 05, 2023, 08:15:56 pm »
I uploaded a new version with fixes for the glitches in the WH40k-mod.
But since I wasn't able to reproduce the mind-control-crash reported by N77Kopper, I obviously couldn't fix that one.

So as I said earlier, I'd either need a save-game where that happens or steps to reproduce it. Maybe also attach options.cfg incase it depends on some combination of options.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.1.2
« Reply #22 on: January 06, 2023, 01:50:36 am »
the Brutal AI breaks entirely on the enemy turn if you mind control any enemies
I managed to reproduce it!
Seems like playing without omniscience is a requirement.

I don't quite understand yet what the mind-control changes because from where it crashes it looks like that could happen regardless of mind-control.

Okay, I understood it now. There's a place where it check what the closest enemy-unit is. For that place it also counts it's own mind-controlled units. So then it assumes that it knows the position of an actual enemy and tries to look whether it has a line of fire. And then it crashes when it doesn't actually know the position of an enemy.

When I don't let it consider it's own mind-controlled units as enemies, it no longer tries to check the line of fire and thus cannot crash anymore.

Fix is available: https://github.com/Xilmi/OpenXcom/releases

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.3.0
« Reply #23 on: January 10, 2023, 08:26:57 pm »
Put out a new rather significant update, especially for those of you who want a challenging non-cheating AI.

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

With the changes that can be read about in detail in the changelog, the non-cheating variant of my AI should now be capable of posing a significanlty bigger threat than it was able to do so before, when several bugs and the lack of awareness that units it can't see anymore didn't just disappear but must have gone somewhere held it back.

Offline Spess Mahren

  • Sergeant
  • **
  • Posts: 18
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.3.1
« Reply #24 on: January 14, 2023, 05:26:54 am »
I am getting a poor frame rate with this mod on xcom files while normally I have no issues with anything openxcom and my desktop is the opposite of a toaster performance wise.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.3.1
« Reply #25 on: January 14, 2023, 01:45:50 pm »
It could be script that build new version do not set proper optimization flags

Offline Juku121

  • Commander
  • *****
  • Posts: 1798
  • We're all mad here.
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.3.1
« Reply #26 on: January 14, 2023, 10:47:01 pm »
I ran this once and all OpenGL shaders began crashing the game for all OXCE installations. A restart fixed this, and I already couldn't change shaders in-game without a crash (changing them in the .cfg worked before, but not this time), so it's not quite all or likely even most Xilmi's fault. But it's an additional hurdle that makes me hesitant to continue.

The aliens also weren't very hot against dogs in semi-decent cover. Wonder if it was the UFOExtender accuracy that made them shoot and miss most of the time? Although the whole thing was part of a strange challenge mission, so maybe not really representative.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.3.1
« Reply #27 on: January 16, 2023, 01:25:19 am »
I am getting a poor frame rate with this mod on xcom files while normally I have no issues with anything openxcom and my desktop is the opposite of a toaster performance wise.
Theorethically this should only impact turn times of when the AI is moving. I wouldn't know how this should be causing frame-rate-issues.
Did you use your previous "options.cfg" or did you let it create a new one?
It's set to 60 FPS by default. "Low" is such a subjective term though. How low exactly is it? If it's 60 and for some reason you consider that low, then that's because that's what it's set to be.
I personally cannot tell any difference between basic OXC and my own version FPS-wise.

@Yankes: I'm using defaults and haven't changed anything about optimization-flags. I neither know where to do that nor what "proper" settings would be.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.3.1
« Reply #28 on: January 16, 2023, 01:33:59 am »
I ran this once and all OpenGL shaders began crashing the game for all OXCE installations. A restart fixed this, and I already couldn't change shaders in-game without a crash (changing them in the .cfg worked before, but not this time), so it's not quite all or likely even most Xilmi's fault. But it's an additional hurdle that makes me hesitant to continue.
I honestly have no idea what and why people have these odd issues with the game. Segmentation-faults or endless-loops within AI-code is something that I'd feel responsible about. But OpenGL-shaders? I haven't touched any of this stuff at all.

The aliens also weren't very hot against dogs in semi-decent cover. Wonder if it was the UFOExtender accuracy that made them shoot and miss most of the time? Although the whole thing was part of a strange challenge mission, so maybe not really representative.
Which version was that? I've recently added better support for "UFOExtender accuracy" as that's default in the WH40k mod. With versions prior to 2.3.0 the enemies wouldn't know to come closer when they already can see the target. They'd then either not attack at all or take shots as soon as the hit chance was > 0.
If it was with the recent version, then I'd like to have a test-savegame (with mentions of the mods in use) and a description of how the proper behaviour would look like.

Offline Juku121

  • Commander
  • *****
  • Posts: 1798
  • We're all mad here.
    • View Profile
Re: [SOURCEMOD] Brutal-AI 2.3.1
« Reply #29 on: January 16, 2023, 03:00:21 am »
But OpenGL-shaders? I haven't touched any of this stuff at all.
Well, as I said I already had a minor version of the same problem before, and Meridian was just as much in the dark about that as you are.

Which version was that? I've recently added better support for "UFOExtender accuracy" as that's default in the WH40k mod. With versions prior to 2.3.0 the enemies wouldn't know to come closer when they already can see the target.
2.2.4. If they know to come closer now, that's a lot better. Most big mods use UFOExtender accuracy these days, I think.

They'd then either not attack at all or take shots as soon as the hit chance was > 0.
On (almost) flat terrain, that's actually not a bad tactic since 'hit chance' is significantly lower than actual chance to hit in that case.

If it was with the recent version, then I'd like to have a test-savegame (with mentions of the mods in use) and a description of how the proper behaviour would look like.
It wasn't. But in case you're interested in trying to make this mission harder...

There are quite a few here. Mods are actually listed in the saves (and the other four are cosmetic):
Code: [Select]
mods:
  - "x-com-files ver: 2.7"
  - "dark-geoscape ver: 1.0"
  - "xcomfiles-hyper-and-trajectory ver: 1.0.1"
  - "x-com-resound ver: 2.30"
  - "Katomusic ver: 1.0"

What I'd really like is for the Sectoids/Cyberdisks to 99% kill at least one of the dogs in semi-open cover with their plasma guns. Either via reaction fire when the dogs try running to the UFO, or on their turn. The CQC shenanigans are outside the scope of your mod, I think, and grenades were used to good effect already.

When I tried with 2.2.4, there seemed to be at least a 10% chance for the aliens to miss with every single shot on their turn.