We moved our repositories to BitBucket!

If you can't login or you can't register to the forums do not rise an issue, instead please write to support (at) l2jserver.com

Check our wiki!

Report server issues here

Forum has been updated to phpBB 3.2, let's see if this fixes some minor bugs we had.

Thank you for visiting http://www.l2jserver.com/

Castle doors and path fiding.

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
DjSt3rios
Posts: 29
Joined: Thu Sep 16, 2010 7:00 pm

Castle doors and path fiding.

Post by DjSt3rios » Mon Aug 07, 2017 9:19 pm

Hello all, I am having a strange "problem" with path finding.
While inside a castle, if I try to attack one of the doors, the path finding seems to be quite weird.
Here's a picture below to help you understand:

Image

This is quite essential because I am modding a server to be a faction server, Good vs Evil with capturing towns and castles. The problem is, I need to be really close to the door in order to attack, and I need to have a "weird line of sight", as you can see in the picture. I guess the problem is with path finding, and I can't seem to be able to find a decent solution. So far I tried increasing the offset of the search, tried to get the door location and add/subtract 20 to it's X/Y, no results either. Is there a workaround?

EDIT: Forgot to mention, I am using these settings:

Code: Select all

# ---------------------------------------------------------------------------
# Geodata
# ---------------------------------------------------------------------------

# GeoData options:
# 0 = GeoData and PathFinding OFF (default)
# 1 = GeoData is used to check Line Of Sight (LOS) targeting and 
#     L2Playable movement. You need to download files for data/geodata folder.
#     Monsters can pass walls but not aggro (no line of sight) through them.
# 2 = Full GeoData enabled. Includes PathFinding (requires also /data/pathnode 
#     files if CellPathFinding not enabled) and all character moves go through 
#     geodata checks (if a mob passes a wall, pathfinding didn't find a route 
#     but we allow attack and returning home).
#     Recommended server memory minimum 2 GB, rather 3 GB.
# Default: 0
GeoData = 2

# GeoData driver to use
# Default: com.l2jserver.gameserver.geoengine.NullDriver
#GeoDataDriver=com.l2jserver.gameserver.geoengine.NullDriver
#GeoDataDriver=com.l2j.geodriver.GeoDriver
GeoDataDriver=com.l2j.geodriver.GeoDriver

# Pathnode directory
# Default: data/pathnode
PathnodeDirectory = data/pathnode

# Cell-level pathfinding, produces more accurate routes but is (maybe 10x) heavier to calculate. Recommended for small servers at least.
# If False, pathnode files are used. Uses a max number of nodes in calculation which can be adjusted in the algorithm if it needs to be faster.
# Default: False
CellPathFinding = true

# Pathfinding array buffers configuration
PathFindBuffers = 100x6;128x6;192x6;256x4;320x4;384x4;500x2

# Weight for nodes without obstacles far from walls
LowWeight = 0.5

# Weight for nodes near walls
MediumWeight = 2

# Weight for nodes with obstacles
HighWeight = 3

# Angle paths will be more "smart", but in cost of higher CPU utilization
AdvancedDiagonalStrategy = True

# Weight for diagonal movement. Used only with AdvancedDiagonalStrategy = True
# Default: LowWeight * sqrt(2) 
DiagonalWeight = 0.707

# Maximum number of LOS postfilter passes, 0 will disable postfilter.
# Default: 3
MaxPostfilterPasses = 3

# Path debug function.
# Nodes known to pathfinder will be displayed as adena, constructed path as antidots.
# Number of the items show node cost * 10
# Potions display path after first stage filter
# Red potions - actual waypoints. Green potions - nodes removed by LOS postfilter
# This function FOR DEBUG PURPOSES ONLY, never use it on the live server !
DebugPath = False

# True = Loads GeoData buffer's content into physical memory.
# False = Does not necessarily imply that the GeoData buffer's content is not resident in physical memory.
# Default: True
ForceGeodata = True

# This setting controls Client <--> Server Player coordinates synchronization:
# -1 - Will synchronize only Z from Client --> Server. Default when no geodata.
# 1 - Synchronization Client --> Server only. Using this option (without geodata) makes it more difficult for players to bypass obstacles.
# 2 - Intended for geodata (at least with cell-level pathfinding, otherwise can you try -1).
# Server sends validation packet if client goes too far from server calculated coordinates.
# Default: -1
CoordSynchronize = 2
and I tried 2 different geodata packs.

HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Re: Castle doors and path fiding.

Post by HorridoJoho » Tue Aug 08, 2017 9:39 pm

Try this patch:
https://bitbucket.org/snippets/HorridoJoho/88Lq4

The usual door coordinates are the doors hinge coordinates, because that is currently the interaction point for attacking which is near a wall, this could cause problems. This patch moves the interaction point for doors into it's middle point, which possibly solves unreachable interaction points.

DjSt3rios
Posts: 29
Joined: Thu Sep 16, 2010 7:00 pm

Re: Castle doors and path fiding.

Post by DjSt3rios » Wed Aug 09, 2017 1:17 pm

Thanks a lot, this indeed solved the problem! :clap: Now there's only a small issue, when walking near the door, the player stops and does not attack, but I think this won't be a hard fix, I will give it a go myself. Thanks again :)

HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Re: Castle doors and path fiding.

Post by HorridoJoho » Thu Aug 10, 2017 5:15 pm

Check this stuff again to see if this helps for door related movement and seeing problems. I updated it to possibly solve the movement problems as well.
https://bitbucket.org/snippets/HorridoJoho/88Lq4

User avatar
u3games
Advanced User
Advanced User
Posts: 1148
Joined: Sun Feb 27, 2011 7:00 pm
Location: España
Contact:

Re: Castle doors and path fiding.

Post by u3games » Fri Aug 11, 2017 3:37 pm

HorridoJoho wrote:
Thu Aug 10, 2017 5:15 pm
Check this stuff again to see if this helps for door related movement and seeing problems. I updated it to possibly solve the movement problems as well.
https://bitbucket.org/snippets/HorridoJoho/88Lq4
Nice!
Image

DjSt3rios
Posts: 29
Joined: Thu Sep 16, 2010 7:00 pm

Re: Castle doors and path fiding.

Post by DjSt3rios » Fri Aug 11, 2017 6:27 pm

HorridoJoho wrote:
Thu Aug 10, 2017 5:15 pm
Check this stuff again to see if this helps for door related movement and seeing problems. I updated it to possibly solve the movement problems as well.
https://bitbucket.org/snippets/HorridoJoho/88Lq4
Thank you, I will give it a go. However my source seems to be quite outdated, I think I will download the latest version and reinstall the faction mod, so it might take a while. I will let you know though :)

DjSt3rios
Posts: 29
Joined: Thu Sep 16, 2010 7:00 pm

Re: Castle doors and path fiding.

Post by DjSt3rios » Tue Aug 22, 2017 10:40 pm

HorridoJoho wrote:
Thu Aug 10, 2017 5:15 pm
Check this stuff again to see if this helps for door related movement and seeing problems. I updated it to possibly solve the movement problems as well.
https://bitbucket.org/snippets/HorridoJoho/88Lq4
Sorry for the late reply, had some personal problems. The attack issue is now gone, however there is still a small issue. If there is a straight path to the door, the character attacks from far away(more than it should), however, if the character needs walk over 2 or more locations, the range is correct. I don't want to trouble you more with this though, but if you do have some ideas on top of your head it would be nice. Thank you for all your help!

User avatar
u3games
Advanced User
Advanced User
Posts: 1148
Joined: Sun Feb 27, 2011 7:00 pm
Location: España
Contact:

Re: Castle doors and path fiding.

Post by u3games » Sat Jun 02, 2018 5:30 pm

Notices? no add to repository?
Image

Post Reply