RimWorld

RimWorld

Pathfinding Avoidance
43 Comments
CrazyBlot 11 Aug @ 1:42pm 
I achieve good results with triple combo:
- Using this mod for pathing
- Using Guarding Pawns mod for atracting pawn to patrol zones or spots
- Dynamic Areas (very cool mod!) in cases that upper two not enough to set additional restrictions
----
Now pawn follow pathes, avoid danger rooms, gather in places where we start assaults. Very cool )
llunak  [author] 11 Aug @ 8:40am 
@CrazyBlot You can copy&paste from the description here.
CrazyBlot 11 Aug @ 5:47am 
@llunak understant. Ok. Last my suggestion of improvement. Add copy button near zone names in mod settings in order to avoid manual entering long string (allowing mistyping).
llunak  [author] 11 Aug @ 4:46am 
@CrazyBlot No, it's always just increasing the perceived cost.
CrazyBlot 11 Aug @ 3:41am 
@llunak is it possible to set not "dificulty" for high zones (500 max right now), but make them completely impassible? Like walls, mountains etc. Something like "virtuals walls"
CrazyBlot 11 Aug @ 3:39am 
@llunak Understand - will try in some building for explore.
llunak  [author] 11 Aug @ 2:44am 
@CrazyBlot That's the area avoidance feature. Except it cannot be preferred, you need to set others as avoided.
CrazyBlot 11 Aug @ 2:04am 
@llunak Understand. But perhaps it's possible to set point-of-interest (point of attraction) for pawns follow to without being drafted. Something like:
- pawn assigned to zone A
- Zone B drawed inside zone A
- Zone B deffined as atraction zone for pawns
- Pawns follow to zone B keep himself inside zone A
Just an idea... Perhaps it can be realized via some job type (going-to-walk as example)...
llunak  [author] 11 Aug @ 12:21am 
@CrazyBlot Drafting ignoring allowed areas is intentional, so no.
CrazyBlot 10 Aug @ 11:22pm 
@llunak great work! Can we go further and make pawns respect zones when drafted? It will open a huge amount of flows for exploration in Odyssey. Zoning allowed interior of guarded structures, avoid toxic enviroment and so on.
llunak  [author] 7 Aug @ 9:35am 
@kifo You can easily check if it's a conflict with another mod if you create a simple test with just this mod enabled. And you can afterwards also provide it in the bugreports section if you expect me to do something about this, as that one line is not sufficient information to do anything.
kifo 7 Aug @ 2:08am 
I have tried your mod once and the pawns walked out their allowed zones to get to their destination. Not sure if it is a conflict with another mod.
llunak  [author] 5 Aug @ 10:01pm 
@Tyrant Allowed areas = Architect -> Zones -> Expand allowed area.
Tyrant 5 Aug @ 2:47pm 
"These areas can only be marked on the map, but cannot be assigned to pawns."

Does this mean that the areas are perceived as more costly to walk by enemies too, or am I misunderstanding what you mean by it not being able to be assigned to pawns?
clocknot 2 Aug @ 10:14am 
Hey, I sent you an invite, I would have some questions if you have time about the 1.6 pathfinding algorithm to re-enable some features of Giddy-Up 2 Forked in 1.6
тетеря, блин 30 Jul @ 9:10am 
sorry if it was asked, but how is the performance?
Tyrant 26 Jul @ 12:52pm 
Sorry for the incorrect link. It was indeed for the skipdoor pathing mod.
llunak  [author] 25 Jul @ 11:33pm 
@Tyrant That is not very specific. I'm aware only of Clean Pathfinding And Avoid Path, where as already said it's probably less work to merge missing parts. That (incorrect) link I assume is meant to be the skipdoor pathing mod, but as the author there says, my mod will not help with it (and the guy is in for a very interesting coding exercise that may not even work out).
Heretical Caliphate 25 Jul @ 9:35pm 
Just wanted to say thanks for the good work! You scratched an itch I wasn't aware I had about pawns tracking dirt from pathing!
Chromium 25 Jul @ 12:06pm 
Nice, uh, furry L4D screenshot bro
llunak  [author] 25 Jul @ 11:37am 
@Tyrant It has actually crossed my mind, but I'm not that sure about that. Which mods and where has the discussion taken place?
Tyrant 25 Jul @ 10:27am 
I've shown this mod to other authors of pathfinding mods and, while they complimented your implementation, they seemed to find the code difficult to adapt for their own purposes.

Have you thought about making a framework?
shida 24 Jul @ 5:42pm 
Thank you!
llunak  [author] 24 Jul @ 11:02am 
@shida As said in the description, the mod rules are not applied in certain situations. Emergency jobs are not on the list, but I'll add that.
shida 24 Jul @ 3:03am 
@llunak I think actually the "Extra cost for emergency door" is already what I was thinking, when there is a fire or a person is injured do the pawns disregard the cost?

This is a picture of my rooms and how I have it setup. I want it so people don't go through the red doors unless there is an emergency on the map. :)

https://i.imgur.com/VkT8a4f.png
llunak  [author] 24 Jul @ 1:25am 
@shida I don't understand what you actually mean by that.
shida 23 Jul @ 11:48pm 
I love this mod! I was wondering if you could add a stricter emergency only mode (eg; only when colonist needs to be saved that is in danger, to save themselves (flee), fire emergency). Maybe have it available in the mod settings?
llunak  [author] 23 Jul @ 10:45pm 
@Tyrant I'll add darkness to the list. As for unnatural darkness, I don't have Anomaly, but the game has code to avoid it, so if it doesn't work well work you, I'd consider that a bug that should be reported to Ludeon.
Tyrant 23 Jul @ 6:34pm 
Could you perhaps add a little bit of pathfinding logic related to darkness? Pawns should prefer taking a lit path if it's not too far out of the way (since that affects their mood). It would involve assigning a pathfinding penalty to tiles with a light level below 30%.

Also, pawns are often far too eager to stroll into special darkness caused by a certain Anomaly event: !! SPOILER !! [rimworldwiki.com]
Wednesday 23 Jul @ 2:26pm 
I saw it was already mentioned in rimworld official dev server, hope it gets fixed
llunak  [author] 23 Jul @ 9:51am 
@Wednesday The mod changes how pawns get to their destination, not what the destination is. So this would only work with cases when pawns decide to path across lava/vacuum. But this is really a bug, this should get reported for Ludeon to fix it.
llunak  [author] 23 Jul @ 9:49am 
@OreOMll I don't play with huge colonies, but the theory is that Ludeon designed the pathfinding in 1.6 pretty well in terms of performance as far as I can judge, so it should be cheap. If you want to try and tell us, make pawns build a wooden wall line, I had to code the mod to reset all data whenever each wall tile is built, so that should be as slow as it gets.
Wednesday 23 Jul @ 8:45am 
Does it allow tweaking vacuum and lava avoidance too? It's really bad when my pawns go take a bath in lava middle pathing XD
OreOMll 23 Jul @ 4:23am 
How much performance impact does this mod have?
llunak  [author] 22 Jul @ 11:43pm 
Let's call this stable. It seems to work fine for me, and nobody else has complained either. I still have few features planned, and path costs probably will get tweaked after more experience with this, but the mod should be already perfectly usable (and is also a feature replacement for Clean Pathfinding).
llunak  [author] 22 Jul @ 9:56am 
@Shadow While You're Up doesn't look like a pathfinding mod, I see nothing in its description that would say it affects how path from A to be B is chosen, it appears to insert C to walk to between A and B.

And this mod is written to co-exist with other pathfinding mods, as long as they are written decently (and do not e.g. just replace some RW's code).
Shadow 22 Jul @ 9:28am 
Hello, thank you for the work you have put into this mod. Is this mod incompatible with other pathfinding mods, such as While You're Up (1.6 patch)?
llunak  [author] 21 Jul @ 9:15am 
@Fluffy Yes, it looks like a rebuilt without resetting the source, sorry. Fixed now.
Holvr 21 Jul @ 8:53am 
Yeah, I second Fluffy's post. I don't know if it's unintentional debug left in, or if it's because I added this mod to an existing save, but after bringing the ESC menu up, or loading a save, the *entire* map is red and has pathing cost displayed on every cell. That soon goes away, but then every single time a pawn passes through a doorway, the door itself and all immediately adjacent cells are red and display pathing cost.
Fluffy 21 Jul @ 7:27am 
Hiya, thanks for this mod. I was looking for a replacement for Path Avoid, and this has been serving the purpose so far, with a more intuitive interface. Good job!

Question though, have you perhaps been doing some debugging recently, and left a debug draw in your last update? As of today, I'm getting red debug cells and numbers whenever pawns do a job, and of the few mods that have updated since yesterday, this seems the most likely to be related.
Wednesday 20 Jul @ 7:51am 
@llunak I think they are talking about the last updated filter in the workshop, new mods don't appear there, just mod updates

Some people usually keep looking there to see if the mods they like were updated or (continued), also some discord bots mirror the mods there on some servers for people to see which mods updated.
llunak  [author] 20 Jul @ 7:07am 
@Tyrant: The code making RimWorld accept the mod's adjustment to cell costs was quite some work, so possibly it'd be simpler adding the UI to duplicate Path Avoid's functionality. I'll consider it.Also, the continued version has a comment about 1.6 update in progress.

I don't know what exactly you're referring to as Last Updated section.
Tyrant 20 Jul @ 2:21am 
Very nice. You should push an update so this mod appears in the Last Updated section. Do you think you could try updating [KV] Path Avoid as well to help steer pawns away from manually designated areas?