how does path finding works?

Started by dotsnake, October 26, 2014, 11:13:56 PM

Previous topic - Next topic

dotsnake

If I made a really long pathway from outside to my colony with no doors, and I made a short path from outside to my colony with 1 locked door, would the enemy AI go to the long hallway or destroy the door and go to the short hallway?

ShadowTani

They do not go for your homezone if that's what you hope. They will target the closest construction, [I assume] walls is the least priority if they can't find anything else to target. So if your doors is closer than whatever potential target you got on the other side of that long path then they will target your doors first.

dotsnake

I was hoping to make an open kill box, and a lock door, for colonist to bypass said kill box.
I guess that's not gonna happen.

Cimanyd

A short answer: If I understand correctly, it'll work, but if your killbox is too hard to go through (too long, or too full of sandbags, or whatever) you might need more than one door.

I think ShadowTani is referring to what they do when they don't have enemies (e.g. colonists) to attack nearby. They attack or ignite structures you own, but I don't think it's based on distance. However, the way their pathfinding works, if one decides to light a bed on fire and the only way to the bed is through a door, he'll try to go through the door. So if one decides to light a bed on fire, another to attack your butcher table, another to set a standing lamp on fire, etc., and all of those are in the same interior area, you'll see them all punching the door to the area where they are.

The question is how exactly the pathfinding handles doors. A group of 30 will take the same time to walk over sandbags as one person, but they'll punch through a door much, much faster than one person. I don't think the AI takes that into account, though. So, if people think "a floor takes this long to walk through" "tall grass takes this long" "sandbags take this long" when pathfinding, how hard do enemies think doors are to go through? Does it matter what health the door has?
Some sort of psychic wave has swept over the landscape. Your colonists are okay, but...
It seems many of the scythers in the area have been driven insane.


skullywag

If they do not prioritise the closer locked doors then that needs changing imo. The AI should probably try the front entrance amd if it loses a few guys send em round to the doors. Hopefully we will see some improvementdls to the AI in later alphas.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?