Page 1 of 6

Major upcoming NPC pathfinding update

Posted: Wed Oct 10, 2018 5:12 pm
by Mike
I've been working a lot on the code related to NPC pathfinding in order to address several issues that have been brought to my attention. I'm hoping I got everything right, but I would like the community to test these changes before bringing them live to the production server. If all of these changes have been successfully implemented, NPC pathfinding should now be exactly the same as in OSRS.

The changes are as follows:
  • NPC's no longer dance around you (or around obstacles) in order to try to reach you. They will follow a simple straight path toward you. If an obstacle, player or other NPC is in the way, they will get stuck behind it
  • NPC's that can attack from a distance will no longer walk up to players, but stay at a distance instead
  • Fixed a bug where certain NPC's could hit with melee attacks from a distance
  • Players and NPC's can no longer hit through fences with melee attacks, only with ranged and magic attacks
  • NPC's can no longer hit you from a diagonal corner, only when they are standing directly north, east, south or west of you. When they are standing diagonally, they will sidestep if possible
It is also possible that a few other bugs related to player pathfinding have been fixed with these changes, but I cannot confirm this due to my inability to reproduce said bugs.

The test server can be accessed at https://client.pkhonor.net/PkHonor_testclient.jar. Please report any of your findings about NPC pathing here.

Happy bughunting!

Image


[Edit 1]
Thank you very much for all your feedback! I've now performed these updates on the test server:
  • GWD bosses (Kree'arra, Commander Zilyana, General Graardor, K'ril Tsutsaroth and Nex) will now always move into melee distance, unlike other NPC's that can attack from a distance
  • Fixed pet pathfinding
  • Fixed broken max hit dummies
  • Fixed player to NPC pathfinding (walking up to NPC's instead of running, standing diagonally from them, not being able to interact with them, ...). Basically, I have reverted player pathfinding to what it was before

Re: Major upcoming NPC pathfinding update

Posted: Wed Oct 10, 2018 5:31 pm
by Azu rite
If this was fixed it will help a lot, but is it only for NPCs or does this also apply to players?

Re: Major upcoming NPC pathfinding update

Posted: Wed Oct 10, 2018 5:49 pm
by Thoby
Sweet, this can open up quite a few new PvM tactics.
EDIT: Wow, the accounts on the testserver are from 2017 or so, right?

Re: Major upcoming NPC pathfinding update

Posted: Wed Oct 10, 2018 5:49 pm
by Sit skillz
Mike, you're a fucking champ. Really looking forward to this, zombies don't aggro you in the minigame as of but hopefully that'll change! Good timing as well mate, no faults with this one. Can't emphasise how happy I am with the update.

Re: Major upcoming NPC pathfinding update

Posted: Wed Oct 10, 2018 6:18 pm
by Respire1337
I really appreciate the fact that you're opening this up to players! We can surely find all the bugs (if there are any of course). But...I'll start with one...
Image

Edit 1 :
Image

Edit 2 : When you click to attack an npc, you always walk even if run energy is on, and you always walk from the diagonal and can only hit only when you're face to face with the respective npc. (NOTE : this happens when interacting with any npc, seems to be happening when you want to trade them, like the junk store dude for example).
Image

Edit 3 : Pet pathing is...amazing...Your pet acts like any other npc it seems like it.
Image

Re: Major upcoming NPC pathfinding update

Posted: Wed Oct 10, 2018 6:47 pm
by Jonas
Things I'm noticing so far:

Not in combat: Interacting with NPC's results in the player walking to and standing near it diagonally, interacting if possible (for example: attack/talk) and then going face to face with them.

In combat: Melee: And if you're 6+ squares away, and you're trying to run at them from a stand still, results in you walking to them when you're close to them (4'ish tiles). If you're 6+ squares away, and you're trying to run at them, while initiating the running action before hand, you'll run at them normal.
Range/Mage: if you're 6+ squares away, and you're trying to run at them (from a stand still or running before hand), results in you walking to them when you're close to them (6'ish tiles).

Sidestepping always results in the player walking and not running.

Max hit dummies are broken, even though they should be NPC's you cannot attack them

Re: Major upcoming NPC pathfinding update

Posted: Wed Oct 10, 2018 7:05 pm
by Thearlygamer
Looking forward to some testing. Would this effect the way risky barrows is played? seeing as it's best that all the barrows brothers come at you and you attack them in a square formation with blood barrage, if ahrims and karils don't come up to you I can see how it would effect the minigame.

Re: Major upcoming NPC pathfinding update

Posted: Wed Oct 10, 2018 7:19 pm
by Jonas
Thelategamer wrote:Looking forward to some testing. Would this effect the way risky barrows is played? seeing as it's best that all the barrows brothers come at you and you attack them in a square formation with blood barrage, if ahrims and karils don't come up to you I can see how it would effect the minigame.
no shit.

Re: Major upcoming NPC pathfinding update

Posted: Wed Oct 10, 2018 8:32 pm
by Thearlygamer
Nex doesn't follow you anymore unless it goes in to do a melee attack.

Re: Major upcoming NPC pathfinding update

Posted: Wed Oct 10, 2018 8:33 pm
by Lol trade me
Will love to see this in the update :D