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

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.2.3
« Reply #105 on: April 16, 2023, 10:47:36 pm »
Is there a problem with v 4.2.3 as when I equip a craft it is showing equipment on the troop screen at base that according to the first picture isn't aboard. Doesn't happen with v 4.2.2-see attached screenshots.
This is a new feature inherited from OXCE 7.8.18:

This is from the commit from @Meridian:

"https://openxcom.org/forum/index.php/topic,10998.0.html

When using `oxceAlternateCraftEquipmentManagement`,
entering the inventory screen from a craft will now show
all available equipment in the base.
Changes made in the soldier's inventory are then used to update
the items loaded on the craft, so that the craft has
all of the soldiers' items
(as well as any unequipped items already loaded onto the craft).

Previously, entering the inventory screen from a craft would show
only the items that were already on-board the craft, and changes
made to soldiers inventory would not affect the items on the craft."

I haven't really tested it myself. But it really sounds exactly like what you just said. So I guess it's working as intended.

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 676
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.2.3
« Reply #106 on: April 16, 2023, 10:58:52 pm »
Thanks for the info, btw can this feature be knocked off?

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.2.3
« Reply #107 on: April 16, 2023, 11:05:36 pm »
Thanks for the info, btw can this feature be knocked off?
It's tied to this option in the menu:

Offline SIMON BAILIE

  • Commander
  • *****
  • Posts: 676
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.2.3
« Reply #108 on: April 16, 2023, 11:22:41 pm »
Understand now.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.3.0
« Reply #109 on: April 21, 2023, 08:36:31 pm »
Brutal-OXCE 4.3.0

The movement-logic of the AI has been largly reorganized.
The only thing that still works like before is how the AI positions itself to attack units it spotted in the current turn.
The second priority is now to move towards the closest full cover to the enemy, that the enemy cannot reach during its turn. For non-omniscient this is based on the assumption where the enemy is. An exception to that is when the unit already is at the closest full-cover position. It will then not relocate to a position further away.
Peaking has been vastly reduced in range to preserve more TUs for reaction fire. When a unit already is in the closest cover then moving one tile to peak and then back to the cover should be enough.
Fleeing will only be done when no adequate cover can be found.

The algorithm that makes assumptions about where an enemy could have moved to, when the tile it was assumed to be at is confirmed to not contain the enemy was updated to avoid vastly implausible results. It's now simply the tile closest to the previous location that wasn't explored in the current turn.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.3.0
« Reply #110 on: April 25, 2023, 02:24:12 pm »
Just want to write down some thoughts in order to not having to keep it all in my head for later:

Previously "peaking" worked as "walking towards a position where an enemy is assumed to be".
While working on the next version I have now split "peaking" into three different behaviors that are supposed to be used according to the situation.

The previous version of peaking will only be used when an enemy is assumed to be in nearby smoke.
If this is not the case, then peaking could be going to the closest tile from where a line of sight can be established to the assumed position of the enemy.
If no line of sight can be established then peaking means going to the closest position along the path towards the alleged opponent from where there is a line of sight to the first tile that is no longer in line of sight to the original position.

These two new peaking methods require way fewer TUs than enforcing the anti-smoke-grenade way of peaking when it's not necessary.

Another thing that now is possible is categorizing cover-quality. If I have extended the cover-detection-method in a way that makes it only return cover based on a requested cover-quality-level.
I can now differentiate 4 different tiers of cover quality.
S-Tier-cover: There is vision-blocking cover towards all directions and the adjacent directions to these where enemies are expected to be. On top of that a roof is above the units head.
A-Tier-cover: There is vision-blocking cover towards all directions and the adjacent directions to these where enemies are expected to be.
B-Tier-cover: There is vision-blocking cover towards all directions where enemies are expected to be.
C-Tier-cover: There is cover to at least some direction where enemies are expected to be. It doesn't need to be vision-blocking.

The current implementation, lets call it 4.4.0 beta, does not fully make use of these possibilities yet.

It's first priority is still to position itself to attack a known enemy. Then go to the closest tile towards the suspected enemy that is still B-Tier-cover, then C-Tier-cover. If already in such position and at full TU peak according to the above new peaking-rules. If nothing applies, it would use a flee-logic which seeks for a compromise of increasing distance to the enemy and improving cover.

At least two of these things have looked "dumb" in testing. The running away. This should only be done if the unit finds itself exposed. Otherwise, if none of the other things apply, just staying where you are might be good enough.
The other was to always prioritize going to the closest to the enemy cover before considering peaking. If you do end up spending the full 50% of TUs on peaking, it's of course bad to peak and then go back to cover where you will have no TUs for reaction-fire anymore. However, the new peaking-methods may mean to only spend 4 TUs on it unless the enemy is in smoke, where you are much better off finding them on your turn.

So reversing the priorities when the unit starts their turn in B or better cover seems reasonable. It would still be guaranteed that it ends up in this kind of cover after peaking.

Other than that: Closed doors should probably not be considered as cover since when someone opens them there's no chance for reaction-fire.

Offline panzer

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.2.0
« Reply #111 on: April 27, 2023, 03:30:25 pm »
I'm not quite sure I fully understand the situation. Would really be nice to see some footage of what is happening so I can analyze it better. Or maybe a savegame that showcases what you mean.
The enemies get into line of fire and then get close to you but don't attack anymore so you can then shoot them on their turn?
Are those melee-enemies? Or enemies with very short-ranged weapons? Or enemies with impaired vision?
I'm not quite sure why they wouldn't either attack you immediately when they have line of fire or at least only get close enough until they get a better chance to hit.
Note that enemies, that are flagged as "isLeeroyJenkins" in the mod will alway try to get into melee-range, no matter what.

But I'd definitely need more information to determine whether what you are talking about is intentional and or how it should be imroved.
Thanks for the answer, after updating Brutal-OXCE everything was fine  :)
Here are some more questions.
1) Why do some aliens, especially those with high TUs, prefer hand-to-hand combat to shooting. Where the enemy could easily kill my agent with plasma, he runs up and starts hitting him to no avail. mod The X-Com Files. "isLeeroyJenkins" disabled
2)Will there be a change in the mechanics of Mutual Surprise in Brutal-OXCE?
3)Will new Reaction fire triggers be added to the OXCE mechanic? For example, what would the enemies react to the opening of the door. In the original, it was impossible to open the door without entering it. In OXCE, you can, but there is no reaction fire after opening the door, which means that the fight is simplified, since enemies rarely and completely accidentally use this mechanic.
« Last Edit: April 28, 2023, 12:58:34 am by panzer »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9092
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.2.0
« Reply #112 on: April 27, 2023, 04:48:57 pm »
3)Will some Reaction fire triggers removed from OXCE like opening a door, etc. be brought back?

OXCE did not remove any reaction fire triggers.

Offline panzer

  • Sergeant
  • **
  • Posts: 28
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.2.0
« Reply #113 on: April 28, 2023, 12:41:13 am »
OXCE did not remove any reaction fire triggers.
Google translate is as bad as it was in 2015. sorry) I didn't mean it.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.2.0
« Reply #114 on: April 28, 2023, 11:09:21 am »
Google translate is as bad as it was in 2015. sorry) I didn't mean it.
I recommend using ChatGPT or other AI-based alternatives for translations. So far I was really pleased with it's translation-results when it comes to preserving the meaning.

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.2.0
« Reply #115 on: April 28, 2023, 11:30:17 am »
1) Why do some aliens, especially those with high TUs, prefer hand-to-hand combat to shooting. Where the enemy could easily kill my agent with plasma, he runs up and starts hitting him to no avail. mod The X-Com Files. "isLeeroyJenkins" disabled
2)Will there be a change in the mechanics of Mutual Surprise in Brutal-OXCE?
3)Will new Reaction fire triggers be added to the OXCE mechanic? For example, what would the enemies react to the opening of the door. In the original, it was impossible to open the door without entering it. In OXCE, you can, but there is no reaction fire after opening the door, which means that the fight is simplified, since enemies rarely and completely accidentally use this mechanic.
1) The enemy thinks that it will do more damage by walking up and pummeling you. If it is wrong about this, then I suspect that this is based on miscalculating the melee-damage. Probably due to some anti-melee-armor-modifiers. Stuff like this is not really taken into account currently as it wasn't brought to my attention yet that this is an issue. My AI treats all damage the same currently, which obviously is not okay. I definitely shall look into that. Can you provide a save-game or give me more details about the situation as in: What weapons did the enemy have and what kind of armor did your agent wear?

2) No I don't plan to modify game-mechanics.

3) I get your point. However, if right-click opening didn't work or would trigger reaction-fire too, then camping doors would become a really good tactic for the aliens to use again. I don't think that shifting the balance in a way to punish the active side and reward the passive side is an overall good idea.

I'd rather shift the alien's behavior to be more proactive. 4.4.1 actually isn't great in this aspect. It's actually pretty bad. I've identified some issues where the AI likes their cover way too much and becomes both annoying to play against because it hides so much and also becomes less of a threat because their chance of finding you is so low.

My current plan is to replace the entire cover-mechanic by a prediction of whether the enemy can reveal them at the locations they take into consideration to go to. Then they don't have to hug the walls all the time and become less predictable and more willing to reposition.

The behavior when they don't have an attacking-opportunity already should become:

1. Peak
2. Go to the closest location where they can't be discovered
3. If 2 is not possible, go to the closest location where they aren't visible to the enemies current assumed positions.
4. If 3 is not possible, get closer to the enemy.

Of course, if peaking reveals something they shall adapt to that and prioritize attacking it over the other options.

Edit: I added this line in the damage estimation-formula that the AI uses to decide which kind of attack to use.

damage *= target->getArmor()->getDamageModifier(action->weapon->getRules()->getDamageType()->ResistType);

My hopes are that this will make them notice when melee-attacks would be comparatively inefficient. I'd still like a savegame where that would be relevant for testing.
« Last Edit: April 28, 2023, 05:50:47 pm by Xilmi »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.4.0
« Reply #116 on: April 29, 2023, 10:48:13 pm »
The new version shall fix this issue, among other things. Relevant part is highlighted.

Brutal-OXCE 5.0.0 - Predictive Tactics

Updated to OXCE 7.9.0.

AI no longer goes into sweep-mode based on low player-morale. It was too arbitrary, too gamey and ruined the comparability of my benchmark-tests.

The AI now creates a map of all possibilites where its enemies could go to based on the locations where they are assumed to be. Or actually are, if you play with omniscience. This is cached within the BattleUnit-class so all AI-agents can access this information and only update it when the situation changes.

When deciding where to move, the AI then uses these locations to emulate whether the tile it wants to go to would be within line of sight.

This new mechanism replaces the previous cover-system completely with some massive advantages. Most notably that it doesn't require the presence of walls or big objects facing the right directions to safely advance towards the player's position.

There's still different cover-quality-levels that it will fall back to if no entirely unspottable location can be found. Then 2nd best Tier of cover is a location that has no line of sight to the unit and not line of sigt to the first point the unit doesn't see on it's path towards the player's unit. The 3rd best tier of cover is simply avoid being in line of sight of the current location.

When a unit is "in combat", it's teammates will lower the cover-quality they are going for to the lowest one. This way the AI won't just leave some of their units to die while others keep hiding.

Damage-type and resistences are now taken into account by the AI for what weapon it chooses to attack with, when it has several options.

Fixed an issue in the algorithm that updated the assumption about where an enemy unit might have gone when it was confirmed not to be where it was expected. Previously it would take the closest unscouted location to the unit that notices the player-unit not being where it's supposed to be. Now it properly uses the closest (by pathfinding) unscouted location from the units previously assumed location. This will create much better scouting-patterns and also hugely impacts the quality of the cover choses based on the assumptions where the enemy units could be.

The AI's check whether there's a line of sight between two tiles will now use the respective tiles above when the height of the unit added to the height of the terrain exceeds the height of the tile. This prevents the AI from considering slopes that make them peak out as cover with the new mechanism.

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 4.4.0
« Reply #117 on: May 03, 2023, 01:57:12 pm »
The AI's check whether there's a line of sight between two tiles will now use the respective tiles above when the height of the unit added to the height of the terrain exceeds the height of the tile. This prevents the AI from considering slopes that make them peak out as cover with the new mechanism.

First of all, I would like to mention you did the tremendously great job, as the idea of AI improvement has been floating around for merely a decade.
Second, thank you so much for putting efforts into overhaul of annoying sniper/spotter mechanism.

I really want to put the couple of thoughts that were visiting me while I was reading the forum sections you created, and I have read it all, because you are not only passionate developer, but also very neat in explaining the reasons behind your solutions.   

1. When it comes to AI efficiency, it is clearly good that it has such advance in decision making.
The troubling part is: the game is not always about the hell chess with superior forces, that are, clearly, outnumber your troops in 99% of cases. The game is also about feels, joy, and satisfaction with progress and story.
One particular example is when you assault human-enemy bases in XCF with troop ratio of 24:200 (Superhuman difficulty gives x2 boost of enemy spawn) and perform the f**king MASSACRE of both aliens and their human supporters.

Roughly, anyone believes that gameplay with basic AI if/else logic is limited to camping and abusing of AI limitations, but what about the fun part? These missions are very fun and satisfying in terms of enemy numbers.

2. The mods economies and progresses are largely dependent on possessions that player acquires from battlefield. Thus, in many cases, reducing amount of enemies is discouraged in terms of potential gameplay progress. Example is not only the item sell values, but also experience and stat boosts that player troops gain from missions with lots of enemies.
Most of the mods have player units transformation mechanics, which are vital for the progress. These mechanics allow player to extend the troops abilities behind some point of training. 90% of troops training comes from battlefield.

This also includes doubled chances of capturing mid-tier enemies, as their numbers are also quite frequently doubled, and killing one doesn't mean losing the mission purpose. Please notice, the amount of such missions is 40-50% in earlygame to 25% in midgame in XCF and X-Piratez, from overall value.

3. Most of the OXCE players don't play vanilla, but rather play X-Piratez, XCF or WH40k and other mods that are thoroughly (by years of creation) balanced with basic AI. I.e. unit stats, armors, weapon stats, etc.

4. a Little note about enemies avoiding primed sensor grenades and landmines: is it fair to cut off a player from such a tool? These items were implemented intentionally, for the purpose of enemies to freaking BLOW UP on them.

5. I have overall impression that your AI forces the player to tank more, have better Armor&Guns, have better stats (better night vision etc.), which is fairly impossible in XCF, for example, because events in the early to mid game are more or less incremental over your current progress.
   
6. The reaction fire is one of the classic mechanics and it is also refers more to the joy/excitement/gambling part of the game. Oh, yes, these mods contain such many gambling with probabilities deep in skin of players (not only in battlefield). The major of players are gambling maniacs. While giving new gambling mechanics, please not cut the established ones. The joy of running before the cyberdisc that can oneshot your unit with plasma (or not) is existential. The joy of killing it with autofire from machinegun (or not, and then get the plasma in the face) has purely gambling mechanic. Please consider it.

7. There was a suggestion about mixing behaviors in battlefield, i.e. assigning random roles. That was pretty neat suggestion, IMHO.

Such things translated, I hope to hear your thoughts on the topics. Preferably, please avoid answer "don't like - don't play", as many developers here simultaneously use it. I am really encouraged with your work.

With all respect,
« Last Edit: May 03, 2023, 06:04:38 pm by Abyss »

Offline Xilmi

  • Moderator
  • Commander
  • ***
  • Posts: 642
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 5.0.4
« Reply #118 on: May 04, 2023, 12:05:10 am »
Not really sure what to say to this.

I think your post could be summarized as: "The most popular OXCE-mods X-Com-Files and X-Piratez are not balanced to be playable with Brutal AI. Especially not, when you want to fight against the same enemy-numbers as on Superhuman."

I'd say all your poinds are kinda valid but I wouldn't really know what to do about it within the scope of my project.

I can recommend to using the easiest settings of Brutal-AI, of which I have attached a screenshot.

An option for the AI not to avoid proximity-grenades is probably a good idea.

I didn't change anything about how reaction-fire works. Except that the AI doesn't really like to walk through your line of fire, when it doesn't have to.

Mixing AIs is something that already can be done on the modding side. There it could be deliberately assigned to certain units.

It would also be possible to assign it to some but not all aliens via an option.

Offline Abyss

  • Colonel
  • ****
  • Posts: 355
    • View Profile
Re: [SOURCEMOD] Brutal-OXCE 5.0.4
« Reply #119 on: May 04, 2023, 12:05:51 pm »
Thank you for your kind reply, and thank you for the suggestion of options to set.

I'd say all your poinds are kinda valid but I wouldn't really know what to do about it within the scope of my project.

I didn't change anything about how reaction-fire works. Except that the AI doesn't really like to walk through your line of fire, when it doesn't have to.

I am sure that modders will, little by little, shift towards your solution. Think of smooth implementation without total rebalance of mods to ensure each mission isn't masochistic chess in case your troops aren't over-armored terminators.
Remember, the fun part is vital for the gameplay.

What can be fun? AI also makes mistakes!
- Low-tier and middle-tier enemies occasionally miscalculate hit chances and use autofire instead of aimed fire. Or forget to prime grenades before toss. Or blow themselves.
- Enemies occasionally switch the strategies mid-battle (berserk, flee, covering after other enemies)
- Enemies split to squads implementing different strategies: some flank, some suppress, some try actually to kill, and some being degenerates (running around and yelling/ trying to steal stuff from craft/ running for better weapon/ meat-shielding high-tier units/ grouping at no purpose/ not getting orders). The AI, in this case, does not coordinate the actions of all units at once, but coordinates the actions of teams of 2-[put your amount] units
- During night missions AI skips the death of it's unit (chance of silent kill). More likely, for kills with melee weapons in case of no reaction fire.
- Some units lag some turns before getting into action consideration (each turn by vanilla is 6-8 seconds of real time), mean they behavior is sort of vanilla/routine.
- Enemies sometimes also want to stun your troops and perform non-lethal strikes with possible ways (stun launcher, but if they barefist then so be it).

All this can shift balance a bit back to the player while AI still performs non-vanilla.

With all respect,

P.S. Also, I would like you to consider specific example: strong enemy unit being invisible past certain amount of cells (like high-tier ninjas from XCF are invisible past 4 cells), that possess both strong ranged and melee attacks. Even with vanilla AI they were quite a nuisance, but now...
Thank you for consideration to enable proximity grenades and landmines again.



« Last Edit: May 04, 2023, 12:49:12 pm by Abyss »