Author Topic: Better path finding for civilians like avoid fire  (Read 4046 times)

Offline MrFrustrated

  • Colonel
  • ****
  • Posts: 104
    • View Profile
Better path finding for civilians like avoid fire
« on: November 06, 2014, 12:29:45 am »
Better path finding for civilians.

For example, I have one right now sitting in the middle of a fire. Not a massive infero but a solitary patch of fire.

I so wish we could play as aliens, so I could butcher those dumb jerks.

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Better path finding for civilians like avoid fire
« Reply #1 on: November 06, 2014, 12:33:10 am »
"Frag Out!"  ;)

Offline NoelBuddy

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: Better path finding for civilians like avoid fire
« Reply #2 on: November 06, 2014, 04:25:34 am »
Not sure how difficult the programming would be, but perhaps an intelligent civilian option similar to the sneaky alien setting would be good for this.

Have them:
Avoid any path that ends on a burning tile
first move away from any visible aliens
if no aliens are visible move away from gunfire and explosions
...

...the next step from that would be adding police and armed civilians.

Offline TaxxiDriver

  • Captain
  • ***
  • Posts: 97
    • View Profile
Re: Better path finding for civilians like avoid fire
« Reply #3 on: November 06, 2014, 07:53:19 am »
Not sure how difficult the programming would be, but perhaps an intelligent civilian option similar to the sneaky alien setting would be good for this.

Have them:
Avoid any path that ends on a burning tile
first move away from any visible aliens
if no aliens are visible move away from gunfire and explosions
...

...the next step from that would be adding police and armed civilians.

It would be really awesome, indeed. Those sound great.

I'd personally add that after they've seen the agents, they try to come close to the agents' side if all those previous conditions are not acting on that civilian, and ultimately near the Skyranger. That would make you feel you're really protecting those civilians (rather than just using them as a meat shield  ::) they shouldn't just keep moving like crazy)


Offline NoelBuddy

  • Colonel
  • ****
  • Posts: 142
    • View Profile
Re: Better path finding for civilians like avoid fire
« Reply #4 on: November 06, 2014, 06:36:43 pm »

I'd personally add that after they've seen the agents, they try to come close to the agents' side if all those previous conditions are not acting on that civilian, and ultimately near the Skyranger. That would make you feel you're really protecting those civilians (rather than just using them as a meat shield  ::) they shouldn't just keep moving like crazy)



How about, if when they start their move they are within 3 squares of a soldier they bee-line toward the skyranger, basically the soldier telling them where to go. So...

if they see an alien: full panic move away as much as possible
else: reject any path ending in fire and;
check if they have been told to go to sky ranger, if yes do so;
else:
check if they are within range of a soldier to tell them, if yes set status to told and go;
else:
check if they can see a soldier, if yes move towards them;
else:
find nearest hit or explosion from previous turn and move away.

Offline LeBashar

  • Colonel
  • ****
  • Posts: 119
    • View Profile
Re: Better path finding for civilians like avoid fire
« Reply #5 on: November 06, 2014, 07:06:34 pm »
I don't know how civilian now choose their move, but the principle of panic is to lost rational mind, and so, there is always somebody to throw himself in fire, or a window as high for be killed by the fall, run into an obvious line of fire or do dumbiest things we can't even imagine ;)

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Better path finding for civilians like avoid fire
« Reply #6 on: November 06, 2014, 08:09:32 pm »
I totally agree that civilians should have morale and panic. They would lose morale as other civilians and XCom operatives get killed. Once panicked, they should act like the idiots they are now. [I can't believe the number of time a civilian ran to stand just in front of an alien, blocking my line of fire, or right in front of a door to prevent me from entering a house (that last one may be excusable as thinking my soldier was dangerous to them, I guess)].

Before they get panicked, the kind of behaviour described by NoelBuddy would be awesome. Having it tied to civilian morale would also make it so that you would want to reach civilians ASAP so that you get them while they're not panicked and can guide them to the skyranger. Instead of now where there's really no point trying to reach them since they're stupid and will most likely get killed either way.

Of course, a boost in civilian AI should come with a reduction in points for saving them (it is easier, and really, saving civilians should be what's expected of XCom, not a bonus), as well as an increase in negative points for losing civilians (since it is easier to save them and because we should really try to save them).

An XCom operative should put himself between a civilian and an alien because it is his duty to save him, not duck in cover and roll his eyes when the civilian gets blasted away. It is unfortunate that currently, there is no point in doing that.