User Tools

Site Tools


en:modulebuilding:pathfinding-introduction

This is an old revision of the document!


Importance of proper pathfinding

This article has been written as a part of fixing Loftenwood Cementery due to serious pathfinding issues. As part of this, we have decided to summarize problems with pathfinding during the creation of the new NWN locations.

It suppose to help WB to create locations which don't have this kind of issue.

What is pathfinding?

Pathfinding is crucial mechanism in NWN supporting the click-to-move action of the players. Players usually navigates character via mouse clicking.

NWN engine will try to calculate right path which leads from the current location to the clicked destination.

Why corrupted pathfinding is serious issue?

When mouse clicking doesn't work properly in some location then players get frustrated and instead they have to switch to use the “WASD” keys to navigate. This worsens the gaming experience.

Also, pathfinding is used as well to properly navigate NPCs in the location. With bugged pathfinding, both the NPC and the players can get stucked in front of some obstacle.

How does pathfinding works?

It can be simply said that pathfinding works in this 2 steps. When player clicks on the map:

  1. The NWN engine calculates the correct path to the target location based on the tiles only.
  2. Then the character starts to move, where during the traveling it will try to avoid placements which appeared in the path

What we have to be careful about?

Based on the above knowledge, we have to ensure, that:

  1. The tiles on the map are not bugged
  2. The solid placements on the map are properly organized

How do we ensure that?

There is several “rules of thumb” which will be described in another articles.

Ii should be responsibility of the World builder to test the created location and ensure proper pathfinding functionality.

👮‍ Arkhalia Wiki guard: Please add h2 title when you are already using h3 title. Reason: It doesn't look good to skip caption levels in the Article.
en/modulebuilding/pathfinding-introduction.1768477674.txt.gz · Last modified: 2026/01/15 11:47 by juras17