> For the complete documentation index, see [llms.txt](https://sniveler-code.gitbook.io/dots/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sniveler-code.gitbook.io/dots/project-ai-behavior-architect/section-5/decorators.md).

# 🎀 Decorators

Decorator nodes only ever have **one child**. They sit above that child and modify its behavior, alter its result, or restrict its execution.

#### 🔁 Repeater

Executes its child node multiple times before returning a result to the parent.

* **Configuration:** You define the number of loops in the Node Inspector. If set to 0, it loops infinitely.
* Use case: "Chop Tree 5 times."

#### 🔄 Retry

Similar to the Repeater, but it only restarts the child if the child returns **Failure**.

* **Configuration:** You define the maximum number of retry attempts. If all attempts fail, the Retry node returns Failure to the parent.
* Use case: "Try to unlock the door up to 3 times."

#### ⏳ Cooldown

Prevents its child node from being executed again until a specific real-world time duration has passed. If evaluated while the cooldown is active, it instantly returns Failure.

* **Configuration:** Set the cooldown time (in seconds).
* Use case: Preventing an enemy from spamming a heavy attack.

#### 🚫 Inverter

Reverses the result of its child node.

* If the child returns Success, the Inverter returns **Failure**.
* If the child returns Failure, the Inverter returns **Success**.
* Use case: "NOT in range." (Checks if in range, then inverts the success).

#### ✅ Force Success / ❌ Force Failure

These decorators ignore the actual result of their child node and override the output.

* **Force Success:** Always returns Success, even if the child failed.
* **Force Failure:** Always returns Failure, even if the child succeeded.
* Use case: Running a non-critical animation sequence that you don't care if it gets interrupted or fails, ensuring the main branch continues.


---

# 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://sniveler-code.gitbook.io/dots/project-ai-behavior-architect/section-5/decorators.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.
