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 ExilePather
Reference: DPB2 0.4.5.103Compare the DPB1 reference → Check signatures and usage notes separately; a matching type is not a compatibility guarantee.

Use this API

Class usage example: Measure the route to a transition →

Members and overloads

39 declared here

OnExilePatherReload

EventLink ↗
public static ExilePather.ExilePatherReloadEvent ExilePather.OnExilePatherReload

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

Event handler type: staticNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

OnObstacleUpdate

EventLink ↗
public static ExilePather.ObstacleUpdateEvent ExilePather.OnObstacleUpdate

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

Event handler type: staticNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

IsReady

FieldLink ↗
public static bool ExilePather.IsReady

Whether this exile pather is ready.

Value type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

JumpableTgt

FieldLink ↗
public static List<string> ExilePather.JumpableTgt

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

Value type: List<string>No current DPB page is linked for this built-in, external, generic or compatibility-only type.

AddBoxObstacle

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

Add a box obstacle to tile cache

Return type: uintNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

min

corner of the box

max

opposing corner of the box

description
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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

Return type: uintNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

position

Center

radius
Parameter type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Radius

description
Parameter type: stringNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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)

Applies a blockage's observed closed clearance (predicate true) or restores its open 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.

Return type: voidNo return value.

Parameters

data
Parameter type: byte[]No current DPB page is linked for this built-in, external, generic or compatibility-only type.

Walkability data buffer to modify.

bytesPerRow
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Row stride in bytes for data.

shouldBlock
Parameter type: Func<NetworkObject, bool>

Predicate indicating whether a blockage should be applied for a given object.

obj
Parameter type: List<NetworkObject>

Objects whose triggerable blockage components supply the overlay.

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

start

Ray start position.

end

Ray end position.

hitPoint

On failure, set to the first blocking point; otherwise DreamPoeBot.Common.Vector2i.Zero

dontLeaveFrame
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Not used; kept for compatibility.

shouldUseRangedMap
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

obj
Parameter type: NetworkObject

Source object.

position

Target position.

hitPoint

On failure, set to the first blocking point; otherwise DreamPoeBot.Common.Vector2i.Zero.

dontLeaveFrame
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Not used; kept for compatibility.

shouldUseRangedMap
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

obj
Parameter type: NetworkObject

Source object.

other
Parameter type: NetworkObject

Target object.

hitPoint

On failure, set to the first blocking point; otherwise DreamPoeBot.Common.Vector2i.Zero.

dontLeaveFrame
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Not used; kept for compatibility.

shouldUseRangedMap
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: voidNo return value.

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.

Return type: voidNo return value.

EditTriggerableBlockages

MethodLink ↗
public static void ExilePather.EditTriggerableBlockages(byte[] navData, Vector2i boundsMin, Vector2i boundsMax, NavDataOperation operation)

Applies caller-supplied packed NavData to the active ground terrain, refreshes affected tiles once, and sends OnObstacleUpdate after success. No NetworkObject or saved object identity is required. Does not modify the game's terrain or change an object's state.

Return type: voidNo return value.

Parameters

navData
Parameter type: byte[]No current DPB page is linked for this built-in, external, generic or compatibility-only type.

Row-major packed clearance values (0..5), two cells per byte: even global X in the low nibble, odd global X in the high nibble. Row stride is ceil(boundsMax.X / 2) - floor(boundsMin.X / 2). At least stride * height bytes are required; trailing bytes (such as the flying layer) are ignored. Padding nibbles outside the bounds are ignored. A separate source array is never modified or retained. If source and destination are the same array, source values are copied before terrain edits.

boundsMin

Inclusive minimum grid coordinates in the active map, not world coordinates.

boundsMax

Exclusive maximum grid coordinates. Empty bounds make no terrain changes.

operation
Parameter type: NavDataOperation

Add/Subtract a delta with saturation at 5/0, or Replace with absolute values.

Requires initialized navigation. The caller owns the data, area selection and timing; no provenance or object-state inference is performed. Opened component NavData may contain absolute values, not a delta. Add/Subtract accumulate on repeated calls and are not necessarily inverses after saturation. Replace writes zero too: zero is not a transparent mask. Unaddressed cells and temporary obstacles are preserved. No persistent object override is registered: later object edits or Reload can replace these values. Only ground navigation is changed, not the ranged/flying map. Invalid bounds, short input or in-bounds values outside 0..5 are rejected before any terrain write. Do not change the input array concurrently. On refresh failure, terrain edits remain queued; retry UpdateObstacles, not this operation, to avoid applying a delta twice. Added in public DPB2 0.4.5.103. Requires initialized navigation for the current area. Minimum bounds are inclusive and maximum bounds exclusive. Changes ground navigation, not game terrain or the ranged/flying map. Temporary obstacles are retained. Add/Subtract accumulate and saturate; Replace assigns absolute values including zero. Later object updates or Reload can replace these edits. If refresh fails, retry UpdateObstacles, not the delta operation.

EditTriggerableBlockages

MethodLink ↗
public static void ExilePather.EditTriggerableBlockages(Func<NetworkObject, bool> shouldBlock, List<NetworkObject> obj)

Edits the supplied objects' navigation on the active terrain and flushes affected tiles once. True restores the closed grades using the observed delta or supported Hull fallback; false restores the open grades. Closing does not force every affected cell to zero. Does not change the objects' state in the game.

Return type: voidNo return value.

Parameters

shouldBlock
Parameter type: Func<NetworkObject, bool>

Specifies should block.

obj
Parameter type: List<NetworkObject>

Specifies obj.

See DreamPoeBot.Loki.Bot.Pathfinding.ExilePather.BlockTriggerableBlockages(System.Byte[]@,System.Int32,System.Func{DreamPoeBot.Loki.Game.Objects.NetworkObject,System.Boolean},System.Collections.Generic.List{DreamPoeBot.Loki.Game.Objects.NetworkObject}) for Hull fallback limitations, including circular shapes not yet verified live.

FastWalkablePositionFor

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

Finds a nearby walkable position around pos within range.

Return type: Vector2i
Explore Vector2i → members & methods

A two-dimensional integer position. Used by grid-position and pathfinding APIs; screen-position APIs may expect a different coordinate type.

Parameters

pos

Center position.

range
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Search radius in world/grid units.

cache
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: Vector2i
Explore Vector2i → members & methods

A two-dimensional integer position. Used by grid-position and pathfinding APIs; screen-position APIs may expect a different coordinate type.

Parameters

obj
Parameter type: NetworkObject

Reference object.

range
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Search radius in world/grid units.

cache
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Specifies cache. Optional; the default is shown in the signature.

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

FindPath

MethodLink ↗
public static PathResult ExilePather.FindPath(Vector2i start, Vector2i end, bool waypoints = true, byte distanceBetweenHops = 15)

Finds a path between two points. When waypoints are enabled, segments are spaced by distanceBetweenHops.

Return type: PathResult
Explore PathResult → members & methods

The outcome of a route query, not a movement command. Check Success before reading Path; inspect ErrorCode when planning fails.

Parameters

start

The starting position for pathfinding

end

The destination position for pathfinding

waypoints
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Whether to include waypoints in the returned path

distanceBetweenHops
Parameter type: byteNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Distance between path segments when waypoints are enabled

Returns: A DreamPoeBot.Loki.Bot.Pathfinding.RDWrapper.Types.PathResult containing the found path or failure information

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.

Return type: List<Vector2i>
Explore Vector2i → members & methods

A two-dimensional integer position. Used by grid-position and pathfinding APIs; screen-position APIs may expect a different coordinate type.

Parameters

start

Starting point (inclusive).

end

Ending point (inclusive).

dontLeaveFrame
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

arg

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

x
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

X coordinate.

y
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: floatNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

start

The starting position for pathfinding

end

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

start

Specifies start.

end

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).

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

start

The start position of the ray.

end

The end Position of the ray.

hitPoint

If the function return false, hitpoint is set to the first non walkable position.

dontLeaveFrame
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Not read by this overload in the reviewed source. Do not rely on this argument to change its behavior.

shouldUseRangedMap
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

start

The start position of the ray.

end

The end Position of the ray.

objectsToConsider
Parameter type: List<NetworkObject>

A List of NetworkObject to include in the calculation

hitPoint

If the function return false, hitpoint is set to the first non walkable position.

objectId
Parameter type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

The Id of the eventual NetworkObject hit by the ray.

dontLeaveFrame
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Not read by this overload in the reviewed source. Do not rely on this argument to change its behavior.

shouldUseRangedMap
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

start

Start point of the ray

end

End point of the ray

hitPoint

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.

Return type: voidNo return value.

Parameters

force
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: TaskNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

force
Parameter type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

If true, rebuilds even if the cached area matches.

ct
Parameter type: CancellationTokenNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: boolNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

obstacleRef
Parameter type: uintNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

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.

Return type: intNo current DPB page is linked for this built-in, external, generic or compatibility-only type.

Parameters

position

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.

Return type: voidNo return value.

Class usage examples

These examples demonstrate the class, not every member listed above. Each example links the declarations it teaches.

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 || LokiPoe.Me == null)
    return;

ExilePather.Reload();
if (!ExilePather.IsReady)
    return;

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

Run on the bot thread and throttle repeated checks. Reload prepares the current area's navigation data. A measurement is not a movement command or an arrival confirmation; recheck the target before acting.

Guides using this class

See how these APIs fit together. Labs include complete source; the FollowBot walkthrough teaches you to build your own bot from selected fragments and checkpoints.

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