[FIXED] NPC Pathfinding problem during combat

Found a bug in UOX3? Or experienced a server crash? Perhaps you've noticed a broken feature? Post the details here!
Post Reply
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

NPC Pathfinding problem during combat

Post by Xuri »

The image probably speaks for itself =) They're all standing in a line, all attempting to take the same path to reach me. (Another bug is perhaps the health bar, which all of a sudden started showing up like that when I logged in)
pathfindbug.JPG
pathfindbug.JPG (28.82 KiB) Viewed 8264 times
Last edited by Xuri on Sun Jun 25, 2006 12:04 pm, edited 1 time in total.
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Taking moving objects into account with pathfinding is, well, difficult, to say the least.

Currently we just have the NPC clear its path if a character blocks its path.
Scott
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Well - none of the objects in the scene the image was taken from were actually moving ;)
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Maybe give the A* Pathfinding a try. As for getting stuck against a moving object, eighter allow NPCs to shove or detect when it get's stuck and force a recalculation of the path.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

NPC's are considered moving objects, even when stationary. :)


Much like vehicles.
Scott
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Verified in 0.98-4.0. Happens no matter if ADVANCEDPATHFINDING is set to 1 or 0 in the INI.
-= Ho Eyo He Hum =-
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

This is fixed for AdvancedPathfinding, but not for regular pathfinding.
-= Ho Eyo He Hum =-
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

There's a fix for this in housing_revamp branch, where the NPCs will randomize their movement direction a bit if blocked by other characters when using non-advanced pathfinding mode.
-= Ho Eyo He Hum =-
Mindless Automaton
UOX3 Apprentice
Posts: 189
Joined: Wed May 10, 2006 3:48 am
Has thanked: 0
Been thanked: 1 time
Contact:

Post by Mindless Automaton »

Xuri wrote: Sun Nov 08, 2020 7:25 am There's a fix for this in housing_revamp branch, where the NPCs will randomize their movement direction a bit if blocked by other characters when using non-advanced pathfinding mode.
This is related to combat but is there an way to apply it to WalkTo? (or maybe it already does)

For example in the fisherman.js npc schedule, if another npc stands in the path, the fisherman just stops since he is blocked.

I was going to mess around with checking time vs coordinates in my script and through in a sidestep or something if he was not making it to the next location on time.
Mindless Automaton
Linux - UOX3 - 0.99.5 dev branch
Win10Pro 19042.572 - UOX3 0.99.3a; Razor 1.0.14; Client 7.0.87.11 or 4.0.11c (Patch 0)
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

I will play around with WalkTo/RunTo when I get a chance, and see if there's anything I can do to improve that situation. Post it as a feature request so it's not forgotten? :)
-= Ho Eyo He Hum =-
Post Reply