aliens

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

Offline GumChewer

  • Sergeant
  • **
  • Posts: 45
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.3.1
« Reply #300 on: August 28, 2023, 09:35:29 pm »
Also: Someone made a very, very related feature-request on discord:
Specifically it was about enabling it for the robotic-units you have.
Since those do not appear in the soldier's menu, I guess I'll just add it as a separate option. But other than that the framework is already there.

I updated the UI and code for allowing to set the boolean flag per battle unit. Please see the lates commit of my repo on Github.
Maybe you can use it, it would only need a further entry in Options.cpp / .h / .inc.h, and setting that in the non-soldier BattleUnit constructor to fulfill the feature request.
Be aware, that is not the exact code I compile and successfully use myself, it might contain some stupid error, like a forgotten variable declaration.

Offline GumChewer

  • Sergeant
  • **
  • Posts: 45
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.3.1
« Reply #301 on: August 28, 2023, 09:38:56 pm »
Maybe you can use it, it would only need a further entry in Options.cpp / .h / .inc.h, and setting that in the non-soldier BattleUnit constructor to fulfill the feature request.

If that default value is used for all non-soldiers. How to distinguish between HWP, mind-controlled enemies and other units, I would need to find out by digging into the oxce code.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.3.1
« Reply #302 on: August 29, 2023, 10:42:50 am »
If that default value is used for all non-soldiers. How to distinguish between HWP, mind-controlled enemies and other units, I would need to find out by digging into the oxce code.
You can check for mindcontrolled units by doing if(unit->getFaction() != unit->getOriginalFaction()).
I check for HWP with if(!unit->getBattleScapeSoldier()) But that would also return mind-controlled ones. So basically if this is true but mindcontrolled isn't.

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.5.1
« Reply #303 on: August 29, 2023, 10:07:12 pm »
Hello, dear

I would like to make make a couple of notes here:
- AI units that are on control by BAI, tend to take same places, where the previous AI unit was killed, next turn. (see pic below)
This is unfavorable scenario, because this tile should be considered dangerous.
Especially, when human prefers camping scenario.
If you feel willing to improve this behavior, this will also add some side-variety to ordinary gameplay.

Coupling this with aggressiveness shifts and randomization (discussed previously), will make it a bit more living and unpredictable.

- second, I think some shift towards preserving TU's (or even randomization of behavior, too) will make it better in sense of overall competitive efforts. I don't know, really. Enemy BAI-controlled units, that camp behind the corner, most of the cases do nothing when player's units walk in (now, X-Piratez playthrough, last version of BAI up to the moment).
See, the strategy BAI considers best is" off-corner shooting and back" is truly good vs slow human-controlled units. If average speed (and overall stats) of human-controlled units is better than BAI's, TU preservation and ambush strategy becomes more favorable, in common sense.

A question:
- can BAI assume player unit's speed and skills, based on first couple of turns? Is it possible to add strategy matrix? That would be cool.
-  Can strategy matrix influence all types of BAI units aggressiveness?
Few thoughts how strategy-matrix may be considered:
- human's playstyle is camping on the open ground (current BAI works pretty well, maybe too well for that)
- human's playstyle is mostly in-door vehicle camping (BAI cannot solve this yet without armor/weapons or unit stats advantage)
- human's playstyle is out-of the door camping + few tiles scouting + back (BAI lacks assumption of supposed scouting positions of human units moving to-and-back. If added, BAI can preserve TU for reaction shooting) 
- human's playstyle is fast advance and close-range (BAI lacks TU preservation. Also, BAI lacks many-reaction-shooters strategy).
I might reconsider this (too spontaneous decision to write my thoughts here, but all from the best intent).
This, also, may be off-reality, because only you know the BAI patterns. But, by this moment I played vs it quite excessive (70+ hrs).
 
Have a good evening!
« Last Edit: August 29, 2023, 10:09:15 pm by Abyss »

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.5.1
« Reply #304 on: August 29, 2023, 10:21:10 pm »
Couple of tiles away from the door, my units see enemy units: ones that trying to hide behind the apple trees.
And they will not shoot back, most likely.
« Last Edit: August 30, 2023, 01:04:33 am by Abyss »

Offline DeltaEpsilon

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.5.1
« Reply #305 on: August 30, 2023, 01:47:38 pm »
There is a practical problem with Brutal AI that makes it go from hard to just play annoying: finding the last aliens sucks because unlike normal game they can stay in cover and not move, leading to motion scanners becoming useless, so for complex maps, you can easily look spending a hundred turns checking literally every nook and cranny if Bug Hunt mode does not activate. That is _really_ frustrating, especially if the enemy is not even dangerous to your soldiers.

Maybe there should a special case for this situation? Always have at least one unit acting as a scout?
« Last Edit: August 30, 2023, 01:49:16 pm by DeltaEpsilon »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.5.1
« Reply #306 on: August 30, 2023, 02:04:20 pm »
There is a practical problem with Brutal AI that makes it go from hard to just play annoying: finding the last aliens sucks because unlike normal game they can stay in cover and not move, leading to motion scanners becoming useless, so for complex maps, you can easily look spending a hundred turns checking literally every nook and cranny if Bug Hunt mode does not activate. That is _really_ frustrating, especially if the enemy is not even dangerous to your soldiers.

Maybe there should a special case for this situation? Always have at least one unit acting as a scout?
I guess the unit in question was either a melee-unit or a unit with a weapon that has a rather short range.
Those will dismiss peeking if they don't think they would find something they can attack, as otherwise there were these situations, where you just could wait outside of their range and they'd run into your reaction-fire.
Forcing a unit to scout would bring us right back there, where you can just camp outside with your long-range-weapons and kill units with reaction-fire.
They would send in the scouts one by one and make it completely trivial.
So this is not an appropriate solution.

In the next version a bug with the unit-searching-algorithm will be fixed. Then just setting your soldiers to autoplay at aggressiveness 4 should lead to a very decent systematic search of the map, that should be a lot faster than doing it manually.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.5.1
« Reply #307 on: August 30, 2023, 02:25:44 pm »
@Abyss:
I toyed around with considering dead friends in the cuddle-Avoid-Modifier but eventually decided against it. I think this is more of a result of one of the other problem you mentioned, which I will get to in a minute.

I personally don't think that TU-preservation is a counter to quicker player-units unless the player carelessly runs around with them. You can test this hypothesis by setting aggressiveness to 0. In this case the AI will preserve most of their TUs.

The issue with trees being used as cover is indeed a problem. The reason for that is that the tile-visibility-check and the unit visibility-check function in a different way. Tile-visibility is literally just a bool-flag to each tilepart. This allows the algorithm to be very simple and fast. The AI uses this simple and fast algorithm to detect cover.
Unit-visibility-checks actually trace quite a bunch of lines in the 3D-voxel-space.
So the Voxels of trees usually do not block unit-vision while they have their tile-visibility-blocking-flag set.
An idea was to change the unit-visibility-check to also require tile-visibiity. But that had a lot of unintended side-effects, where you couldn't see units that you should.
So it is basically map-dependent. If the maps have a lot of foliage, for example jungles but also orchards, the AI will look rather derpy by using trees as cover. Whereas they do a much better job around more solid objects like buildings.

I have an idea I could try. I think the function that checks tile-visibility returns the object that blocked the visibility. Maybe I can do some plausibility-check. But I'm not sure how exactly that would look like.

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.1
« Reply #308 on: September 01, 2023, 08:11:54 pm »
I toyed around with considering dead friends in the cuddle-Avoid-Modifier but eventually decided against it.
I'm sorry, this reply will not be even close to structurized: I try to estimate experience with BAI from different perspectives the same time. I really want to keep this challenging, yet balanced to certain point of joy.

I am considering, specifically two things:
- Ag3, because it seems like the most live-action (not mega-boring game, faster game, but disappointing in terms of wasting TU for too fast advance vs keeping it to fire back)
- There are tons of various scenarios for this game.
From player is Naked/rifles vs Powersuits/rockets/plasma/gauss enemies
to Player is powersuits/gauss/rockets vs Naked enemies,
to 190 TU chupacabras fights (which BAI wisely invests in killing player units within every possible scenario) 

One of the most challenging scenarios: when you begin mission, surrounded by tier/tier+ enemies, all facing towards you, with 100% TUs. And after you shoot, you get a hail of reaction bullets, plasma, rockets, whatever.

Same time, no matter how advanced AI in terms of open-battlefield tactics is, it may be weird to presume that armored units should take cover, not preserving TU's for reaction fire, being able to actually fire in reply, or even prior to player.
Also, in the fair scenario, enemies rarely die from 1 bullet taken. And after taking single bullet, even in back, they may turn back and fire whatever they have equipped. But, in case of weak enemies, usually missions designed in way of enemies quantity. 

If only BAI can decide whether this particular unit can take role of a tank... I would suggest a bit of change for Ag3. Name it Aggressiveness 3,5 (Plan B). instead of force-hide closer to supposed player location, BAI can act more open:
- if player is seen, then Ag2 tactics,
- if not, prefer more strategic surrounding over ending turns w/o TU's (not close enough, more reaction-fire oriented, with chose of two strategies: weak armor: carefully advancing + preserve from the corner AND  strong armor: reaction fire-oriented surround + preserve facing the open direction).

Offline mitasamodel

  • Squaddie
  • *
  • Posts: 2
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.1
« Reply #309 on: September 03, 2023, 04:18:24 pm »
Hi!
I have a strange behavior with "Realistic accuracy and cover system" enabled.
It always displays the same hit-probability value at the cursor regardless of the selected mode (aim/snap), distance and if the target is visible or not (due to darkness).
The value is also not being updated if I'm switching the soldiers (another stats, weapon, etc).

Mods:
XComFiles 3.1
DarkGeoscape
AmigaFonts
XFilesResound

Offline DeltaEpsilon

  • Captain
  • ***
  • Posts: 86
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.1
« Reply #310 on: September 03, 2023, 08:48:55 pm »
Same issue here, though I get 66% regardless of weapon or anything. Also X-Com Files.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.1
« Reply #311 on: September 04, 2023, 11:14:33 am »
Yeah, sorry for that. The contributor of that feature admitted it was a bit early to call it working.
He found a bunch of bugs and todos himself.
So for now it is recommended to disable the feature until further updates.

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.1
« Reply #312 on: September 04, 2023, 12:11:37 pm »
I’ll go on the wave of illogic things BAI does:
When BAI decides whether to go onto melee or not, it doesn't count weapon strength and estimated target's armor. I'll specify that bare fists count as melee weapon, too.
Now, how weird it's to see that enemies try to punch a power-armored player's unit.
Not that it is unfavorable, but can be dice rolled, if not forcing BAI to assume armor/weapon check via cheat (cheating may raise the difficulty of gameplay, which is already a couple of tiers higher than vanilla), or more honestly, to check whether it works or not (damage/stun application check (yes/no) -> decides to switch weapon).

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.1
« Reply #313 on: September 05, 2023, 10:47:34 am »
When BAI decides whether to go onto melee or not, it doesn't count weapon strength and estimated target's armor. I'll specify that bare fists count as melee weapon, too.
Now, how weird it's to see that enemies try to punch a power-armored player's unit.
Not that it is unfavorable, but can be dice rolled, if not forcing BAI to assume armor/weapon check via cheat (cheating may raise the difficulty of gameplay, which is already a couple of tiers higher than vanilla), or more honestly, to check whether it works or not (damage/stun application check (yes/no) -> decides to switch weapon).
It actually should do these things. I have a test-save for that with lobstermen vs. x-com that have melee-weapon and pistols.
They should calculate an estimated DPTU for each attack-possibility and ... Wait, I have a theory what could be causing this and should test it!

Some time ago, when Joy presentes his ideas but before he implemented them, I already took inspiration and used a multiplied based on a percentage of visible voxels of a unit.
This is okay when comparing only ranged attacks with each other but might make them look too weak compared to melee-attacks where this factor isn't used. So this could have messed up the comparison in the damage-prediction of non-melee attacks and make them seem too low compared to melee, which makes melee win more often than it should.

Edit: Question: Was this with his feature enabled?
Also: Can you provide a save where you think they should have used ranged-weapons but went for melee instead for testing-purposes?
« Last Edit: September 05, 2023, 10:50:16 am by Xilmi »

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 7.6.1
« Reply #314 on: September 07, 2023, 12:48:44 pm »
Edit: Question: Was this with his feature enabled?
Also: Can you provide a save where you think they should have used ranged-weapons but went for melee instead for testing-purposes?

Oh. God. Save is long gone. I should have long gotten into the spirit of baghunting... It also may be worth considering that I still play 7.5.1.
Will try to catch the moment, if it will happen again.

- For the lobstermen: I noticed that they indeed prefer to take things from the ground. In "vanilla" X-Piratez, btw, they don't, possibly because of hardcoded string in the unit description.
Naturally, I think, strong-armored units like lobstermen should act more open, instead of peeking and taking cover. Also, their claws are strong enough to rip non-powersuit player units apart.

Actually, all these questions are fluid, as the player's progress goes on, strong enemy units eventually become weak (not even saying about special measures vs most types of enemies that modders carefully introduced. Like, deep ones are very exposed vs poison grenades).
So, strong enemies that are supposed to be very aggressive in the beginning of the game become paper-made in the late game.
I don't think this issue can be addressed other than by careful map-balancing by a modder himself.

- For the zombies.
1. In vanilla OXCE X-Piratez and X-Com Files low-tier zombies cannot evade shooting from close-quarter combat (CQC) position, whereas Brutal OXCE somehow enables this behavior.
2. Even with max aggressiveness, BAI zombies sometimes prefer to surround and go around behind player units instead of just biting from closest tile. Sometimes this behavior is good and interesting, but most of the times it reduces actual strength of zombies attack wave. I cannot find out what type of attack zombies do use, X-Pedia 2.0 says they have built-in item "zombie punch" worth 15 TU but doesn't specify the damage. It might be hardcoded somewhere specially for zombies.
3. Also, in vanilla XCF zombies make special growling sound when seeing and chasing enemy units)
The easiest way I might suggest is BAI rely on vanilla rules with everything that regards low-tier zombie threat. They are well-balanced and there's not much for AI to consider: see-chase-kill.
« Last Edit: September 07, 2023, 01:28:16 pm by Abyss »