Author Topic: Rumors about incompatibility with Brutal-OXCE  (Read 2775 times)

Offline Xilmi

  • Colonel
  • ****
  • Posts: 297
    • View Profile
    • Email
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #30 on: March 27, 2023, 04:58:57 pm »
Launch Ratman Cache mission. And no, there is 0% chance of it being blind fire, unless your AI tries blind fire through 30 tiles of solid rock :)
I suppose the one called "D.I.L.D.O." is what's otherwise referred to as the damsel. The one that's tied to something with a rope or so.
If it is, I can report that it doesn't get shot at by the Ratmen in the current version (4.0.1).

I'm also not quite sure how you came to the conclusion that "there is 0% chance of it being blind fire, unless your AI tries blind fire through 30 tiles of solid rock".

The way it was implemented was that if the target was not valid, it would go by the memory of where the target was last seen. Normally the target not being valid was the result of the target not being seen. But when the target wasn't valid because it used the isIgnoredByAI-flag, then "not being valid" and "being currently visible" is not a contradiction". Basically it was: "I'm not allowed to shoot the damsel but I am allowed to shoot where I have last seen any unit that I'm not allowed to shoot for whatever reason." And since when they see something the memory of where they saw it the last time equals the actual position, they would shoot it. An oversight by me not thinking about other reasons of target-invalidity than not being visible to anyone on the team.

Offline Xilmi

  • Colonel
  • ****
  • Posts: 297
    • View Profile
    • Email
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #31 on: March 27, 2023, 05:31:39 pm »
The biggest difference between intentional and unintentional AI behaviour is not their actuall behaviour, but balance. And your mod/client can't do it for mod creator. Those armor values, those TU's, that Stamina/Reactions/Strenght has to be tweaked, just as they are tweaked when choosing different difficulty settings.
I think of Brutal-AI as additional difficulty-levels above the existing ones. Now I'm not sure whether Beginner with Brutal-AI is more difficult or not than Superhuman without. This does of course depend on how the difficulty-levels are balanced among each other.

I'm just saying that if the highest difficulty level is overtuned for Brutal AI, that doesn't automatically mean that all of the available difficulty-levels are.

The 40k community was very supportive in helping me get Brutal-AI properly work together with their mod. They even made specific sub-mods to rebalance the enemy-counts for it since they use what's normally difficulty-level selection as faction-selection.

In general I think that a cooperative mindset is more likely to make things work than a competitive one.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11102
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #32 on: March 27, 2023, 05:55:52 pm »
For what it's worth, I hope your fork will become fully compatible with Piratez. It's good to have a choice!

Offline Torchwood

  • Sergeant
  • **
  • Posts: 47
    • View Profile
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #33 on: March 27, 2023, 08:54:55 pm »
I'm glad to see this initiative, because in spite of the criticism, I'm eager to see a difficulty challenge that is more than just adding more enemies and forcing dangerous missions early. With the in mind, my experience in coding for OXCE is very limited so I can only offer support in wishing you well in your endeavours and play-testing the resulting game.

Offline Yankes

  • Commander
  • *****
  • Posts: 2999
    • View Profile
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #34 on: March 27, 2023, 09:45:07 pm »
I think of Brutal-AI as additional difficulty-levels above the existing ones. Now I'm not sure whether Beginner with Brutal-AI is more difficult or not than Superhuman without. This does of course depend on how the difficulty-levels are balanced among each other.

I'm just saying that if the highest difficulty level is overtuned for Brutal AI, that doesn't automatically mean that all of the available difficulty-levels are.

The 40k community was very supportive in helping me get Brutal-AI properly work together with their mod. They even made specific sub-mods to rebalance the enemy-counts for it since they use what's normally difficulty-level selection as faction-selection.

In general I think that a cooperative mindset is more likely to make things work than a competitive one.
"sub-mods to rebalance" this is good thing but this is bad thing too. Because there is colossal gap between old AI and your new AI, and every mod need heavy rebalance all game play to handle difference, and this is sometimes pill too big to swallow. Some modders prefer adding new fluff, new mission, items etc. than rebalacing whole game again.

Image case that you change was split in 36 pieces and each month you add one part of it to OXCE, as some changes are subtile nobody notice it but every one slowly adjust to it and balance around it. After 3 years you have your ideal AI and no drama or threads about "incompatibility", simply every one is adjusted and expect its as default.
And this is mindset I try follow, slowly changing even add breaking changes but always give time to modders (and users) to adjust, and this way one of reasons why you can disable some checks in OXCE.


Offline lancev

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #35 on: March 27, 2023, 10:09:41 pm »
I am neither developer nor modder, but I have played Piratez a lot and here is what I think:
The point is that some enemies SHOULD NOT be too intelligent and use squad sight etc.. It doesnt fit in the lore if hooligans or prostitutes or some beasts use spotter/sniper tactics. IMHO this is not a place to increase difficulty.
On the other hand it would be very nice if the supposedly elite enemies would be more intelligent. It was always disappointing to see when the mercenaries stumble just as helplessly into a hideout as the bandits do.
So I think it would be cool if BrutalAI could be activated/deactivated on a unit by unit basis (possibly with more options to customize the behavior of individual units). Of course, I am not sure if this is feasable from a developers point of view or if the modder would want to implement such things.

Offline Yankes

  • Commander
  • *****
  • Posts: 2999
    • View Profile
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #36 on: March 27, 2023, 10:24:06 pm »
I am neither developer nor modder, but I have played Piratez a lot and here is what I think:
The point is that some enemies SHOULD NOT be too intelligent and use squad sight etc.. It doesnt fit in the lore if hooligans or prostitutes or some beasts use spotter/sniper tactics. IMHO this is not a place to increase difficulty.
On the other hand it would be very nice if the supposedly elite enemies would be more intelligent. It was always disappointing to see when the mercenaries stumble just as helplessly into a hideout as the bandits do.
So I think it would be cool if BrutalAI could be activated/deactivated on a unit by unit basis (possibly with more options to customize the behavior of individual units). Of course, I am not sure if this is feasable from a developers point of view or if the modder would want to implement such things.
As far I know per unit enabling should be already implemented, but detailed customization is missing.

Offline MaxMahem

  • Captain
  • ***
  • Posts: 61
    • View Profile
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #37 on: March 27, 2023, 11:16:35 pm »
I think of Brutal-AI as additional difficulty-levels above the existing ones. Now I'm not sure whether Beginner with Brutal-AI is more difficult or not than Superhuman without. This does of course depend on how the difficulty-levels are balanced among each other.
I'm 100% behind your efforts with the AI though I think this mindset can be somewhat limiting. Having an ai that acts more intelligently can be a desirable feature regardless of the difficulty level. Like, I would enjoy playing against a more intelligent opponent, but I do not necessarily always want to play a game that gives the enemy all the numerical and statistical advantages that come with a higher difficulty level.

Offline karadoc

  • Colonel
  • ****
  • Posts: 230
    • View Profile
    • Email
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #38 on: March 28, 2023, 02:15:11 pm »
I like the idea of having AI that can make sensible decisions about what to do based on live game data, including what they see, their memory, weapon stats and armour stats if they know them, best guess if they don't, etc. I think that's a worthwhile aim. And I've spent a lot of work doing a similar thing for a different game in the past. But we have to also understand that XPZ is not just a sequence of tactical combat puzzles. It's a rich and varied world; with story and characters, and different styles of missions and items and enemies. So although the player is trying to win the mission, the enemies may not be seeing the world through that tactical lens.

Unorganised and untrained ruffians should not be tactical experts. Civilians (both neutral and enemy) are not soldiers. We don't really want them to be forming coordinated teams to outflank or ambush the player; or even be able to choose whether or not their gun is strong enough to fight. Similarly, most zombies are not smart... it would be nice if basically just walked towards the enemy and tried to attack regardless of risk. We don't really want them retreating to take cover - and we definitely don't want the mindless zombies picking up guns.

On the other hand, there are some factions and units which could thematically use fancy tactics without breaking the mood of the game. Currently the 'sniper & spotter' flags are used to provide some of this extra 'fancy tactics' to suitable AI units.

In any case, for a large-world mod like XPZ, I think flavour and personality of the AI is more important than its tactical skill. There are already many variables which can be tweaked to adjust the difficulty of the game; so making the game more difficult is on its own is not a good goal. If there is to be AI changes, it should be to make the game more interesting and varied. For that, I think it is critically important that the AI be customisable by modders. If there are some smart tactics available to the AI, that could be cool - but it should be possible to turn them off so that we don't have player teams getting manoeuvred by supposedly mindless enemies. Otherwise the modified AI just cannot be suitable for lore-rich mods.

If the goal is to make BrutalAI something that can be just plugged into XPZ without wrecking the game, then it needs to try to respect the existing AI flags. (eg. sniper / spotter / leeroy).  Having the missions be playable without crashing isn't really enough to call it 'compatible'. It must preserve the themes of the enemies. (Even then, there are many other things to consider; but I the stuff I've said is the stuff I think is most important.)

Online Juku121

  • Commander
  • *****
  • Posts: 1041
  • We're all mad here.
    • View Profile
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #39 on: March 28, 2023, 02:57:09 pm »
That is a fine sentiment... until you consider that pretty much every strategy game developer, big or small, has had these exact same thoughts and the end result is that strategy game AI is nearly universally incompetent and relies on various cheats to keep up appearances. Xilmi is one of the very few people trying to make AIs that can beat the player fair and square. Not just for X-Com, either.

In any case, you can already turn BAI on and off for individual enemies. It's sort of like flipping both the 'sniper' and 'spotter' flags at once. It'd be neat if the two could be separated, but that seems not to be a priority for Xilmi.

Leeroys have also been returned to mostly vanilla and there's now a new 'aggressive' flag.

Off-offtopic, but I've now been trained to consider the tag 'story rich' a red flag for a game and skip it when a store advertises it as such. So careful about 'lore-rich'. :P

Offline Torchwood

  • Sergeant
  • **
  • Posts: 47
    • View Profile
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #40 on: March 29, 2023, 07:30:42 pm »
I am neither developer nor modder, but I have played Piratez a lot and here is what I think:
The point is that some enemies SHOULD NOT be too intelligent and use squad sight etc.. It doesnt fit in the lore if hooligans or prostitutes or some beasts use spotter/sniper tactics. IMHO this is not a place to increase difficulty.
On the other hand it would be very nice if the supposedly elite enemies would be more intelligent. It was always disappointing to see when the mercenaries stumble just as helplessly into a hideout as the bandits do.
So I think it would be cool if BrutalAI could be activated/deactivated on a unit by unit basis (possibly with more options to customize the behavior of individual units). Of course, I am not sure if this is feasable from a developers point of view or if the modder would want to implement such things.

Perhaps a compromise is in order - give enemies varying levels of intelligence. A pro mercenary who spent a lifetime studying and practicing warfighting would obviously be much more savvy than the average joe bandit. With a compromise that high ranking members could act as officers who coordinate allied units and share their intelligence level with lower ranking faction members. You could even simulate enemies falling into chaos and acting less organized if the leader dies or is knocked out.

Offline Xilmi

  • Colonel
  • ****
  • Posts: 297
    • View Profile
    • Email
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #41 on: March 31, 2023, 12:10:19 am »
I played a couple of missions in X-Piratez with Brutal-AI and difficulty set to the second lowest.

This was pretty chill and at least in the early missions was very playable. Only took some damage but got noone killed in 4 missions or so.

In regards to having different kinds of enemies having varying behaviour:

As Yankes and Juku121 have said, there already are options for that. But this requires the Modder to be willing to use them.

It would be realised by globally disabling Brutal-AI and enabling/customizing it on a unit-per unit basis.

Units can be:

- controlled by base-AI and employ all the different cusomization-options of base-AI
- use the brutal-version of Leeroy with isBrutal and isLeeroyJenkins enabled (always attack and limited to melee)
- use a brutal-version of something similar to Leeroy but including ranged-weapons with isBrutal and isAggressive enabled
- controlled by brutal-AI but not act as a sniper by using isBrutal and aiTargetMode = 1
- controlled by brutal-AI like it would normally be by using isBrutal
- controlled by brutal-AI and having the "sixth sense" by using isBrutal and isCheatOnMovement
- controlled by brutal-AI and ignoring stealth, smoke, etc by using isBrutal and aiTargetMode = 4

A limitation is that while sniping can easily be disabled, this isn't true for spotting. The entire architecture of the Brutal AI is built around using shared knowledge of the entire team, which isn't tied to any particular indiviual. Like if a shot gets fired or a door gets opened, the whole team gets to know about that. That knowledge is not just used for what to attack but also for the movement-logic.
It is possible to ignore that knowledge on a unit by unit basis. But since the accumulation of the knowledge isn't tied to a specific unit, its accumulation for the team cannot really be prevented.

Anyways, there are quite a bunch of customization-options to mix smart and not so smart units. But whether and how to make use of them is up to the modders.

Offline Xilmi

  • Colonel
  • ****
  • Posts: 297
    • View Profile
    • Email
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #42 on: March 31, 2023, 12:26:51 am »
Image case that you change was split in 36 pieces and each month you add one part of it to OXCE, as some changes are subtile nobody notice it but every one slowly adjust to it and balance around it. After 3 years you have your ideal AI and no drama or threads about "incompatibility", simply every one is adjusted and expect its as default.
Well, there are a few parts that are pretty modular, like brutalPsiAction, brutalBlaster, brutalGrenadeAction and brutalSelectSpottedUnitForSniper. The name of the latter doesn't really reflect what it does, as it does way more now than the original method it was based on: cycling through all weapons, all fire-modes, all valid enemies and different locations to all score them against each other. The rework of it was massive enough to warrant an entirely new major-version.
The by far biggest part, however, is the movement-logic. This cannot really be split into separate parts and is a bit of a monstrosity. The issue was mostly that in order to save processing time, the scores for different modes of operation are all determined in the same loop and which one is eventually used depends on a lot of impacting factors.

Offline Yankes

  • Commander
  • *****
  • Posts: 2999
    • View Profile
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #43 on: March 31, 2023, 12:47:28 am »
yup, but by point was bit different, if you did colossal refactor and simply do not use all benefits of it, user could only notice that game "roll" different RNG this time that in old version, whole goal would be not recreate old behavior, only be close enough to go under radar.

I have even example of this, did you notice that I recent version rewrite near from scratch vapor particles? it was near 180 degree turn how its handed by engine.
But near no effect visible for user (for now only!). Instead of 2d pixels on screen, now are true 3D points on map space.

Offline Xilmi

  • Colonel
  • ****
  • Posts: 297
    • View Profile
    • Email
Re: Rumors about incompatibility with Brutal-OXCE
« Reply #44 on: March 31, 2023, 11:01:33 am »
I noticed your commits but didn't dive into what they do. Thanks for explaining. I'd have liked to use a functionality of drawing at a particular voxels in the debugging, when I wrote my own quickLineOfFire, to see whether it actually does what it's supposed to do. Could have saved me quite a bit of trial-and error.

So I guess it's similar to how I handle turn-processing for AI differently in Brutal-OXCE.

If you disable Brutal-AI, the new turn-processing will still run in the background.

My issue with the old one was that it was very easy to create endless-loops accidentally in the AI. As soon as a command couldn't be executed and used the action-count -= 1 trick, it would try over and over. So earlier versions would get stuck unless I spent a lot of effort catching all possible invalid commands beforehand.

And since the base-AI didn't do that, I couldn't make it play together with Brutal-AI without the game getting stuck.

So what I changed was just that whenever the API pops from an action without having any TU's spent, it sets the unit to skip from now on.

Other than that my approach wasn't to transform the AI but leave it exactly as it is while adding an optional new one, in which I could do whatever I want without the restrictions of the old one.

The idea of switching between different AIs instead of having one that can be heavily configured stems from the game that I was working on before. In that game the user can choose between 8 different AIs. Some of them share most of their sources and are only different in details. Others are completely different.

I thought that for backwards-compatibility it definitely makes sense to keep the existing AI exactly as it is.