[1.3] [KV] Path Avoid [ModSync RW]

Started by Kiame, May 29, 2017, 12:25:25 AM

Previous topic - Next topic

NemesisN

can you explain normal, dislike, hate, strong

and set values in options for them what do they do actually
Join the RimWorld fan community group on Facebook: https://www.facebook.com/groups/1404635226524821/

faltonico

Quote from: Kiame on September 28, 2017, 03:28:28 AM
Quote from: faltonico on September 27, 2017, 09:02:18 PM
Hi there!
I just bumped into this, pawns stuck at "standing", when trying to get something inside a room with the exits painted "strong", (default settings), when removing the paths they moved again.

I'd suggest making the exits strong or dislike to have pawns use other exits other than the ones marked. If strong is preferred you can try changing the value of strong to something a little less than what it is now in Mod Settings->Path Avoid.
Sry for the late reply,
Setting them to dislike has the same result, but i find out there is another problem lying behind all of that, it might be a problem with the game itself.

Nightinggale

Quote from: NemesisN on October 11, 2017, 09:13:19 PM
can you explain normal, dislike, hate, strong

and set values in options for them what do they do actually
The answer is fairly simple if you know that Rimworld use A* pathfinding and know what that is. If you enable debug options, you can set it to display pathfinding. When a colonist (any pawn?) makes pathfinding, it will write a number on each tile. The slower the movement is on the tile, the higher the cost. The values displayed are the combined values from the starting tile to the one with the print. The idea is that it uses the path which provides the lowest number when reaching the end.

This mod simply increases the cost of moving on the tiles you select. If the cost is 30 for going in a strait line and 150 to take the long way around the mountain, then it will take the strait line. If you add strong dislike and add 200, then it will figure out that 230 is higher than 150 and it will take the long way around. If the long way cost 400, it will still take the route through the disliked area because even if it's disliked, it's still better than running across half the map.

In short, the more you mark a path with dislike, the more longer the colonists will walk to avoid it. I vaguely remember something about issues if the numbers get too big for one tile. It's likely better to just make a belt where they have to cross 2-3 rows of disliked tiles than to increase the numbers.

The different levels of dislike is just different numbers.

What this is useful for is say you have a kitchen with multiple doors. You don't want it to function as a transit room, in which case you add a strong dislike to the doors and it should be equally strong for each door. Colonists can then enter the room and ignore the dislike because it's still the shortest route while they prefer to walk around the building than to go through two strong dislikes. The weaker dislikes could be to "fence" a paved road to keep the colonists to using it. However you don't want the colonists to treat the blocks as walls and with a light dislike, they can pass the "fence" when they have to leave the road to the grow zone to harvest or whatever. A strong dislike would make them walk way too long to go to the end of the "fence". It should be noted that A17 has a pathfinding bug where helping colonists this way is beneficial, but it is fixed in A18.
ModCheck - boost your patch loading times and include patchmods in your main mod.

Kiame

Thanks Nightinggale, great explanation

What i mainly use this for is marking each trap i make, makes extra sure pawns won't kill themselves  ;)
(strong on each trap)

I will also note that with the current pathfinding in A17 there is a problem where if the pawn passes through more than 7 or 8 squares that are not 0 weight (0 weight meaning no rocks/dropped apparel/mud/etc) they will default to a straight path no matter the difficulty/setting from this mod.

I hope to re-add 'preferred' once A18 comes out, until then this is the best that can be done outside modifying the whole pathfinding algorithm which I do not want to tackle!

DestroyX

I'm checking the bug section of the forum rather often atm, they seem to be well aware of the pathing issues in A17.
I just hope everything will be fixed in A18, its just very very obnoxious in many scenarios >.>

Until then, your mod is still a godsend when it comes to "static" things.

Cant really do much about my pawns walking through chunks and trees all the time atm sadly, and it'd be way too much hassle to mark every single one of them because of a broken mechanic^^

nmid

I tried it out, but it makes colonists ignore their assigned / allowed areas :(
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. StorymasterQ

Kiame

Quote from: nmid on October 12, 2017, 05:34:42 AM
I tried it out, but it makes colonists ignore their assigned / allowed areas :(

Hmm this should not be the case... Can you give me an example or screenshot showing a case where pawns are ignoring restricted areas?

If the case is there's a large room marked as 'strong' that would be the problem. This falls into the 7 or 8 weighted tiles case where the pawn will completely ignore logical pathing and make a straight shot through instead. In the case where a room should be marked as 'do not enter' put two or three 'strong' marks at/around the doors to the room.

nmid

Quote from: Kiame on October 12, 2017, 02:48:33 PM
Quote from: nmid on October 12, 2017, 05:34:42 AM
I tried it out, but it makes colonists ignore their assigned / allowed areas :(

Hmm this should not be the case... Can you give me an example or screenshot showing a case where pawns are ignoring restricted areas?

If the case is there's a large room marked as 'strong' that would be the problem. This falls into the 7 or 8 weighted tiles case where the pawn will completely ignore logical pathing and make a straight shot through instead. In the case where a room should be marked as 'do not enter' put two or three 'strong' marks at/around the doors to the room.

Sorry, I missed your reply.
I'll load the mod again this weekend and get you a screenshot.
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. StorymasterQ

Kiame

#38
Great news! After initial testing in A18 it looks like Preferred works again!

A18 version: https://github.com/KiameV/rimworld-pathavoid/releases/download/A18/PathAvoid.zip

Boogeyman

The A18 direct download url is messed up in the op.

Kiame

Quote from: Boogeyman on November 03, 2017, 01:23:06 PM
The A18 direct download url is messed up in the op.

Oops fixed
Thanks for letting me know!

Zalpha

Ah, I finally found this mod, been lookng for it. Thanks.

BTAxis

My success with this mod has been sporadic. In some situations the Rimworld pathfinding just will not be dissuaded - especially when it comes to trees, no amount of weighting will stop pawns from deliberately pathing through them when going around would be faster.
"The megasloth ducked behind the nearest piece of cover"

CannibarRechter

I'm assuming that you didn't make "strong" == "impassable" for some technical reason. Is that correct?
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

Kiame

Quote from: BTAxis on December 18, 2017, 06:11:24 AM
My success with this mod has been sporadic. In some situations the Rimworld pathfinding just will not be dissuaded - especially when it comes to trees, no amount of weighting will stop pawns from deliberately pathing through them when going around would be faster.

I have found the pathfinding doesn't always follow suggested paths especially at the end of longer distances.

As CannibarRechter mentions too, PathAvoid is a system of 'hints' as opposed the base game's restricted areas.

If you provide a screenshot of a problematic pathing issue i may be able to offer suggestions