Author Topic: [To be tested] leeroyJenkins doesn't work?  (Read 2557 times)

Offline Ruberto

  • Colonel
  • ****
  • Posts: 118
    • View Profile
[To be tested] leeroyJenkins doesn't work?
« on: October 01, 2021, 11:09:36 am »
Hello
I would like to bring an issue to your attention.
The melee enemies, especially beasts ( so far encountered zombies, megascorpions and white shamblers), seem to operate like this:
1) if within range to move and attack player's gal they do so;
2)  in out of range to attack this turn, the beast mills around aimlessly, neither advancing meaningfully, nor purposefully hiding out of line of sight.
As a result they often wander around and stay in sight of my soldiers, who happily shoot them to bits turn after turn.

Perhaps it would be possible to change melee-only enemies action algorithms to something more meaningful like:
1) if within range to move and attack player's gal they do so;
2) if out of range, move to end it's turn closer to nearest enemy*  but out of sight or in cover from maximum number of enemies (advancing from cover to cover, so to speak).
3) if unable to do so, either charge straight at nearest enemy, or hide out of line of sight.

When measuring what player unit is nearest to "advance under cover" to, ai melee units should ignore units that can fly (unless they can fly too, or mission is in tunnels where units can't fly very high), to avoid parrot or some other flying unit baiting away all the monsters who can't even touch it.

Also, the "advance under cover / charge towards nearest opponent" might be changed to "advance to end up as close to as many opponents", calculating lowest sum distance.

Note that when saying "closest" I mean "requiring least TU to reach it", not just linearly closest, otherwise if there is a wall between monster and soldier, monster just bumps into wall, because going around would take him linearly further away from it's target.
« Last Edit: February 19, 2023, 10:16:58 am by Meridian »

Offline Finnik

  • Colonel
  • ****
  • Posts: 492
  • Finnik#0257
    • View Profile
Re: [Suggestion] Dumb melee AI & suggestion
« Reply #1 on: October 06, 2021, 02:25:26 am »
I also notice that OXC AI is meant to handle melee units with huge TU pool (crysalids), so they can easily charge from a great range. But I also played with unit AI setup (leroy jenkins and aggression), but i failed to make nice behaviour for slow tough units, like zombies. I ended up with conclusion, that AI Module needs additional state, that would check if there is no range attack option (when the unit would like to attack, not patrol or set up ambush). And if it cant reach the target within a single turn, it would instead go to the closest possible position. What do you think guys?

Offline Nord

  • Commander
  • *****
  • Posts: 1637
  • The Gate is open.
    • View Profile
Re: [Suggestion] Dumb melee AI & suggestion
« Reply #2 on: October 06, 2021, 09:14:31 am »
I agree. Most of slow melee enemy roaming mindless, and play an easy target.

Offline Yankes

  • Commander
  • *****
  • Posts: 3206
    • View Profile
Re: [Suggestion] Dumb melee AI & suggestion
« Reply #3 on: October 07, 2021, 12:44:45 pm »
If I recall correctly there is "leeroy jenkins" mode where alien will rush target even if it will be exposed

Offline Finnik

  • Colonel
  • ****
  • Posts: 492
  • Finnik#0257
    • View Profile
Re: [Suggestion] Dumb melee AI & suggestion
« Reply #4 on: October 07, 2021, 01:34:40 pm »
If I recall correctly there is "leeroy jenkins" mode where alien will rush target even if it will be exposed

I tried this option too, for my tests it does not change ai choices. IMO, if we talk about some zombies, beasts or something like that - they have to act way more aggressive.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8615
    • View Profile
Re: [Suggestion] Dumb melee AI & suggestion
« Reply #5 on: October 07, 2021, 01:58:58 pm »
Then you probably didn't satisfy leeroy conditions, e.g. melee only, etc.

Leeroys patrol until they spot someone and then blindly charge.

You can see if that's happening using AI trace option.

Offline Nord

  • Commander
  • *****
  • Posts: 1637
  • The Gate is open.
    • View Profile
Re: [Suggestion] Dumb melee AI & suggestion
« Reply #6 on: October 07, 2021, 04:50:11 pm »
Then you probably didn't satisfy leeroy conditions, e.g. melee only, etc.
According to this topic, no special leeroy conditions needed. Is there something more that we dont know?