RimWorld

RimWorld

1,548 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
29 Dec, 2020 @ 9:13pm
27 Nov, 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.

¯\_(ツ)_/¯
246 Comments
看小黄书的童谣 25 Sep @ 12:53pm 
O7
Kush1Push1 17 Sep @ 5:38am 
о7
night 26 Jul @ 8:33am 
o7
x500 20 Jul @ 3:36pm 
o7
Morrneyo 17 Jul @ 10:19am 
o7
Maxxmillian 15 Jul @ 11:52pm 
o7
Kid Lemongrab 15 Jul @ 10:33pm 
o7
Copper Boltwire 15 Jul @ 3:34pm 
o7
Anon 8 Jul @ 10:25am 
Thank you for your service
nick1wasd 5 Jul @ 2:30pm 
o7