> For the complete documentation index, see [llms.txt](https://xgine.gitbook.io/xgine-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xgine.gitbook.io/xgine-docs/core-features/navigation.md).

# Navigation & Pathfinding

Ragnabot features an advanced pathfinding system that enables intelligent and efficient map traversal.

***

## 🗺️ Navigation Modes

Choose the navigation mode that best fits your playstyle:

| Mode                     | Description                                 | Best For                  |
| ------------------------ | ------------------------------------------- | ------------------------- |
| **🚶 Teleport**          | Teleport to random locations when idle      | Quick repositioning       |
| **🔀 Random Walk**       | Walk to random walkable destinations        | General farming           |
| **📍 Fixed Position**    | Stay near a set coordinate                  | MVP camping, spot holding |
| **🔒 Map Lock**          | Stay within a specific map with random walk | Dedicated farming         |
| **🚪 Portal Navigation** | Multi-map traversal through portals         | Long-distance travel      |
| **🗺️ Map Hop**          | Cycle through configured maps               | Multi-map farming         |
| **👥 Follow Master**     | Follow a designated party member            | Support builds            |

***

## ⚡ Pathfinding Speed

{% hint style="info" %}
Balance between path quality and system performance based on your needs.
{% endhint %}

| Speed           | Description        | Recommended For                  |
| --------------- | ------------------ | -------------------------------- |
| **🎯 Quality**  | Best path accuracy | Complex maps with many obstacles |
| **⚡ Fast**      | Good balance       | General use (recommended)        |
| **🚀 VeryFast** | Quick calculations | Simple, open maps                |
| **💨 Fastest**  | Minimal processing | Low-end systems                  |

***

## 🔒 Map Lock

Lock your character to a specific map for uninterrupted farming.

<details>

<summary><strong>How to Set Up Map Lock</strong></summary>

1. Navigate to your desired farming map
2. Click the **Lock Map** button
3. The bot will automatically return to this map if displaced

</details>

{% hint style="success" %}
**Pro Tip:** Map Lock works great with Portal Navigation to automatically return to your farming spot even after being warped far away.
{% endhint %}

***

## 📍 Fixed Position Mode

Keep your character within a specific area — perfect for camping specific spawns.

### Use Cases

| Scenario                   | Benefit                            |
| -------------------------- | ---------------------------------- |
| **MVP Camping**            | Stay near spawn point              |
| **Specific Spawn Farming** | Target particular monster spawns   |
| **AFK Spot Holding**       | Maintain position in popular areas |

***

## 🚪 Portal Navigation

Automatically traverse multiple maps to reach your destination.

### How It Works

1. **Route Calculation** — Finds the shortest path through the portal network
2. **Sequential Travel** — Walks through each portal in order
3. **Auto-Recovery** — Returns to route if interrupted
4. **Smart Fallback** — If a portal cannot be found, automatically uses map-to-map pathfinding instead

{% hint style="success" %}
**New:** Portal navigation now includes automatic fallback to path-based movement when portals are unavailable, ensuring more reliable navigation.
{% endhint %}

***

## 🔄 Smart Path Recovery

The system intelligently handles interruptions during movement:

| Situation            | Response                          |
| -------------------- | --------------------------------- |
| **Minor deviation**  | Continues from nearest path point |
| **Medium deviation** | Creates connector path to rejoin  |
| **Major deviation**  | Recalculates entire path          |

{% hint style="info" %}
Path recovery ensures smooth operation even when combat or looting moves you off your planned route.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xgine.gitbook.io/xgine-docs/core-features/navigation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
