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

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

Previous topic - Next topic

Kiame

Quote from: tile7 on February 27, 2020, 06:18:03 PM
Kiame, still the same.

"Rimmsqol mod creator wrote that in order to have path avoid working, buttons have to be switched to vanilla buttons.
Possible?"

honestly no idea what that modder is talking about. I'm creating buttons from Defs on a new DesignatorCategory. Can't get much more vanilla than that.

tile7

Me neither, plus I'm not a moder.
But path avoid and rimmsql don't work together. And both are great.

Think3r

Quote from: Kiame on February 27, 2020, 11:02:10 PM
Quote from: tile7 on February 27, 2020, 06:18:03 PM
Kiame, still the same.

"Rimmsqol mod creator wrote that in order to have path avoid working, buttons have to be switched to vanilla buttons.
Possible?"

honestly no idea what that modder is talking about. I'm creating buttons from Defs on a new DesignatorCategory. Can't get much more vanilla than that.

Razuhl stated in this post what has to be done in order to make Path Avoid and RIMMSqol compatible:

Quote from: RazuhlPath Avoid's author [...] creates his designators in a custom designator category. However he does so using an argument in the designators constructor. That's not allowed in vanilla which is why he used a custom category. By defining multiple classes of the designator class, each hardwired with the attribute values that are used in the constructor, you create designators that are valid and can be used in the xml API. Making the custom code that is spawning buttons obsolete.

Any thoughts on this? Do you think that we'll ever see these two great mods being used together?
Greetings

tile7

"Any thoughts on this? Do you think that we'll ever see these two great mods being used together?"

Same here?

Magically Gifted

Hey can u make pathways apply prefered path automatically with every pathway built and furniture or stockpiles as disliked or more as an option maybe ? sorry if this is not the place or time for this

wwWraith

#95
Magically Gifted, most likely it won't be a good idea. Actually furniture, items laying on the ground, plants and other objects have movement speed reduction that is honestly counted in pathfinding calculations, so if your pawns sometimes prefer to jump over the chair it's because they know that in this situation it's faster (some people also do that in real life ;)). The problem is that the exact pathfinding requires a lot of system resources, so it's implemented only for short distances while for longer ones it's simplified. Afaik it basically counts average movement cost for some areas instead of single tiles. So in case that you'll set many tiles in your stockpiles or rooms as "disliked", your pawns will avoid to go through these rooms at all rather than trying to find a "clear" way between obstacles.

Using "preferred" mode brings another problem. Without it the minimal movement cost is 0, enabling it changes it to 10 or so and this 10 is added to every tile on map except those that you'll mark as "preferred". But it leads to changes in other things: pawns choosing path from tiles with 1 or 2 movement cost will most likely choose the first ones, while with "preferred" mode enabled they'll become 11 and 12 - the relative difference is much less, so in some cases pawns will prefer less optimal paths.
Think about it. Think around it. Perhaps you'll get some new good idea even if it would be completely different from my words.

wwWraith

#96
Another suggestion: an option to let drafted pawns ignore any PathAvoid markings. Usually the pawns are drafted for a reason, and we want them to get to their destinations as fast as possible, so it could be better to use real values for their pathfinding.

Something probably related was implemented in Clutter Doors Stuff.
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

Update:
Changed how designators are created so it'll hopefully work with rimsql

tile7

Hi. Nope.
It is in the architect menu, but no submenu shows up.
Perhaps a load order (suggestions?).

tile7

And then I added paint designator, and that one shows up, but your icons, no.

Kiame

hmm yeah i found rimmsqol mod and i see it's not working. I did what that mod's author said

Kiame

#101
Ok _now_ works with RIMMSqol

If downloading directly make sure to delete the old PathAvoid directory as the underlying file structure has changed with PathAvoid version 1.1.0.3

arl85

Right now I'm unable to start a new colony:

Exception filling window for RimWorld.Page_SelectScenario: System.InvalidCastException: Specified cast is not valid.
  at Verse.Find.get_MapUI () [0x00005] in <032d0428bd3b4871b44e7cd832eb5c58>:0
  at Verse.Find.get_ReverseDesignatorDatabase () [0x00000] in <032d0428bd3b4871b44e7cd832eb5c58>:0
  at RimWorld.GameRules.SetAllowDesignator (System.Type type, System.Boolean allowed) [0x0003c] in <032d0428bd3b4871b44e7cd832eb5c58>:0
  at PathAvoid.Settings.SetIsPreferEnabled () [0x00021] in <b86dfa4f084b4a11b16a8c2c8f9ca155>:0
  at PathAvoid.Patch_Page_SelectScenario_BeginScenarioConfiguration.Postfix () [0x00000] in <b86dfa4f084b4a11b16a8c2c8f9ca155>:0
  at (wrapper dynamic-method) RimWorld.Page_SelectScenario.DMD<DMD<BeginScenarioConfiguration_Patch1>?1158924416::BeginScenarioConfiguration_Patch1>(RimWorld.Scenario,RimWorld.Page)
  at RimWorld.Page_SelectScenario.CanDoNext () [0x00014] in <032d0428bd3b4871b44e7cd832eb5c58>:0
  at RimWorld.Page.DoBottomButtons (UnityEngine.Rect rect, System.String nextLabel, System.String midLabel, System.Action midAct, System.Boolean showNext, System.Boolean doNextOnKeypress) [0x000e0] in <032d0428bd3b4871b44e7cd832eb5c58>:0
  at RimWorld.Page_SelectScenario.DoWindowContents (UnityEngine.Rect rect) [0x000ab] in <032d0428bd3b4871b44e7cd832eb5c58>:0
  at Verse.Window.InnerWindowOnGUI (System.Int32 x) [0x00165] in <032d0428bd3b4871b44e7cd832eb5c58>:0
Verse.Log:Error(String, Boolean)
Verse.Window:InnerWindowOnGUI(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)


tile7

I didnt try new colony, but with one I'm already playing, it's finally working.

Kiame

Fixed the issue preventing new colonies. Sorry about that! -_-