Perfect Pathfinding
~ Description ~
Drawing a path between two points can be more of an art than a science. Finding the shortest path is straightforward, but it takes precious time. When every millisecond counts you may want to find a good path quickly over the perfect path slowly. The trick as a designer is making decisions on what you can simplify away, how much time you can save, and how good is good enough. This mod is for the stubborn people who disagree with those decisions.
~ Features ~
Heuristic Patch:
In vanilla, when a pawn targets a far away location, the game uses a ‘rushed’ version of the pathfinding algorithm. This causes the "zig-zag" paths that veer off course when approaching corners and doorways, and "beeline" paths through difficult terrain. This patch removes that optimization, directing the game to run the full algorithm every time.
Lighting and Weather Patches:
Pawns move slower when walking in the dark or in the rain. In vanilla, instead of calculating the speed a pawn will move in each cell separately according to the environmental conditions at that location, the game calculates and stores a pawn’s speed just once at the initial position to reuse for the duration of the algorithm. This causes the algorithm to see dark and rainy tiles as better than they really are. These patches modify the algorithm to calculate the actual speed at each cell.
Dirt Avoidance:
I know, I know, I’m supposed to be making the paths shorter, not longer. But while a straight line may be fastest, sometimes it’s just more polite to stick to the cobblestones and keep your boots clean. This setting gives an incentive for using roads by adding a time penalty to stepping from a clean tile to a dirty tile.
…huh? Owl who?
~ Questions ~
Q: Does this mod impact performance?
A: Not usually. The changes this mod makes are comparatively small, and the pathfinder doesn’t run often.
Q: Can this mod be added and removed safely from existing saves?
A: Yes!
Q: What’s the deal with this and Clean Pathfinding??
If you want the game to take fewer shortcuts so your pawns take the most effective paths around your map, this mod is for you.
If you just want your ungrateful colonists to use the roads you lovingly paved for them instead of tracking dirt through the base like a herd of filthy muffalo, Clean Pathfinding is what you’re looking for.
Credit to OwlChemist for the concept of dirt avoidance, which I’ve implemented my own version of.
Revisions:
Old revisions of this mod are available below. Click the link to download.