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

Offline panzer

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.2.1
« Reply #255 on: August 04, 2023, 10:14:03 pm »
I loaded the save in X-Com-Files and got a message about missing mods.
But other than that there were Chupacabras and they all went into melee-range before attacking.
So this is the next bug-report I'm having trouble reproducing. :\
Yes, The X-Com Files mod. This is weird. Try this save.
If everything goes well with you again, then I have something with the game.
By the way, on 7.2.1 everything is fine with me.
« Last Edit: August 04, 2023, 10:26:25 pm by panzer »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.2.1
« Reply #256 on: August 04, 2023, 10:29:33 pm »
Yes, The X-Com Files mod. This is weird. Try this save.
If everything goes well with you again, then I have something with the game.
By the way, on 7.2.1 everything is fine with me.
https://youtu.be/uMY8JZ3-uVc

This is what happens for me.

I'll try to check whether I have the latest version of XCF later. Maybe something chaned there that in the combination with my recent changes somehow causes this.
« Last Edit: August 04, 2023, 10:36:15 pm by Xilmi »

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: [SOURCEMOD] Brutal-OXCE 7.1.2
« Reply #257 on: August 04, 2023, 11:30:11 pm »
My current hypothesis as for why it supposedly has worked with that version is that there probably was some sort of always daytime mod enabled. This hypothesis is backed by how much brighter it is on Dioxine's screenshot than it is on the second one I just attached when I disable night-vision.

No, I just used ctrl+alt+end  half light mode, lmao. If there was anything that could influence visibility, I would have told you so in the bug report. Anyway, it's your problem, not mine, I won't be installing video capturing soft just to prove my point. I only reported what I seen and checked myself (and like I say, I don't think the problem is specific to this situation - there were many times I felt my troops in XPZ should have reacted but they didn't, but there always existed some possible other explanation). I included the same save I used for testing this situation myself, from turn start - I could not test much if they were in set positions already.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.2.1
« Reply #258 on: August 05, 2023, 01:26:45 am »
Yes, The X-Com Files mod. This is weird. Try this save.
If everything goes well with you again, then I have something with the game.
By the way, on 7.2.1 everything is fine with me.
Can you attack your options.cfg?

I've seen it happen on Silver's stream too. And with his save from right before it happened, I couldn't reproduce it either. So my only hope to reproduce it is that it's tied to some sort of option.

Edit: I finally managed to reproduce it by deleting my options.cfg and letting the game create a new one... Now I just have to figure how the heck it can be related to something that is disabled by any of the non-default options. :o

Edit 2: Okay... The only thing I changed was enabling traceAI and it's gone. This is... puzzling. I guess I somewhere run some code only in... wait...

Edit 3: 7.2.3 with a fix is available.
« Last Edit: August 05, 2023, 12:21:33 pm by Xilmi »

Offline panzer

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.2.1
« Reply #259 on: August 05, 2023, 12:55:52 pm »
Edit 3: 7.2.3 with a fix is available.
7.2.3 everything works as it should. Thank you :) 8)

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.2.3
« Reply #260 on: August 07, 2023, 03:21:02 pm »
I've been doing some tests with Autoplay set to aggressiveness 3 and 2 yesterday in an alien-base and due to how it is more relatable to see how things play from the player's perspective I found some disagreeable behaviors, I wouldn't have considered as so disagreeable when only looking at it from the perspective of the aliens.

One thing I realized is that after peeking the AI often chooses a significantly more forward position than where the unit went to peek. As a player I don't really play like that because the risk of that unit being discovered by the enemy on their turn or even worse running right into them with no TUs left is simply too high.

Units that are too far away from the action should of course feel free to spend their TUs on getting closer so they can help their friends on the front. But a unit that just peeked around a corner, and saw it is clear, probably should value avoiding being discovered more highly.

So I will continue doing more with Autoplay in order to be able to better compare the AI's behavior to with what I would have done myself and try to get it closer to that.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.2.3
« Reply #261 on: August 08, 2023, 01:49:48 pm »
I experimented around with this and the results were rather inconsistent.
X-Com did significantly better with these changes but the aliens actually did a little worse.
This indicates that the ideal behavior is dependent on unit-stats.

I ran the experiments with personal armor + lasers against the lowest tech-level sectoids. This meant that X-Com-soldiers often survived shots from the Plasma-Pistols whereas the Sectoids usually died once they were attacked.

Oh, I also ran an experiment with Lobstermen and those did really-really well.

It might sound counter-intuitive but the finding was basically: The more tanky the unit is, the more it benefitted from a defensive playstyle. The less tanky units needed to be able to coordinate their attacks well so the enemy get overwhelmed and can't retaliate.

I think there's no easy solution for this. There's basically two different tactical goals that contradict each other:
On one hand you want to have as many units close to the enemy so that once you discover them you can rotate in enough firepower to take them out. On the other hand you don't want your units be in a spot that when the enemy finds them they can take them out.

I'd also say it was kinda like a rock-paper-scissors when it comes to how different approaches worked against one another. The very defensive style did well against the very aggressive style. The slow-advancing-style did well against the very defensive style. And the very aggressive style did well against the slow advancing-style.

Reminds me at the StarCraft-Bot-scene. A lot of bots have different styles and try to memorize which approach was good against which enemy. If one approach fails they cycle to the next.

Maybe my algorithm for deciding when to be defensive wasn't ideal yet. I'd say it was often too defensive in situations where being a little more aggressive could have done better. The decision-making-mechanism could be more nuanced. For example the unit determines if the location it currently is at is considered save based on the information it has. So it's a binary information and I let them play defensively, whenever they felt not completely safe. For the tiles to go to the safety is measured in TU-equivalents and I use half the units max-TUs as threshold to determine whether it's worth reserving TUs for hiding after shooting or continue to attack until we don't have enough TUs. Using a similar approach for the decision-making of whether to value closeness over safety could also make sense.

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.2.3
« Reply #262 on: August 09, 2023, 10:46:30 am »
Hey Xilmi,
In 5 years I haven't seen ANY blaster launchers shots from OXCE AI. All these guys with blaster launchers (mind-guided missiles) were just decorations to punch them and collect stuff. This solely is an advancement worth mentioning.
Bad the thing is: all mods are balanced around some enemy units being decoration instead of real competitive power.
Just in case.

For everything you mentioned, yes, game conditions sometimes resemble RSP game. But each race in original has been designed having their strengths and weaknesses. Like, tanky mutons are weak to mind attacks, while weak sectoids (and aquatoids) can watch through walls (!) and can apply mind control themselves. If only that can be considered in decision of BAI strategy in each particular case, that will be mind-blowing experience for a player.

Stats do determine a lot, and that's one of player's tools of victory: while in the beginning stats of hired personnel are weak and uncompetitive, trained and transformed units are well above mediocre-level enemies.  When you compare experience from auto-quick battle with campaign mission, please consider that player units in second case are stronger (tool of victory, you remember?)

In the beginning, I was frustrated how different the base assault mission is. All enemy units simultaneously take proper positions and attack, making base attack few-turn intense operation. While playing against vanilla AI you had to look all at all corners of the map to find some dangling entity that doesn't know what to do (and that it's haven is under assault).
Again, the problem here is that all has been balanced against some units are decorations until certain point of time. E.g. you battle against one half of enemies in the first sector of the map, then 1/4 in next sector upon spread of your units and so on.

Both situations are extremes.
Both situations are getting player bored after same and same experience in each mission.

I think, I would like to make three suggestions:
1) OXCE menu option
If modder doesn't yet assign each unit's aggression, possible solution is to add some randomization in assigning BAI units playstyles in the beginning of each mission. Is it feasible?
The advanced suggestion is decisive randomization: if BAI can check the units role, it can assign from diapason of aggressiveness: like 0-3 for ranged, 0-2 to mind controllers and 2-4 to melee.

2) The second suggestion regards sameness of each mission. Do you have any insights how to make BAI switch strategies in between?
It's getting weird to watch some low-tier enemy shoot ordinary pistol bullets into power-armor units. Any feedback from action?
Player sees if the attack indeed damages enemy unit (enemy unit gets colored slightly red if any damage, or intense red if fatal wounds are inflicted), I think enemy deserves the same. 
 
3) Related to (1): Race strategy personalization. BAI checks stats and if some competitive sides are available, BAI finds the strategy to maximize it.
Example: condition - night, sectoid NV is far better than players => attack from beyond and mind control more, than approach.
Or, implement mass panic operation. Like, all BAI sectoids are hidden in the ship and emit panic messages to approaching troops, which then be their competitive advantage during the battle inside a ship. 

These suggestions may conflict, but vary gameplay much, which is good in terms of several hundred missions during the ordinary campaign.

Offline DeltaEpsilon

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.2.3
« Reply #263 on: August 10, 2023, 01:44:08 am »
Not sure if this is a bugreport or something to check, but "strict checking for blockages" apparently breaks some missions in X-Com Files.

The one I found this out the hard way in was "Osiron Cruise Ship" assault mission. In this mission, there are stairs that go up to upper deck.
With the option on, the second segment on the stairs acts as an obstacle and pathfinding fails.

A savefile is attached demonstrating it.

While the option does stay "this can block off areas if the map wasn't built correctly", it is unclear exactly what this means and there is nothing seemingly unusual about the stairs setup in this mission.

Screenshots:
The option off:
The option on [clicking here does nothing]:

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.2.3
« Reply #264 on: August 10, 2023, 03:23:25 pm »
While the option does stay "this can block off areas if the map wasn't built correctly", it is unclear exactly what this means and there is nothing seemingly unusual about the stairs setup in this mission.
What I mean by "built incorrectly" is that the particular tile has a "BIGWALL"-flag. You as a player cannot see that. This can be seen and modified in the MCD-File containing that tile.

The AI no longer depends on that flag and there's other ways to figure out whether something is walkable or not, so just leave it off. Spawning something into solid block also seems to be super-rare. I've only seen it happen once when a soldier was carrying a stunned alien in the backpack, it woke up and then was spawned into a block. This is the kind of thing this option would prevent.

But since mappers have made many maps without even knowing that doing this was not intended, there's now a lot of map-segments that would not be walkable if the blockage-checking is enforced.

Offline Nalca

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.2.3
« Reply #265 on: August 11, 2023, 04:09:02 pm »
Hey Xilmi,
In 5 years I haven't seen ANY blaster launchers shots from OXCE AI. All these guys with blaster launchers (mind-guided missiles) were just decorations to punch them and collect stuff. This solely is an advancement worth mentioning.
Bad the thing is: all mods are balanced around some enemy units being decoration instead of real competitive power.
Just in case.

Aliens (or in my case, Academy Pionners) DO use blaster launchers. I have been blasted today. But I think they use it like a rocket launcher, not like a GUIDED rocker launcher.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.3.1
« Reply #266 on: August 11, 2023, 07:10:11 pm »
Aliens (or in my case, Academy Pionners) DO use blaster launchers. I have been blasted today. But I think they use it like a rocket launcher, not like a GUIDED rocker launcher.
The original algorithm had at least one big flaw and for the most part was incomprehensible to me. So I ended up rewriting it almost completely.

The main flaw was that it first determines the target to shoot at and then tries to look whether there's a path to it. If it failed to find a path to the best target it would not use the blaster at all this turn. Couple this with the cheaty-way the base-AI determines targets (it considers units as viable that it had seen several turns before), it will very often want to go for a target that it can't attack.

I put the target-search in a loop. If the best known target can't be pathed to, then try the second best and so on until it finds one that actually can be attacked.

And I rewrote the waypoint-setting-algorithm into something I can comprehend. Basically I go the path from the target-unit backwards and every time the direction or Z-axis changes I put a waypoint. This might be a bit wasteful, but it's reasonably safe in the sense that missiles don't fly into a wall too often. Also I do the same trick players do: If I have leftover-waypoints, I put another one on the final destination, which makes sure the missile will really go there and not fly further into it's previous direction.
If you use the mod that allows unlimited waypoints, then I also allow the AI to do so.

Offline GumChewer

  • Sergeant
  • **
  • Posts: 45
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.3.1
« Reply #267 on: August 11, 2023, 10:09:45 pm »
Hi,

in general BrutalAI I think is great compared to the vanilla AI, thanks for coding it!

But I would like to request some feature for the autoplay option (AI controlled X-Com soldiers, which I use a lot for tedious missions):

-) Two separate yes/no option for turning the autoplay off at every new combat and every new turn.

-) Some way to control the behavior of the individual soldiers just like modders can do with alien units. The aggressiveness parameter at the moment. I'd also like this settings to be stored with the geoscape soldier such that it is persistent between combats.

-) A persistent (between combats/turns) switch to exclude specific soldiers from the autoplay, also to be stored with the geoscape soldier.
The reasoning is that the AI does not handle some missions, specific situations or specific soldiers (equipment etc) as nice as others or the way I'd want it.

I can probably do the code for the UI, the setting per Soldier and the Options class / Options.cfg myself, so I mainly request the hooking into the AI code itself.
« Last Edit: August 11, 2023, 11:37:40 pm by GumChewer »

Offline GumChewer

  • Sergeant
  • **
  • Posts: 45
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.3.1
« Reply #268 on: August 11, 2023, 10:16:31 pm »
For the incompatibility between BrutalAI and mods, I found two minor cases. I do not really mind if they are fixed or not.

-) X-Chronicle has various soldier types with special weapons without icons or use in empty hands (they can only be accessed via soldier skills), but the AI uses them anyway directly (not via a soldier skill). At least with the latest version I tried, which is something like 6.4.
-) Unexcom defines hangars with a capacity of two, but defines no positions for the crafts. Which will not load, as of version approximate 7.1.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.3.1
« Reply #269 on: August 12, 2023, 01:56:23 pm »
Hi,

in general BrutalAI I think is great compared to the vanilla AI, thanks for coding it!

But I would like to request some feature for the autoplay option (AI controlled X-Com soldiers, which I use a lot for tedious missions):

-) Two separate yes/no option for turning the autoplay off at every new combat and every new turn.

-) Some way to control the behavior of the individual soldiers just like modders can do with alien units. The aggressiveness parameter at the moment. I'd also like this settings to be stored with the geoscape soldier such that it is persistent between combats.

-) A persistent (between combats/turns) switch to exclude specific soldiers from the autoplay, also to be stored with the geoscape soldier.
The reasoning is that the AI does not handle some missions, specific situations or specific soldiers (equipment etc) as nice as others or the way I'd want it.

I can probably do the code for the UI, the setting per Soldier and the Options class / Options.cfg myself, so I mainly request the hooking into the AI code itself.
If you'll do the UI stuff, I sure can do the rest. The hooking to the AI should be pretty easy. Just need to read the settings from the Geoscape-Soldier, that the BattleUnit-likely has access to.

Combining some soldiers being on auto while others are not sounds a bit challenging from the turn-processing-perspective.

An alternative solution could be to make "hotkeys" for a semi-automatic-behaviour. Basically you press a hotkey for each soldier when it's selected and it will handle stuff with AI immediately but only for that soldier. Different hotkeys for different aggressivenesses.