# 01 Conditions

A **Condition** is a small object you attach to a node or path. It controls **who** can pass and **how expensive** the passage is.

## Built-in conditions

| Condition         | What it does                                                  |
| ----------------- | ------------------------------------------------------------- |
| **Always Pass**   | Trivial — placeholder. Always allows.                         |
| **Require Tag**   | Travelers must have a specific Gameplay Tag. Optional invert. |
| **Require Class** | Travelers must be a specific actor class (or subclass).       |

## Adding a condition to a node or path

1. Select the OWP Node or Path in the level.
2. In the **Details** panel, expand **OWP > Gameplay > Conditions**.
3. Click **+** and pick a condition class.
4. Configure its properties inline.

## Examples

| Want                          | Setup                                                |
| ----------------------------- | ---------------------------------------------------- |
| Pedestrian-only sidewalk      | Require Tag = `Locomotion.Pedestrian`.               |
| Vehicle-only highway          | Require Tag = `Locomotion.Vehicle`.                  |
| Guards-only patrol path       | Require Class = `BP_GuardNPC`.                       |
| Path forbidden to heavy units | Require Tag = `Size.Heavy` with **Invert Check** on. |

## Custom condition (Blueprint)

1. Content Browser → Add → Blueprint Class → Parent: **OWP Condition**.
2. Override **Can Pass** to return true/false.
3. Override **Get Cost Modifier** to return a multiplier (1.0 = normal, >1 = expensive, <0 = blocked).
4. Drop your custom condition into a node or path's Conditions array.

## Two outputs to know

| Output                | Meaning                                                      |
| --------------------- | ------------------------------------------------------------ |
| **Can Pass = false**  | Path is excluded from the route entirely.                    |
| **Cost Modifier > 1** | Path is more expensive (route avoids if alternatives exist). |
| **Cost Modifier < 0** | Path is blocked.                                             |

## Performance note

Conditions are evaluated during pathfinding. Keep your override cheap — no `Get All Actors of Class`, no slow loops. Read traveler tags or simple state.


---

# Agent Instructions: 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:

```
GET https://onesteppack.gitbook.io/openworldnavigation-doc/05-gameplay/01-conditions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
