2 Tier Pathfinding for RP and Micromanagement Problems

In my opinion, there should be 2 tiers of pathfinding.

  1. Normal priority, in which hearthlings only try take paths a person would normally take.
  2. High priority, in which hearthling tries to take any available path. This is current behavior.

Right now,
Hearthlings walk through windows as if it were doors.
Hearthlings trample over farms (without penalty), causing metagame behavior.
Hearthlings walk over tables that others are eating at.
Hearthlings walk through lakes.
Hearthlings climb on storage.
Etc.

Note: I realize that water/irrigation is unimplemented and is a large factor into 2 of my scenarios.

Normally, I don’t want hearthlings walking where ever they please. However, if one is stuck, can’t find another path, is fleeing for life, is responding to combat/town defense orders, etc. I am all for them taking these paths.

This prevents hearthlings dying of starvation because they are too “polite” to escape a building from a window, in addition to preventing “inappropriate” behaviors. The pathfinding could even have advanced behaviors, such as having hearthlings “jumping” down 2 squares and taking damage.

Wrt, memory and performance, objects would only need to take 1 extra bit to be flagged as non-normal path. Not knowing what memory pathfinding currently looks at, it is hard to say about memory access impact. The pathfinding algorithm also doesn’t have to calculate both of these during the same pass. In modes like combat, they don’t need to make a normal pathfinding pass. Otherwise, I think it is perfectly acceptable for a hearthling to attempt a normal pathfinding pass first. Then, if he fails, potentially wait a bit and make a high priority pathfinding pass. If a hearthling is already in a high priority pathfinding pass, and the need is removed, there is no problem keeping him in the high priority pass’s path. If there is a need to recalculate pathfinding because the terrain changed, he could continue in the previous mode. If there is a need to recalculate pathfinding because he is starting a new task, then he could check to return to normal pathfinding.

As a side note, I realize that this is not a short term feature, but it is one that I would like planned for. I would implement it or at least do a POC.

Thanks for the read.