Author Topic: Healing for enemy units  (Read 7272 times)

Offline firsttefl1

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Healing for enemy units
« on: October 04, 2017, 11:47:45 am »
A certain idea has been bothering me for quite a long time (though you might call it another case of XCOM masochism) - why can't enemy units heal themselves? After all, there is a Medic unit for most of alien races. And adding some healing spray to enemy's equipment should not be hard.
The question is whether it is a feasible idea in terms of in-game mechanics. Is it possible to make enemy units use healing spray or even medkits to help themselves or their fallen allies? For now, wounded enemy units mostly retreat to bleed somewhere to death.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • ***
  • Posts: 11694
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Healing for enemy units
« Reply #1 on: October 04, 2017, 11:50:53 am »
Right now the code does not support such a feature. I agree it would be good to have though.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9009
    • View Profile
Re: Healing for enemy units
« Reply #2 on: October 04, 2017, 12:04:54 pm »
Medikit only "fixes" fatal wounds, it doesn't actually "heal"... and vanilla aliens cannot bleed, so there was no need to add such AI feature.

Modded "aliens" usually can bleed... but adding such a feature in my opinion is against their interests... instead of shooting at xcom, they would run to their wounded comrades to heal them and get killed themselves.

---

You can see this "smart AI abuse" very well in xcom2012:
- if you let's say suppress an enemy, it doesn't care what the other xcom soldiers do, it always fires back at the suppressor, or hunkers down or something... never shoots at other people... even if they are flanked and just a few tiles away
- or EXALT medics pointlessly healing themselves or their comrades just to get killed next turn... instead of shooting at xcom

When you know a little bit how AI in xcom2012 works... it is RIDICULOUSLY easy to avoid getting hurt... you can abuse the shit out of AI being "too smart".

Offline firsttefl1

  • Sergeant
  • **
  • Posts: 32
    • View Profile
Re: Healing for enemy units
« Reply #3 on: October 04, 2017, 12:55:17 pm »
Ok, I can see your point.

 Would a fire extinguisher be a good (and possible) idea? So many of those incendiary grenade accidents (and silacoid attacks).

Offline tkzv

  • Commander
  • *****
  • Posts: 583
    • View Profile
Re: Healing for enemy units
« Reply #4 on: October 04, 2017, 01:53:11 pm »
Would a fire extinguisher be a good (and possible) idea? So many of those incendiary grenade accidents (and silacoid attacks).
And while you are at it, what about fire extinguishing grenades? Some kind of smoke grenades that aren't very good at blocking view, but remove fires.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9009
    • View Profile
Re: Healing for enemy units
« Reply #5 on: October 04, 2017, 02:45:30 pm »
Ok, I can see your point.

 Would a fire extinguisher be a good (and possible) idea? So many of those incendiary grenade accidents (and silacoid attacks).

Fire extinguisher "projectile weapons" are already available for modders.

And while you are at it, what about fire extinguishing grenades? Some kind of smoke grenades that aren't very good at blocking view, but remove fires.

Fire extinguisher "grenades" are not available.... yet.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • ***
  • Posts: 11694
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Healing for enemy units
« Reply #6 on: October 04, 2017, 03:24:41 pm »
This is a very interesting problem. Would the aliens be at a disadvantage if they had medics, or would they(marginally) profit?
I don't know. On one hand, indeed they would lose some TUs for healing wounded comrades (especially if they were far away), for not that much of a profit. On the other hand, bleeding units could no longer be ignored by the player.

I personally think it would be more fun. There aren't many possibilities to liven up the Battlescape, and this would be such a thing. I have fond memories related to enemy medics in Aftershock, so I can't dislike the idea.

Offline animal310

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: Healing for enemy units
« Reply #7 on: October 11, 2017, 10:53:28 pm »
I agree, it would be a great feature.

Offline mumble

  • Colonel
  • ****
  • Posts: 338
    • View Profile
Re: Healing for enemy units
« Reply #8 on: October 12, 2017, 04:33:46 am »
Biggest thing would be AI. How would you prioritize healing VS fighting? Would a medic try an save someone at the risk of themselves? would others run to the medic?

xcom has decent AI, but as far as I know the AI doesn't even play defensively and take cover like humans, so I'm skeptical how good this could be.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Healing for enemy units
« Reply #9 on: October 12, 2017, 05:30:58 am »
The AI does try to run and hide or ambush you, there's even some self-preservation code in there. Doing support actions like healing isn't too far out there to put in the AI's decision matrix.

Offline mumble

  • Colonel
  • ****
  • Posts: 338
    • View Profile
Re: Healing for enemy units
« Reply #10 on: October 12, 2017, 05:40:45 am »
Really? Guess I don't see it as much as I expect, like shooting then moving in cover, or crouching behind low obstacles..

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9009
    • View Profile
Re: Healing for enemy units
« Reply #11 on: October 12, 2017, 09:15:14 am »
There is an option "sneaky AI" for ending their turn in cover/hiding.
They cannot crouch... only xcom can.

Offline Zyzyfer

  • Captain
  • ***
  • Posts: 56
    • View Profile
Re: Healing for enemy units
« Reply #12 on: October 12, 2017, 09:53:24 am »
The AI doesn't seem to fight as team and spawns a bit too randomly.  I can see huge problems with healing AIs (on most maps); when the lonely medic spawns on the wrong side of the map et cetera.

Offline mumble

  • Colonel
  • ****
  • Posts: 338
    • View Profile
Re: Healing for enemy units
« Reply #13 on: October 12, 2017, 10:33:40 am »
There is an option "sneaky AI" for ending their turn in cover/hiding.
They cannot crouch... only xcom can.
I would, but I don't want this for ALL enemies, just humans and intelligent aliens.

Some dumb enemies should be devoid of this script, while others would highly benefit.

...I wish this could be an AI tag assigned at the discretion of the modder.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • ***
  • Posts: 11694
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Healing for enemy units
« Reply #14 on: October 12, 2017, 12:16:54 pm »
I wish for the same.
But first I would like to see AI code for limited range weapons...  8)