RimWorld

RimWorld

1,542 ratings
Perfect Pathfinding
12
7
4
16
7
3
11
5
2
2
3
3
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.2, 1.3, 1.4
File Size
Posted
Updated
962.842 KB
Dec 29, 2020 @ 9:13pm
Nov 27, 2022 @ 5:45am
14 Change Notes ( view )

Subscribe to download
Perfect Pathfinding

Description
~ Features ~
Heuristic Patch:
When a pawn paths to a target a great enough distance away, the vanilla game utilizes an alternate heuristic to calculate the cost of a path that shortens the calculation time, but results in worse paths. This is the cause of the "zig-zag" diversions when approaching corners and doorways, and paths that ignore difficult terrain. This patch forces the algorithm to use the accurate heuristic every time.

Lighting and Weather Patches:
Pawns move slower when walking in the dark or in the rain. The vanilla algorithm uses the light and weather condition at the pawn's starting position for the entire length of the path. This patch calculates the real movement cost at each cell location, incentivizing pawns to avoid dark, stormy areas like they should.

Dirt Avoidance:
This patch was more of a personal challenge to come up with a method of avoiding dirt while maintaining the most optimal path. The strength can be adjusted in the settings, which is the number of added seconds a pawn is willing to spend taking a longer, cleaner path.

~ Questions ~
Can this mod be added and removed safely from existing saves?
Yes!

Does this mod impact performance?
The worst case performance impact that I measured were in the tens of milliseconds. On a regular sized map and with a reasonable CPU the performance impact of this mod should be negligible. Anyone who still needs a lightweight alternative, look into Clean Pathfinding.

So how is this different to Clean Pathfinding?
Perfect Pathfinding removes optimizations and adds complexity to the algorithm calculations with the goal of finding optimal, perfect paths.
Clean Pathfinding adds optimizations and uses lightweight methods to find paths that keep your pawns clean.

If all you want is for your ungrateful colonists to use the roads you lovingly paved for them, Clean Pathfinding is probably what you're looking for.

¯\_(ツ)_/¯
244 Comments
night Jul 26 @ 8:33am 
o7
x500 Jul 20 @ 3:36pm 
o7
Morrneyo Jul 17 @ 10:19am 
o7
Maxxmillian Jul 15 @ 11:52pm 
o7
Kid Lemongrab Jul 15 @ 10:33pm 
o7
Copper Boltwire Jul 15 @ 3:34pm 
o7
Anon Jul 8 @ 10:25am 
Thank you for your service
nick1wasd Jul 5 @ 2:30pm 
o7
Alison Jun 13 @ 8:20pm 
o7
Lobanych Jun 12 @ 2:50am 
O7