On Shadowsteps and No Valid Path

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Joel Helmich

Joel Helmich

Gameplay Programmer

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.

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Kill.3458

Kill.3458

Thank you for the heads up!

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: dlonie.6547

dlonie.6547

Nifty, Wooden Potatoes was right

Thanks for the detailed post, and the upcoming bugfix!

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Adrenalin.5719

Adrenalin.5719

<!!!> Please all read this, it adds to this issue by naming the most important aspect which wasn’t even mentioned in the starting post. <!!!>

Two things:

It is correct, that shadowsteps were always in this game and that they just lacked the red message, but, until the red message was introduced, teleports were actually teleports and not shadowsteps. Then they were changed to be shadowsteps with a wrong name. This is the misery, which I think was a very big mistake. And I’m especially angered about the fact you did not mention this change since it’s the reason for the frustration, not how shadowsteps work in general.

Second, instead of changing teleports to shadowsteps, you should check the map for exploits in particular and implement invisible walls were needed.

Turning almost all teleports into shadowsteps was the big lazyness concerning fixing possible exploits. The correct way would have been to check for exploits in particular but keep teleports as teleports. Hopefully, this will get reverted.

The current situation is extremely annoying, frustrating and I always think, why could somebody do this to this game?

Same applies to the joke that happened with not letting swiftness affect movement skills anymore.

Stop fixing exploits by damaging the combat system in an extremely crucial way. Start fixing exploits in particular.

Alternatively, upgrade your path calculator by 1000 levels.

For a way better game.

PS: I’m just so direct in this post because I love this game and want it to be better in parts which lack a lot!

fanboy | A passionate fan of elements of geek culture, letting his passion override social graces
and common sense.

(edited by Adrenalin.5719)

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Javonovich.5280

Javonovich.5280

Wow—thank you for the open communication on this!

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Kageseigi.2150

Kageseigi.2150

Thank you very much for the clarification! :-)

If I may make one request, however, would it be too much to ask to change the Thief’s Shadow Trap returns into true teleports instead of shadowsteps? Well, at least in PvP? Or just disable them inside of WvW gates and PvP spawns.

Using the Destroy Trap or Shadow Pursuit is a big gamble. I’m either using it to get out of Dodge, or I’m using it to get on top of the enemy. Whenever it only “teleports” me 10 feet away from my original position, it completely fails in either task.

Ps. Is this bug also why the Thief’s Scorpion Wire doesn’t function properly most of the time?

Suggestions to overhaul the Thief…

* * * Thief Trait Shakeup * * *

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Ohoni.6057

Ohoni.6057

Thanks for the info, I’d love to see more of these sorts of posts about how some of GW2’s more complex elements work.

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.

If you want a lore reason, it’s simple, you have to be able to project your shadow to the target location, without crossing gaps or climbing anything. If your shadow can’t reach in an unbroken line, you can’t follow it.

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.

I get why you would want final nav mesh checking server-side, to prevent people hacking the client and sending back false outcomes, but would it be possible to mirror the nav data on the client, and use the client side version ONLY to calculate this “red/green crosshair” situation? In that way, the worst someone could do with hacking their client would be to get a false indicator, but they wouldn’t actually go there so there’d be no point.

It is correct, that shadowsteps were always in this game and that they just lacked the red message, but, until the red message was introduced, teleports were actually teleports and not shadowsteps. Then they were changed to be shadowsteps with a wrong name.

I don’t believe teleports were ever not Shadowsteps. You mean things like the Ele or Mesmer blink moves, right? Those have always behaved like Shadowstep, no different than Thief Shortbow. If they did not, if they behaved like a Mesmer portal, then you would be able to use them to cross gaps, like in JPs.

“If you spent as much time working on [some task] as
you spend complaining about it on the forums, you’d be
done by now.”

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Sandpit.3467

Sandpit.3467

Thanks Joel, a really interesting and informative post. Brilliant comms.

I would really love there to be a regular article like this on various aspects of the game. A weekly tech insight?

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: dargon.7253

dargon.7253

I have no problem with the changes made to shadowstepping / teleporting, with one BIG exception, consistency. Sometimes my thief can shadowstep up stairs, etc, while other times, depending upon the keep / tower/ etc I can’t. Ideally all of these structures should act the same, if I can walk up it WITHOUT jumping, I should be able to shadowstep up it, but this is not currently the case.

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: SoPP.7034

SoPP.7034

upgrade your path calculator by 1000 levels.

Why the hyperbole and all the bolded text??

While your ideas are ‘good’, you have no perspective of the kind of cost resource all your ideas would require.

A warrior, a guardian, and an elementalist walk into an open field…
The Warrior turns to the guardian and says, “Did you hear something?”
Guardian replies, “No, but how’d the elementalist die?”

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Ravenmoon.5318

Ravenmoon.5318

I assume your validation of the pathing involves range maths and while the client sees a green target circle, the navmesh will do few branches here and there but ultimately will lead to more than 1200 range (for example).

Would it be an overkill if you do straight line check up range from current location to destination and increase the range threshold for the navmesh devised range (like 2000,2500)? I know that could spawn some scripts that exploit this mechanic (shadow stepping further than 1200 range) but it could easily be caught. I mean if someone does this 10/10 times there’s probably some fishy macro going on in there.

Also since thief sword requires an enemy target to shadowstep you somewhere, I don’t see why validation has to happen other than straight line range checks. It will open up the game for sword thieves following up a glitchy spvp camp spots (like standing on a pillar as a mesmer and bursting down from relative safety)

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: DomAltares.8651

DomAltares.8651

This is is all well and good, but I believe most people are aware that this was altered in the first place so as to prevent people breaking out of maps. That’s here nor there at this point.

Now that you’ve both neutered and broken the functionality of all teleports and added what has often come to be a red death sentence ‘No Valid Path to Target’ to our screens, will you work on making these various ‘shadowstep’ skills 100% intuitive? By that I mean:

There are places that one could shadowstep before that no longer work. There are some places that can be shadowstepped to now that did not work before.

Some stairs you can shadowstep up, others you cannot. Some you cannot shadowstep down, some you can.

Some bridges you can shadowstep across in one direction, but not the other; some work both ways; some don’t work at all.

Some ledges and overhead areas can be shadowstepped up to, others cannot.

These skills should be predictable, one way or the other. I should be able to look at something and anticipate (after decent practice to learn) when I can/cannot shadowstep to it, without being informed of it by the game client in a clutch moment of life or death. There should be no surprises, and I shouldn’t have to maintain a vast mental list of what stairs, bridges, ledges, and even flat ground will or will not cause me issue.

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Azurem.9468

Azurem.9468

If you want a lore reason, it’s simple, you have to be able to project your shadow to the target location, without crossing gaps or climbing anything. If your shadow can’t reach in an unbroken line, you can’t follow it.

I don’t think they want a lore reason.

It’s like in the living story when Kasmeer reaches a big gap and just makes a portal across it. In lore, portals can do that. If we could just ground-target portals wherever we liked in game, that would be crazy. Look at the unscalable walls of a WvW fort and just make a portal to the top…
So we have this limited version of portal that we can only place under our feet, but that’s just game mechanics.

I don’t remember any particular instance of NPCs shadowstepping or blinking somewhere where we can’t, they don’t seem to use those skills much. But I think what was meant by “this validation is only there to prevent exploits and has no other lore reasoning or whatnot” is that shadowsteps don’t have weird inconsistent path checks in lore. Lore shortbow thieves simply appear wherever their magic shadow arrow lands.

(edited by Azurem.9468)

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: MithranArkanere.8957

MithranArkanere.8957

All I want for AI navigation is jumps. AI should learn to jump and do things like skipping over small obstacles. If you can get there by jumping, shadow-stepping and enemy creatures that can jump should be able to get there too.

That includes every single pet and summoned creature. All of them should be able to jump and reach any place players can reach with simple jumps.

SUGGEST-A-TRON says:
PAY—ONCE—UNLOCKS—ARE—ALWAYS—BETTER.
No exceptions!

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Macilien.3078

Macilien.3078

It seems a bit wasteful to me to actually calculate a path from starting point to target. Wouldn’t it be much simpler to tag areas in a way that those which are connected receive the same tag, this way you only have to check whether the area you start from has the same tag as the target area. It even would be possible to include areas that can’t be reached by a path for convenience (e.g. a rock with steep sides) or add conditions (e.g. porting down a cliff but not up or porting into a tower if it is open or your side owns it)

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Zodryn.4216

Zodryn.4216

Shadow Trap needs to be changed to a teleport. Just like mesmer portal, you must physically be at the desired destination. Also, it only teleports one person while portal can teleport entire zergs. Straight line check is not acceptable on this skill, as it normally causes a five foot shadowstep into a wall rather than a much longer port. There is no reason for it to remain a shadowstep.

Edit: destroy shadow trap should be a teleport, while shadow pursuit should stay a shadow step to prevent things like breaking into keeps after your target steps on the trap and enters the keep.

(edited by Zodryn.4216)

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: pfanne.9783

pfanne.9783

All I want for AI navigation is jumps. AI should learn to jump and do things like skipping over small obstacles. If you can get there by jumping, shadow-stepping and enemy creatures that can jump should be able to get there too.

That includes every single pet and summoned creature. All of them should be able to jump and reach any place players can reach with simple jumps.

The problem with jumps is that you either have to preprocess the navigation mesh to find all possible jump positions or have more complex pathfinding.
Preprocessing often consists of handplacing jump points all over the map. Which is pretty much impossible for a game as big as an mmo.
The algorithmic approach would probably generate an enormous amount of jump points which would increase the size of the search space for the pathfinding algorithm by a lot.
Having a more complex pathfinding algorithm that finds places to jump on the fly is also way to demanding for a server based games with 1000 of players.

Another solution for better pet AI would be to have the navigation mesh and pet AI client-side and simulate a local player character that actually is a pet. That would allow for more responsive AI but also increase the bandwidth from the player to the server. It would also be another source of potential cheating. Another drawback would be that the whole AI infrastructure has to be available on the client or a simplified AI has to be written that only runs on the client. Resulting in more code to mantain and potentially a lot of duplicated code.
As a ranger player I like the idea of having really responsive client-side ai, but since pet have always been overlooked in gw2 I am not really hopeful for big improvements.

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Shadow Dragon Bob.7160

Shadow Dragon Bob.7160

I’d celebrate, but I think my work would frown upon me drinking and cheering before I clock in. Still though, celebrating on the inside that the errors are being worked on.

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: DymondHed.9026

DymondHed.9026

awesome post, Joel. as a necro who enjoys the flesh wurm shadowstep, thank you very much

i have too many hours logged >_>

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: MrDaaark.2604

MrDaaark.2604

Good to hear. There are many places in the game where steal and shadowstepping skills (especially shadow escape when downed) don’t work now because the ground wasn’t built with the new check in mind. Especially Honor Of The Waves, and the Silverwastes.

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: commnagrom.8637

commnagrom.8637

but you failed to answer the most important question:
Why does my skill activate and go on cooldown when it finds to valid path to target?
Honestly this is the biggest problem with the system as-is and needs to be fixed big time!

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Mo Mo.1947

Mo Mo.1947

Pay 1000 gems to keep a silver-fed path-check-o-matic in your inventory for client side path checking.

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: quBit.6437

quBit.6437

All i want is to be able to place my flesh wurm wherever i want again.
I mean, i can place it somewhere and then run to a place that doesnt have a valid path to my wurm and still blink towards it, but i couldn’t stand there and place my wurm in that same spot since there’s no valid path to target.
That sucks big time. In WvW, wurm is most times used to blink towards it, not as much to blink into it, so please just let us place the wurm like we used to.

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Ashen.2907

Ashen.2907

Thank you for this insight. This is exactly the sort of behind the scenes look that can help to ease cynical disregard of perceived dev motives and efforts.

On Shadowsteps and No Valid Path

in Guild Wars 2 Discussion

Posted by: Khisanth.2948

Khisanth.2948

but you failed to answer the most important question:
Why does my skill activate and go on cooldown when it finds to valid path to target?
Honestly this is the biggest problem with the system as-is and needs to be fixed big time!

Well according to the post it is because you moved between the two points in time. If I am reading the post correctly that is partly a bug. If the initial check passes the second check should be using a different algorithm(the old one).