Ludeon Forums

Ludeon Forums

  • August 17, 2022, 04:06:31 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 8

Author Topic: [1.3] [KV] Path Avoid [ModSync RW]  (Read 63884 times)

Kiame

  • Planetologist
  • ****
  • Posts: 1541
  • Refugee
    • View Profile
Re: [A17] Path Avoid
« Reply #15 on: June 05, 2017, 12:07:16 AM »

Posting this as a new reply, because I forget, this particular BBS system doesn't seem to register edited posts for thread updates...

As of yesterday... well, it WAS working like a charm for me until the most recent build update. Nothing seems to be registering w/ the pawns that I have certain areas blocked off. Now they're cutting through like it's never been marked off.

To be more precise: In my current save file I've been using before the update, pawns avoided or followed all blocked off areas as they should. After the update w/ the same file, the previously blocked areas from before still worked. HOWEVER, any new areas put up are not registering as an area to avoid/prefer pathing at all... hoping for another quick fix soon enough?

Could you provide a screen shot of an area that's working and an area that's not?
Logged

Tenshi~Akari

  • Colonist
  • ***
  • Posts: 232
  • Refugee
    • View Profile
Re: [A17] Path Avoid
« Reply #16 on: June 05, 2017, 01:00:19 AM »

Could you provide a screen shot of an area that's working and an area that's not?

Pretty much this is happening all over the base... and I was mistaken, it's actually none of the blocked off areas from before and after the update work at all. (The only reason I probably thought it was half-way working was because there are some objects that are impassible nearby that they keep zigging around now that I'm seeing the case, but outside of that, pawns are just pathing whichever way they please despite this.)

I haven't added anything new at all to my mod list, everything is the same as before when it worked just fine so... I guess build 1557 broke something with how this works right now?  :-\

[attachment deleted by admin due to age]
Logged

Kiame

  • Planetologist
  • ****
  • Posts: 1541
  • Refugee
    • View Profile
Re: [A17] Path Avoid
« Reply #17 on: June 05, 2017, 04:43:50 PM »

It looks like that's not base-game furniture/floor and they may not have the proper defs defined. When i setup the same situation the pawns behave correctly.

What mod do the seats, table, and floor come from and i can test it out

[attachment deleted by admin due to age]
« Last Edit: June 05, 2017, 04:46:22 PM by Kiame »
Logged

Kiame

  • Planetologist
  • ****
  • Posts: 1541
  • Refugee
    • View Profile
Re: [A17] Path Avoid
« Reply #18 on: June 09, 2017, 01:06:43 AM »

Updated the tile weights to hopefully guide pawns better.

Added a new Mod Setting: Advanced Settings:
Allows the user to set their own tile weights.
After applying the changes, if a game is loaded it will need to be reloaded to have the changes take effect. (a game restart is not required).
Valid values are from 0 to 255

Both Direct Download and Steam are updated

For existing saves double check the pathings, with the weight changes the colors will be different.
« Last Edit: June 09, 2017, 01:10:07 AM by Kiame »
Logged

Tenshi~Akari

  • Colonist
  • ***
  • Posts: 232
  • Refugee
    • View Profile
Re: [A17] Path Avoid
« Reply #19 on: June 10, 2017, 09:56:23 AM »

Yikes! Sorry I've taken so long to reply to the earlier post, haven't been able to play this week like I had hoped to due to some much needed housekeeping & upgrades, but I think one or 2 of the mods I had enabled weren't properly formatted just like you mentioned (but that was due to my own ignorance of changing the version number instead of noticing some ways the defs worked had changed & waiting for the modders to update their mods themselves. The particular one was sd_round table, but that has since been updated properly & added to my mods again. The other, RIMkea, was already up to date prior to all this, yet pathing still was wonky for it and even the vanilla shelves pictured.)

It's still a bit puzzling though. I'm still not sure why regardless of how they were updated it still worked before and all of a sudden when I upgraded to the new game version, everything had bugged it out like it did. So I'm going to try the newest update instead, now that it's up. Will let you know how it goes!

EDIT: Works like a charm again. Thanks again for putting up w/ my issues & offering a fix, very much appreciated w/ how much I rely on this mod's features to work. :D
« Last Edit: June 10, 2017, 10:37:23 AM by Tenshi~Akari »
Logged

wwWraith

  • Colonist
  • ***
  • Posts: 432
  • ...
    • View Profile
Re: [A17] Path Avoid
« Reply #20 on: June 18, 2017, 03:02:21 PM »

Can you please provide the info what exactly are these weight values? Are they added somehow to the "real" path costs or completely replace them? How it behaves in situations when there are several things that affect movement on the same cell, i.e. soil, tall grass and stone chunk? There are some situations with pathfinding that are really weird, I'd want to figure out their source and/or make a workaround by setting up suitable weights.

And a little suggestion: I think it would be useful to have a way to temporarily disable this restrictions, preferably for any pawn individually, for situations when you need them to get to their destination as quick as possible.
« Last Edit: June 18, 2017, 05:40:44 PM by wwWraith »
Logged
Think about it. Think around it. Perhaps you'll get some new good idea even if it would be completely different from my words.

Kiame

  • Planetologist
  • ****
  • Posts: 1541
  • Refugee
    • View Profile
Re: [A17] Path Avoid
« Reply #21 on: June 19, 2017, 01:52:41 AM »

Metaphor: Imagine weights as rocks in the path of the pawn.
Preferable has no rocks
Normal has a few pebbles
From there it goes from loose rocks to large boulders

(More in depth around the apparent problem)
If maps that have tons of "avoid-path weight from this mod" or real rocks/trees between the pawn and their destination the vanilla pathfinding seems to have a kill switch which tells the pawn to make a straight path from the last square the pathfinding was working on. More specifically

(Even more in-depth)
if i'm reading the code correctly - which i will not guarantee  :) - it seems that on the eight square, if the path finding is still stuck with a bad route it will kick out of the loop and just draw a straight line to the destination from the eight square

(Summary w/ some extra in-depth stuff)
I think the main root to many people if this mod's "normal" having a weight other than 0. This is done because in the background the weight values can only be from 0 to 255. So for preferable to exist, normal has to have a non-zero value. I'm thinking there are cases where the game's path finding is even counting relatively low difficulties for travel as non-optimal and going through the kill switch.

(Possible fix for those still having problems)
For anyone having a problem they could try setting the weights as Preferable = 0, Normal = 0, and the rest the same. Make a new map or load a save and verify all squares are either Preferable or Normal. See if the pathing is improved at all.
« Last Edit: June 19, 2017, 01:58:19 AM by Kiame »
Logged

wwWraith

  • Colonist
  • ***
  • Posts: 432
  • ...
    • View Profile
Re: [A17] Path Avoid
« Reply #22 on: June 19, 2017, 03:05:47 AM »

The problem may be somewhere deeper, because even in seemingly simple situations sometimes pawns prefer not a straight way but some weird one. I have not made screenshots myself but there are some examples: https://ludeon.com/forums/index.php?topic=32192.msg339335#msg339335 https://ludeon.com/forums/index.php?topic=32192.msg344315#msg344315

Anyway, I asked about just some math in your mod. Let's assume there are several roads of the same length: 1. clear sand (path cost 4), 2. clear floor (path cost 0), 3. same floor with stools built on it (path cost 30). The question is, how exactly pawns will "see" path costs there if I'll make some pathing designations? Will they prefer road 2 instead of 1 and 3 if I'll make similar pathing designations above them or will they treat them as equal (like with weight 10: 14-10-34 or 40-0-300 or 10-10-10 or 14-10-10 or 10-10-30 or whatever)? And in another situation, if there are two similar roads with different weights designated, for example, 10 and 30 - what should be their lengths ratio to treat them as equal: 1:3, 9:7 or some other? Sorry if I don't express myself clearly enough.
Logged
Think about it. Think around it. Perhaps you'll get some new good idea even if it would be completely different from my words.

Kiame

  • Planetologist
  • ****
  • Posts: 1541
  • Refugee
    • View Profile
Re: [A17] Path Avoid
« Reply #23 on: June 20, 2017, 12:05:05 AM »

I can't speak too much deeper into the pathing because i do not know.

My gut says it takes weight over distances of less than 8 squares.

Code: [Select]
             0  0  0  50  0  0
          / 
    Pawn
          \
            10 10 10 10 10 10

In this case the pawn will take the top route even if that 50 square will take twice as long to cross than to cross 6 squares of dirt (thinking that pawn climbing over furniture for the 50)
Logged

Kiame

  • Planetologist
  • ****
  • Posts: 1541
  • Refugee
    • View Profile
Re: [A17] Path Avoid
« Reply #24 on: August 11, 2017, 12:12:03 PM »

I've been holding up on updating this mod as the changes will show up in current saves - it won't break them but the pathing will need to be updated.

The root of the problem was: With the new pathfinding in A17 if there are too many squares with 'weight' (only 'preferred did not have 'weight') then the pawn would take a straight path to the locaiton. The number of weighted tiles was 8 so this would happen constantly.

This new version removes "preferred" and now has just noraml->strong.
For those that have manually adjusted the tile weights in Mod Settings I'd recommend defaulting the values out (with the Default button).

Old version: For anyone that wants to still use the previous release it's here: https://github.com/KiameV/rimworld-pathavoid/releases/download/20170608/PathAvoid.zip


New version: On steam and here: https://github.com/KiameV/rimworld-pathavoid/releases/download/20170811/PathAvoid.zip
« Last Edit: August 11, 2017, 12:24:24 PM by Kiame »
Logged

SpaceDorf

  • Transcendent
  • *****
  • Posts: 4083
  • Secretly Captain Obvious
    • View Profile
Re: [A17] Path Avoid
« Reply #25 on: August 11, 2017, 02:09:25 PM »

Sounds good, and would explain some of the pathfinding issues reported.

How does it influence performance ?
The previous version was to cost intensive for my poor old rig.
Logged
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Kiame

  • Planetologist
  • ****
  • Posts: 1541
  • Refugee
    • View Profile
Re: [A17] Path Avoid
« Reply #26 on: August 11, 2017, 02:44:41 PM »

Sounds good, and would explain some of the pathfinding issues reported.

How does it influence performance ?
The previous version was to cost intensive for my poor old rig.

Performance cost is unaffected.

Sadly I won't be able to make this cost any less as it requires a new layer of data for each tile on the map.
Logged

SpaceDorf

  • Transcendent
  • *****
  • Posts: 4083
  • Secretly Captain Obvious
    • View Profile
Re: [A17] Path Avoid
« Reply #27 on: August 11, 2017, 02:49:15 PM »

To bad, but I understand, I know about the weaknesses of Pathfinding Algorithm and the decission you have to make between fast and good.
Logged
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

faltonico

  • Guest
Re: [A17] Path Avoid
« Reply #28 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.

[attachment deleted by admin: too old]
Logged

Kiame

  • Planetologist
  • ****
  • Posts: 1541
  • Refugee
    • View Profile
Re: [A17] Path Avoid
« Reply #29 on: September 28, 2017, 03:28:28 AM »

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.
Logged
Pages: 1 [2] 3 4 ... 8