DPB2Class · Navigation

ExilePather

Query routes and path distances in the current area. Route calculation and issuing movement commands are separate operations.

Namespace: DreamPoeBot.Loki.Bot.Pathfinding

public static class ExilePatherView DPB1 version →

Examples

Imports used by these examples
using System;
using System.Linq;
using DreamPoeBot.Loki.Game;
using DreamPoeBot.Loki.Game.Objects;
using DreamPoeBot.Loki.Bot;
using DreamPoeBot.Loki.Bot.Pathfinding;
using DreamPoeBot.Loki.Common;

Measure the route to a transition

if (!LokiPoe.IsInGame)
    return;

var target = LokiPoe.ObjectManager.GetObjectsByType<AreaTransition>()
    .FirstOrDefault(obj => obj.IsTargetable);
if (target != null)
{
    var distance = ExilePather.PathDistance(LokiPoe.MyPosition, target.Position);
}

A path measurement is not a movement command. Recheck the target before moving.

Members and overloads

36 results

OnExilePatherReload

EventLink ↗
public static ExilePather.ExilePatherReloadEvent ExilePather.OnExilePatherReload

Raised for on exile pather reload. Subscribe with the callback type shown in the signature.

OnObstacleUpdate

EventLink ↗
public static ExilePather.ObstacleUpdateEvent ExilePather.OnObstacleUpdate

Raised for on obstacle update. Subscribe with the callback type shown in the signature.

IsReady

FieldLink ↗
public static bool ExilePather.IsReady

Whether this exile pather is ready.

JumpableTgt

FieldLink ↗
public static List<string> ExilePather.JumpableTgt

Gets or sets the jumpable tgt collection. Its element types are linked below.

AddBoxObstacle

MethodLink ↗
public static uint ExilePather.AddBoxObstacle(Vector2i min, Vector2i max, string description = null)

Add a box obstacle to tile cache

minVector2i
corner of the box
maxVector2i
opposing corner of the box
descriptionstring
Specifies description. Optional; the default is shown in the signature.

Returns: Reference to obstacle or uint.MaxValue on error

Caller is supposed to call DreamPoeBot.Loki.Bot.Pathfinding.ExilePather.UpdateObstacles to refresh the tilecache after Corners should be opposing pair, i.e. BottomRight + TopLeft or BottomLeft + TopRight, other way also works (i.e. min and max can be swapped).

AddCircleObstacle

MethodLink ↗
public static uint ExilePather.AddCircleObstacle(Vector2i position, float radius, string description = null)

Add a circle obstacle to tile cache

positionVector2i
Center
radiusfloat
Radius
descriptionstring
Optional description

Returns: Reference to obstacle or uint.MaxValue on error

Caller is supposed to call DreamPoeBot.Loki.Bot.Pathfinding.ExilePather.UpdateObstacles to refresh the tilecache after

BlockTriggerableBlockages

MethodLink ↗
public static void ExilePather.BlockTriggerableBlockages(ref byte[] data, int bytesPerRow, Func<NetworkObject, bool> shouldBlock, List<NetworkObject> obj)

Sets a blockage's observed footprint to zero clearance (predicate true) or restores its original clearance (predicate false). Does not open or close the object in the game or turn surrounding walls into walkable cells. Empty bounds contain no cells and are ignored without interrupting the remaining objects.

databyte[]
Walkability data buffer to modify.
bytesPerRowint
Row stride in bytes for data.
shouldBlockFunc<NetworkObject, bool>
Predicate indicating whether a blockage should be applied for a given object.
objList<NetworkObject>
Objects whose triggerable blockage components supply the overlay.

When data is the active LokiPoe.TerrainData.Cache.Data buffer, call UpdateObstacles once after batching edits. It rebuilds the global mesh only if cells changed, preserving temporary obstacles and their handles. Explicit choices take priority over automatic blockage updates for this cached terrain. A forced Reload(true) or terrain recache reads a new game buffer; reapply the choices afterwards if still required. Edits to a separate byte array do not affect the global Pathfinder. The footprint must first be observed while the object is closed. An already-open object's buffer is not a mask; if its closed footprint is unknown this method reports the missing data instead of altering the whole rectangle.

CanObjectSee

MethodLink ↗
public static bool ExilePather.CanObjectSee(Vector2i start, Vector2i end, out Vector2i hitPoint, bool dontLeaveFrame = false, bool shouldUseRangedMap = false)

Convenience wrapper over DreamPoeBot.Loki.Bot.Pathfinding.ExilePather.Raycast(DreamPoeBot.Common.Vector2i,DreamPoeBot.Common.Vector2i,DreamPoeBot.Common.Vector2i@,System.Boolean,System.Boolean). Returns true if the line between start and end is unobstructed.

startVector2i
Ray start position.
endVector2i
Ray end position.
hitPointVector2i
On failure, set to the first blocking point; otherwise DreamPoeBot.Common.Vector2i.Zero
dontLeaveFramebool
Not used; kept for compatibility.
shouldUseRangedMapbool
If true, uses ranged/fly map for evaluation.

Returns: true if no obstacle was encountered; otherwise false.

CanObjectSee

MethodLink ↗
public static bool ExilePather.CanObjectSee(NetworkObject obj, Vector2i position, out Vector2i hitPoint, bool dontLeaveFrame = false, bool shouldUseRangedMap = false)

Returns whether there is clear line-of-sight from obj to a map position and reports the hit point if blocked.

objNetworkObject
Source object.
positionVector2i
Target position.
hitPointVector2i
On failure, set to the first blocking point; otherwise DreamPoeBot.Common.Vector2i.Zero.
dontLeaveFramebool
Not used; kept for compatibility.
shouldUseRangedMapbool
If true, uses ranged/fly map for evaluation.

Returns: true if unobstructed; otherwise false.

CanObjectSee

MethodLink ↗
public static bool ExilePather.CanObjectSee(NetworkObject obj, NetworkObject other, out Vector2i hitPoint, bool dontLeaveFrame = false, bool shouldUseRangedMap = false)

Returns whether there is clear line-of-sight between two DreamPoeBot.Loki.Game.Objects.NetworkObject instances and reports the hit point if blocked.

objNetworkObject
Source object.
otherNetworkObject
Target object.
hitPointVector2i
On failure, set to the first blocking point; otherwise DreamPoeBot.Common.Vector2i.Zero.
dontLeaveFramebool
Not used; kept for compatibility.
shouldUseRangedMapbool
If true, uses ranged/fly map for evaluation.

Returns: true if unobstructed; otherwise false.

ClearObstacles

MethodLink ↗
public static void ExilePather.ClearObstacles()

Clears all temporary obstacles from the tile cache.

Also calls DreamPoeBot.Loki.Bot.Pathfinding.ExilePather.UpdateObstacles to ensure the tile cache is up to date.

ClearWalkablePositionCache

MethodLink ↗
public static void ExilePather.ClearWalkablePositionCache()

Clears walkable position cache.

FastWalkablePositionFor

MethodLink ↗
public static Vector2i ExilePather.FastWalkablePositionFor(Vector2i pos, int range = 30, bool cache = true)

Finds a nearby walkable position around pos within range.

posVector2i
Center position.
rangeint
Search radius in world/grid units.
cachebool
Not read by this overload in the reviewed source. Do not rely on this argument to change its behavior.

Returns: A walkable position, or DreamPoeBot.Common.Vector2i.Zero if none found.

FastWalkablePositionFor

MethodLink ↗
public static Vector2i ExilePather.FastWalkablePositionFor(NetworkObject obj, int range = 30, bool cache = true)

Finds a nearby walkable position around obj within range.

objNetworkObject
Reference object.
rangeint
Search radius in world/grid units.
cachebool
Specifies cache. Optional; the default is shown in the signature.

Returns: A walkable position, or DreamPoeBot.Common.Vector2i.Zero if none found.

GetPointsOnSegment

MethodLink ↗
public static List<Vector2i> ExilePather.GetPointsOnSegment(Vector2i start, Vector2i end, bool dontLeaveFrame)

Returns all integer grid points along the straight line from start to end (inclusive). Uses Bresenham-style rasterization.

startVector2i
Starting point (inclusive).
endVector2i
Ending point (inclusive).
dontLeaveFramebool
Not read by this overload in the reviewed source. Do not rely on this argument to change its behavior.

Returns: Ordered list of grid points from start to end.

IsWalkable

MethodLink ↗
public static bool ExilePather.IsWalkable(Vector2i arg)

Returns whether arg lies on a walkable navmesh polygon.

argVector2i
Position to test.

Returns: true if walkable; otherwise false.

IsWalkable

MethodLink ↗
public static bool ExilePather.IsWalkable(int x, int y)

Returns whether the position (x, y) lies on a walkable navmesh polygon.

xint
X coordinate.
yint
Y coordinate.

Returns: true if walkable; otherwise false.

PathDistance

MethodLink ↗
public static float ExilePather.PathDistance(Vector2i start, Vector2i end)

Returns the distance of the path between two points.

startVector2i
The starting position for pathfinding
endVector2i
The destination position for pathfinding

Returns: Path length in world units, or System.Single.MaxValue if no path exists.

PathExistsBetween

MethodLink ↗
public static bool ExilePather.PathExistsBetween(Vector2i start, Vector2i end)

Returns true if a path exists between start and end using the current navmesh.

startVector2i
Specifies start.
endVector2i
Specifies end.

Returns: A Boolean result. The member description explains the condition being checked.

Raycast

MethodLink ↗
public static bool ExilePather.Raycast(Vector2i start, Vector2i end, out Vector2i hitPoint, bool dontLeaveFrame = false, bool shouldUseRangedMap = false)

Project a ray from start to end, if the ray encounter a non walkable location or an obstacle, it return false and out the location of the obstacle as hitpoint. This function do not consider dynamic objects (object collected with Objectmanager, like doors, chests, monsters etc).

startVector2i
The start position of the ray.
endVector2i
The end Position of the ray.
hitPointVector2i
If the function return false, hitpoint is set to the first non walkable position.
dontLeaveFramebool
Not read by this overload in the reviewed source. Do not rely on this argument to change its behavior.
shouldUseRangedMapbool
Should the function evaluate the Ranged map instead of the Walk map? use this for spells or arrows.

Returns: Return true if the function do not encounter any obstacle, or false if a obstacle is encountered.

This function also Broadcast a message with id "Raycast_Result" and has 4 parms as input: Vector2i start, Vector2i end, bool Returnvalue, Vector2i hitPoint. If ground map is used, detour's raycast is used which is generally a lot faster.

Raycast

MethodLink ↗
public static bool ExilePather.Raycast(Vector2i start, Vector2i end, List<NetworkObject> objectsToConsider, out Vector2i hitPoint, out int objectId, bool dontLeaveFrame = false, bool shouldUseRangedMap = false)

Project a ray from start to end, if the ray encounter a non walkable location or an obstacle, it return false and out the location of the obstacle as hitpoint, and Object Id in cast the obstacle is an NetworkObject. This function account for a given list of NetworkObjects to include in the calculation. This function account for the interactsize of the networkobject, so the hitboz is considered.

startVector2i
The start position of the ray.
endVector2i
The end Position of the ray.
objectsToConsiderList<NetworkObject>
A List of NetworkObject to include in the calculation
hitPointVector2i
If the function return false, hitpoint is set to the first non walkable position.
objectIdint
The Id of the eventual NetworkObject hit by the ray.
dontLeaveFramebool
Not read by this overload in the reviewed source. Do not rely on this argument to change its behavior.
shouldUseRangedMapbool
Should the function evaluate the Ranged map instead of the Walk map? use this for spells or arrows.

Returns: Return true if the function do not encounter any obstacle, or false if a obstacle is encountered.

RaycastPf

MethodLink ↗
public static bool ExilePather.RaycastPf(Vector2i start, Vector2i end, out Vector2i hitPoint)

Raycast directly via navmesh wrapper. Returns true if no blocking obstacle. Only works for ground level mesh.

startVector2i
Start point of the ray
endVector2i
End point of the ray
hitPointVector2i
Hit point in case obstacle was encountered. Is DreamPoeBot.Common.Vector2i.Zero by default.

Returns: True if no obstacle was encountered.

Reload

MethodLink ↗
public static void ExilePather.Reload(bool force = false)

Synchronously (re)loads navmesh and height map for the current area and applies dynamic obstacles. When the game is not ready, returns without rebuilding and leaves IsReady false.

forcebool
If true, rebuilds even if the cached area matches.

ReloadAsync

MethodLink ↗
public static Task ExilePather.ReloadAsync(bool force = false, CancellationToken ct = default(CancellationToken))

Asynchronously (re)loads navmesh and height map for the current area and applies dynamic obstacles. When the game is not ready, completes without rebuilding and leaves IsReady false.

forcebool
If true, rebuilds even if the cached area matches.
ctCancellationToken
Cancellation token used to abort the reload.

Returns: A task that completes when the reload finishes or is canceled.

RemoveObstacle

MethodLink ↗
public static bool ExilePather.RemoveObstacle(uint obstacleRef)

Removes an obstacle by its reference ID.

obstacleRefuint
Specifies obstacle ref.

Returns: True if removal was successful

Caller is supposed to call DreamPoeBot.Loki.Bot.Pathfinding.ExilePather.UpdateObstacles to refresh the tilecache after

RemoveObstacles

MethodLink ↗
public static int ExilePather.RemoveObstacles(Vector2i position)

Removes all CIRCLE obstacles whose centers are within 2 units of the given position.

positionVector2i
Position

Returns: Amount of obstacles removed.

Caller is supposed to call DreamPoeBot.Loki.Bot.Pathfinding.ExilePather.UpdateObstacles to refresh the tilecache after

SignalObstacleUpdate

MethodLink ↗
public static void ExilePather.SignalObstacleUpdate()

Raises DreamPoeBot.Loki.Bot.Pathfinding.ExilePather.OnObstacleUpdate to signal that obstacle state changed.

UpdateObstacles

MethodLink ↗
public static bool ExilePather.UpdateObstacles()

Applies pending blockage terrain edits and temporary obstacles to the global navigation mesh. Call once after batching edits. Terrain changes require a full mesh rebuild; ordinary obstacle updates only rebuild affected tiles.

Returns: True if the update succeeded and the cache is up to date.

AreaHash

PropertyLink ↗
public static uint ExilePather.AreaHash { get; private set; }

Gets area hash for ExilePather.

AscendancyDoorRadiusOverride

PropertyLink ↗
public static int ExilePather.AscendancyDoorRadiusOverride { get; set; }

Gets or sets ascendancy door radius override for ExilePather.

Related types

DPB2 0.4.5.88 · Reference reviewed 2026-10-02. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.