Author Topic: Should the AI consider enemy range and partial cover?  (Read 10182 times)

Offline Rubber Cannonball

  • Colonel
  • ****
  • Posts: 195
    • View Profile
Re: Should the AI consider enemy range and partial cover?
« Reply #30 on: February 01, 2020, 06:38:50 am »
..., the only alternative is to not let the AI know they were hit at all.

Interestingly enough that seems to be the effect if the enemy spotter unit is hit from outside its vision cone with a melee weapon.  So long as the melee xcom unit isn't seen by any alien, its position remains unknown to the ai regardless of how many blows it lands.

Offline Bobit

  • Colonel
  • ****
  • Posts: 186
    • View Profile
Re: Should the AI consider enemy range and partial cover?
« Reply #31 on: February 01, 2020, 07:29:25 am »
Really? That is interesting. Of course if the melee attacker doesn't flee, the spotter will likely turn around and see him anyways. But repeatedly backstabbing an enemy then fleeing seems, in a very rare situation, completely broken.

Offline Rubber Cannonball

  • Colonel
  • ****
  • Posts: 195
    • View Profile
Re: Should the AI consider enemy range and partial cover?
« Reply #32 on: February 01, 2020, 11:46:09 pm »
This is a "vanilla" AI cheat that is exacerbated by he sniper code when it's overtuned in a mod. If you shoot an alien in the original game the soldier that did the shooting is now "known" to the AI, and any aliens are free to psi spam and blaster bomb them until more turns than the aliens' intelligence have passed without re-spotting.

I think the vanilla spotter for psi was fine since psi wasn't a line of sight attack anyways and was mitigated by distance and psi defense.  In fact, I'm not sure it would be too bad if the aliens didn't even need to spot an xcom unit before being able to psi attack it.

Was the blaster launcher the only weapon that used the spotter mechanic in the original game?  I don't think the blaster launcher carrying aliens ever had any other weapons like grenades or plasma pistols.  At any rate between the bugs and alien accuracy, it seemed like the aliens did as much damage to themselves with the blaster bombs as they did to xcom.

But yeah in some mods ones' troops can't go outside if they can't tank whatever the enemy is packing.  Unless they always whack 'em from behind of course.   ::)

Offline Countdown

  • Colonel
  • ****
  • Posts: 246
    • View Profile
Re: Should the AI consider enemy range and partial cover?
« Reply #33 on: February 03, 2020, 02:00:28 pm »
This my code, this was added prevent alines from doing stupid things. Player can know after couple of tries that attacking some unit from front is not effective, but aliens do not remember this (and even if remember they can't carry this knowledge between missions).
I agree we should keep behaviors like this to minimum, but in some corner cases we could help a bit AI do not have big disadvantage.
Another place where AI use behavior like this is psi attacks.

As always, question is how much "a bit" is.
One way this both cases could be fixed is count numbers of attack on unit, each time AI have better "knowledge" and can use more units stats to plan next move.
But current TU would not be accessible because you can't determine it without seeing unit movements on previous turn (and this could be only way to know it).

This makes a lot of sense and sounds reasonable. I hadn't even thought of how aliens already do this with psi attacks since they target the mentally weakest soldiers. Good point.


Because:
1/ one oxce dev reverting the work of another oxce dev would just be childish and stupid
2/ Yankes has given convincing arguments to justify it
3/ unless you read the code, you'll never be able to find out that it even exists
4/ my playtests didn't show any increase in AI ability to kill me, so I consider it a "harmless cheat"

Besides, if I removed all features I don't like, I would remove 30% of oxc code, 30% of oxce code not made by me and probably even 30% of oxce code made by me... but I do respect other people's work, opinions and tastes... and life is full of compromises (alternative is a pretty miserable life).

Fair enough, I was just curious. I agree that Yankes' points were a good justification. He convinced me.

Offline Rubber Cannonball

  • Colonel
  • ****
  • Posts: 195
    • View Profile
Re: Should the AI consider enemy range and partial cover?
« Reply #34 on: February 03, 2020, 11:01:54 pm »
Really? That is interesting. Of course if the melee attacker doesn't flee, the spotter will likely turn around and see him anyways. But repeatedly backstabbing an enemy then fleeing seems, in a very rare situation, completely broken.

Yeah I agree.  I did some savescum testing in x-piratez with a ghost armor gal against a merc commando.  If she one shot killed the merc in the back with the ranged attack ghost beam, she was spotted by the ai and thus fired at and grenaded on the enemy turn.  If she killed the merc from the front with the melee ghost dagger, she was again spotted by the ai, but when she killed the merc from behind with the dagger she was't spotted.  If she crossed into the merc's vision cone before killing from behind with the dagger she was again spotted. No other merc unit was ever in range to spot the gal.

I suppose this means that in vanilla if one goes against ethereals with stun rods only and manages to never be seen one could avoid psi attacks until down to only 2 ethereals left or turn 20.  I haven't tried this.

Offline pvalleyth

  • Squaddie
  • *
  • Posts: 1
    • View Profile
    • ข่าววอลเลย์บอล
Re: Should the AI consider enemy range and partial cover?
« Reply #35 on: March 24, 2020, 10:40:49 am »
thank information :)

Offline pmotosporth

  • Squaddie
  • *
  • Posts: 1
    • View Profile
    • ข่าวมอเตอร์สปอร์ต
Re: Should the AI consider enemy range and partial cover?
« Reply #36 on: March 31, 2020, 07:40:41 pm »
I believe some more variety in AI behaviour would be great. One could add them as additional options activated by mods.

Gesendet von meinem Pixel 3 mit Tapatalk