RimWorld

RimWorld

209 ratings
Better VPE Skipdoor Pathing
3
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5
File Size
Posted
Updated
193.448 KB
29 Jul, 2023 @ 8:41am
9 Apr, 2024 @ 9:53am
7 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
Better VPE Skipdoor Pathing

Description
This mod allows pawns to 'use' Skipdoors from Vanilla Psycasts Expanded while moving and doing stuff. They consider all tiles with skipdoors on them to be adjacent for pathing purposes. Only pawns with intellect of Humanlike or ToolUser can use skipdoors freely, but not during mental states or when wandering. Pawns with Animal intellect can use skipdoors only if they are following another pawn (being roped or pet following master).
Has settings that can change who is allowed to use skipdoors for pathing (everyone, friendlies, enemies). Note that on default settings enemies can use skipdoors same way your colonists can, so use with caution.
Another note - auto-pathing trough skipdoors only works for skipdoors on same map.
Also, for performance reasons if spot is un-reachable without skipdoor pawns won't path to it.

code is on GitHub[github.com]

Difference from VPE Skipdoor Pathing mod:
VPE Skipdoor Pathing appends jobs to the pawn's queue to use skipdoors - which has benefit of skipdoor activation animation playing, but has issues when pawns try to do multi-stage jobs like refuelling or hunting, making pawns looping through skipdoors endlessly in some situations. This mod tweaks pathfinding a bit to consider all tiles with skipdoors to be adjacent, so no fancy animations (at least for now) but also no issues with complex jobs.
Popular Discussions View All (3)
4
9 Apr, 2024 @ 9:56am
Increse path distance
Gryby64
1
30 May, 2024 @ 7:33pm
Do Skipdoors require a path?
Neverr
0
10 May @ 6:39am
Found a bug
七·色人偶
120 Comments
Arira 6 Aug @ 5:40am 
I'm not a modder in anyway, but MultiFloors have dev branch on the workshop. They have "ladders" that lets pawn traverse between "floors" automatically.
I would guess it can be implemented in some way as a solution.
Corbald 2 Aug @ 9:12pm 
Yes, but you could bake some of the logic/pathes into a list, to reduce overhead. Not sure exactly what, without actually writing the mod myself. Unfortunately, this is always going to come at a cost, as pathfinding usually does.
Monarch 2 Aug @ 4:07am 
corbald wouldnt that cause increasingly intense lag with every new skipdoor?
VerenManta 31 Jul @ 7:37am 
I need this mod in 1.6 so bad. Hope Corbald his suggestion is a fix!
Corbald 30 Jul @ 7:33pm 
Since most jobs that I can think of require moving to either the relevant item, or a workstation, I think you could just put a job in there that checks the distance between the pawn and the target thing/building/pawn, via checking the IEnumberable list iteratively until a pathfind is discovered, and compare that to the distance to the skipdoor. If such a thing is found, then add a job to travel to the closest skipdoor, or the relevant linked door to that first one. I really feel like attacking pathfinding itself is the wrong way to approach this. Toils are MUCH easier to work with, but I don't know what's changed in Rimworld since I last did any modding for it, and that was a WHILE ago, and I used a pre-decompiled source at the time.

Looks like yeah, it's fully possible to intercept and modify the toils, as well as to see if they have pathfinds and how far they are, or at least to run your own if they have 'destinations', and check the cost then.
Corbald 30 Jul @ 7:33pm 
Yeah, here we go! Looking around, I found:
'''
Patching JobDriver_MakeNewToils: Most JobDrivers have a MakeNewToils() method which defines the sequence of actions a pawn takes for that specific job. You can use Harmony (a popular Rimworld patching library) to intercept this method and inject your Toil(s) at the beginning of the returned IEnumerable<Toil>.
'''
Corbald 30 Jul @ 6:45pm 
Why is it you need to hook into pathfinding in the first place? If a pawn already has to pathfind for every job, why not just hook into the job (toil?) system, instead? If a pawn gets a job, before acting on that job, see if the destination is closer to a skipgate than the pawn, and if so, just pathfind to the closest skipgate and activate it, as a 'pre-job' before the rest of the toil fires. IIRC the toil system already identifies the closest pawn to a job, and you could hook off that, maybe. I'd really like to help, if you can point me to a decompiled source on github, or instructions to do it myself. (for Rimworld, not this mod)
RippedG 30 Jul @ 5:27pm 
1.6
Church.exe 26 Jul @ 2:52pm 
@ImmortalTechnique I don't think that mod actually does anything like this, in the description it specifically says that it has no pathing, which leads me to believe that it basically just has the lifter pick something up, go in a random direction (possibly just back the way it came?) then instantly teleport to the target.

In other words I don't think it actually paths at all, it just arbitrarily lets the lifter magic it's way over to where it wants to be.
ImmortalTechnique 25 Jul @ 5:50pm 
@Ender Wiggin

out of curiosity, does this mod help at all with figuring out a solution?

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3493717994&searchtext=teleport