Since this has come back onto public radar recently, I’d like to take some time to better inform people about what’s what about the “no valid path to target” error and shadowsteps in general.
-Why was “no valid path to target” added as a mechanic?
The quick answer is that it wasn’t, contrary to popular belief. A message informing players about it was added, but shadowsteps failing because of an invalid path has been a thing since game launch. Read on to learn more about what is actually going on behind the scenes when this error message appears.
-What is a shadowstep?
A shadowstep is a teleport with validation on its destination point. This validation is only there to prevent exploits and has no other lore reasoning or whatnot.
As an aside, despite what skill text may claim , most “teleports” are actually shadowsteps. An actual teleport, such as what happens when you use a mesmer portal, does no validation.
-How does validation work?
Pathfinding is performed between your current position and the target point, using the same mechanism that AI uses for navigating. Specifically, this uses “navmesh”, which is derived from collision data (terrain, objects, etc that you can run into). Navmesh is automatically generated and represents the places where it is “safe” for NPCs to walk. Essentially, more complicated pathing tasks (“will I fit between these two rocks?” and so forth) are precalculated so that finding paths for NPCs on the fly doesn’t cost too much.
Speaking practically, shadowsteps make use of the navmesh for validation because it is the most reliable option that isn’t absurdly expensive. Still, it is the case that generated navmesh sometimes leads to results which can seem surprising. For example, you can get a valid path from the ground to the rooftop of the Kyhlo tower because of a walkway that wraps around the building, but can’t find one from the ground to an elevated rock because the sides of the rock are too steep. This apparent discrepancy is unfortunate but an inevitability of how the system works.
-When does this validation happen?
Some skills which will perform a shadowstep are flagged as needing to perform a path check on cast. When the client asks to activate such a skill, the server will do pathfinding to the target point first, before any activation costs are paid. Should pathfinding fail, the skill will be canceled and the “no valid path” error message will be sent to the client.
Additionally, for all skills which shadowstep (not just those that are flagged), this same validation will occur when the shadowstep action itself fires. The purpose of this validation is to stop exploits, whereas the previous check (if there was one) is only there to minimize player grief. It is important to note that, as shadowstep actions are driven by skill scripts, this later validation will happen after skill activation costs are paid.
Generally, for skills which preemptively path check, the second check should only fail for non-instant skills, and only when the delay between checks allows you to move from a valid position to an invalid position. Thief shortbow 5 in particular is the key offender here, given that the skill is used often and the missile has flight time.
As mentioned, not all skills which shadowstep will perform the preemptive pathing check, and there is some reasoning for why this happens or doesn’t happen. Broadly, skills which the user directly activates to perform a shadowstep, such as Blink, will do a path check first. It is expected that players would prefer to keep such a skill off cooldown if it’s going to fail anyway. Flipover skills, such as Shadow Return, do not path check first. Players may want to clear out the flipover skill right away, which would be hard to do if pathing kept failing.
Also, for skills with preemptive path checking, if you attempt to use such a skill which also happens to be a stun break while you are stunned/knocked down/etc, it will fire regardless of pathing success.
-Why does my shadowstep give me a path error now when it used to work from this same spot?
To help answer this, you should first know that there is fallback behavior for shadowsteps which uses what’s called “straight-line” pathing, should normal pathfinding fail. Basically, the pathfinding engine will go in the direction of the target point until it hits anything and then will stop immediately, so you end up with a really simple path that has just two points. Because of the easy failure condition, this is quite unreliable, as the path may go decently far or just a few inches, depending on what the navmesh looks like.
The straight-line pathing fallback was used by all shadowsteps before preemptive path checking was introduced. As a result, there were certainly times when you would fire your shadowstep and, despite not quite reaching your target point, still move some reasonable distance. However, this fallback behavior was as likely as not to move you a very short distance, and still at full skill cost of course.
Skills which preemptively path check will no longer do this fallback behavior, as pathing would pretty much always succeed, defeating the purpose of checking ahead of time (technically speaking, straight-line pathing almost never fails).
-Why doesn’t the shadowstep ground target marker go red when pathing will fail?
I’ve seen this suggestion come up a few times, and this is actually how preemptive path checking was originally intended to work. Unfortunately, navmesh data is not included on the client, and as such the only way to get the necessary information to color the ground target marker would be to continually poll the server. Having the server respond to client polls and do a bunch of pathing calculations on demand would be too expensive and too vulnerable to lag to be considered a good solution. Also consider that one of our ground targeting options, instant ground targeting, would have no marker to color in the first place.
The best compromise was, as mentioned, to flag skills which will perform shadowsteps as needing to do a path check on cast, and to have those skills stop early before costs are paid. This way players are at least not punished for the state of the navmesh, which they cannot see.
-Are any changes planned for shadowstep behavior?
As mentioned earlier, for skills which do a preemptive pathing check, there is a second validation which happens when the skill actually executes, and this second check can fail if you manage to move to an invalid spot in between the two. The first check will not allow a straight-line path fallback, as that would defeat the purpose of checking for a valid path ahead of time. However, currently if the first check happens, the second check also will not allow a straight-line path fallback. This means that if the first check passes but the second fails, skill costs will be paid but no shadowstep of any kind will occur. This is a bug and was never intended, and so is being fixed for Heart of Thorns release. The reasoning is that since costs have been paid, even a small shadowstep in the target direction is better than nothing at all.