RimWorld

RimWorld

1,926 ratings
Clean Pathfinding 2
9
10
3
3
3
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4
File Size
Posted
Updated
0.101 MB
Sep 16, 2021 @ 4:30pm
Mar 27 @ 6:48pm
28 Change Notes ( view )

Subscribe to download
Clean Pathfinding 2

In 1 collection by Owlchemist
Owlchemist's Mods
43 items
Description
What's the point of building roads and paths around the map if your pawns are just going to dirty their feet by not using them? This mod applies a modifier to the perceived pathing costs of any dirty tiles to help keep things clean.

Features
  • Net gain performance: With all the featured combined, the number of calculations needed to chart out a path can sometimes be as low as 1/4th compared to vanilla. The screenshots in the gallery offer a demonstration.

  • Clean feet: Pawns will have a greater attraction to sticking to walking along paths and cleaner surfaces, even if it may extend the length of their trip by a small yet reasonable amount. Various rules can override this behavior such as emergency conditions, or factoring light.

  • Doorpathing: Allows you to designate some doors as having a higher perceived pathing cost than others. This can help prevent pawns from walking through sensitive rooms such as bedrooms or freezers, or using the non-main entrance.

  • Region pathing: Pawns can chart out paths across the map far more efficiently and smarter than vanilla pathing.

  • Optimized colliders: An optional patch to optimize vanilla's pawn collider code (pawns bumping into other pawns).

  • Wander tuning: Adjust how often wandering pawns (including animals and wildlife) wander from spot to spot, allowing performance starved users to tone down their AI costs.

  • Exit pathing: An optional feature which may be used on unusual, custom-made maps. If pawns are stuck and cannot find the map exit, this tuning can make their search more persistent.

FAQ
Q. How does this mod compare to Perfect Pathfinding, and can they be used together?
A. Perfect Pathfinding focuses primarily on the heuristic tuning side of pathfinding. You can use them together if you wish to overwrite this mod's tuning, though you can also just emulate the same effect by maxing out the heuristic tuning slider in the mod options.

Q. What is considered a road, for the sake of the road attraction rules?
A. Any terrain with the "CleanPath" tag, such as flagstone, packed dirt, broken asphalt, fine floors, paved tiles and concrete.

Q. I'm running into serious issues like crashing or standing pawns, and I think this mod is to blame?
A. This has been an ongoing study for awhile now and to the best of my knowledge, what is happening is that you have another mod that incorporates its own custom pathfinding that is handled off the main vanilla code branch. And this code is not doing a sanity check to handle cost reversal. You can work around this issue by reducing the "road attraction" slider to either 2 or less.

Q. What about raiders? Animals? Mechs? Allies?
A. Hostiles and animals ignore any special rules set out by this mod and work as normal. It just impacts your own colonists and mechs, and non-hostile guests of a greater than animal intelligence. Drafted pawns are also ignored.

Compatibility
  • Can be added or removed to games at any point.
  • Compatible with other mods that edit pathing, such as Path Avoid and SoS2.

You may also like...


Credits
  • JisPichi for the concept of pawns factoring light, as seen in Perfect Pathfinding. A simplified variant of this idea was implemented here as a packaged solution.

🦉GitHub[github.com]


[ko-fi.com]
Popular Discussions View All (2)
5
Mar 27 @ 6:07am
Pawns won't move, Errors spammed
Braincell
0
1
Mar 7 @ 9:38am
PINNED: Hidden Feature: Cold zones
Owlchemist
< >
271 Comments
Owlchemist  [author] Mar 27 @ 6:53pm 
v2.0.40
- There is now a "safety checker" that runs on game startup. This will check for mods with a soft incompatibility - (currently Misc Robots, V.O.I.D., and Biomes Islands). If any are detected, the road attraction feature will be suspended. This should help with anyone encountering the infamous "node overflow" blowup.

(Technical note: The authors of these mods would need to allow their custom pathfinding to consider the existence of negative-cost terrain and run a sanity check to clamp the value to 0 accordingly.)
alreShan Mar 24 @ 8:59pm 
Awesome, witnessing it getting better!:steamthumbsup:
Owlchemist  [author] Mar 23 @ 4:42pm 
v2.0.39
- Road attraction now applies to bridges, including dynamically generated bridges from other mods.
- Friendly mechs (or "tool user intelligence", for that matter), now respect your pathing rules.
- Various misc performance optimizations and improved transpiler patching for game startup impact.
- For powerusers who were curious to try out the debugging tools to flash the red cells, this feature is no longer a lag-bomb.
Owlchemist  [author] Mar 20 @ 8:52am 
For some closure, the R++ dev responded to all this in the comments section over on their mod.
Owlchemist  [author] Mar 20 @ 8:12am 
Actually, thinking back, I'm reminded that I already investigated misc robots with this mod, but never had much luck reproducing any issues with it. However as I don't actually use misc robots for real gameplay, my test can't be considered conclusive. If anyone could provide something that can be reproduced I can investigate it.

(however, not to cast shade or anything but considering how ancient misc robots is, written in the beta era and not even using harmony patches, my guess is the fix would need to be on their end. But if I'm wrong, I'd be glad to fix it)
Owlchemist  [author] Mar 20 @ 7:44am 
I've heard that mention before but I suspect that term is being used incorrectly. They probably mean a node overflow? I can say with some degree of certainty that there's nothing in this mod that could potentially cause a memory leak.

Technicalities aside, my guess is that it's most likely a transpiler conflict. I've already written my transpiler about as reliable as possible, but I can't say the same about the other mod.
Felix Mar 20 @ 7:12am 
Just throwing this out there, big memory leak with robots ++ with this mod, dont have both together.
MysteriousHiggs Mar 19 @ 8:28pm 
@owlchemist Thank you! :steamthumbsup:
Owlchemist  [author] Mar 19 @ 2:49pm 
Just pushed an update now that provides details in the tooltip now o/

@Ozzy - if you catch that happening could you try something for me? Disable region pathing in the mod options and let me know if that fixes it for you. If that doesn't work, try lowering the road attraction slider.
MysteriousHiggs Mar 19 @ 1:12pm 
Please explains *somewhere* what the door modes do :(