# template editor

The template editor is the recommended way to create and modify templates in-game.

## Start editing

Create a new template:

```
/pbadmin template create <template>
```

Edit an existing template:

```
/pbadmin template edit <template>
```

Cancel your active session:

```
/pbadmin template cancel
```

## Main editor page

The main page controls:

| Control                       | Description                                              |
| ----------------------------- | -------------------------------------------------------- |
| Template Name                 | Internal readable name.                                  |
| NPC Display Name              | Name shown above the bot.                                |
| Skin                          | Player-name skin source.                                 |
| Bot Type                      | Cycles `NORMAL`, `CPVP`, and `DUMMY`.                    |
| Target Binding                | Cycles target behavior.                                  |
| Respawn Delay                 | Left-click +1s, right-click -1s, shift-click type value. |
| Kill Mode                     | Cycles behavior after killing target.                    |
| Death Mode                    | Cycles behavior after death.                             |
| Warm-Up                       | Delay before fighting after spawn.                       |
| Combat/Behavior/CPvP Settings | Opens the type-specific page.                            |
| Inventory Settings            | Opens equipment and armor trim editor.                   |
| Finish & Save                 | Saves to `bot_templates.yml`.                            |
| Cancel                        | Discards the session and removes the preview NPC.        |

## Type-specific pages

| Bot type | Editor page             |
| -------- | ----------------------- |
| `NORMAL` | Combat settings page.   |
| `CPVP`   | CPvP settings page.     |
| `DUMMY`  | Behavior settings page. |

## Behavior page

Used mainly for Normal and Dummy templates.

Options:

* look at target
* follow target
* random walk
* hold shield
* use shield
* resistance
* frozen
* shield hand

## Combat page

Used by Normal templates.

Options:

* strafe
* W-tap
* S-tap
* critical hits
* shield breaker
* retreat
* reach mode
* aggression
* crit chance
* crit speed

## CPvP page

Used by CPvP templates.

Options:

* skill level
* block breaking
* pearls
* pearl cooldown
* mace
* golden apples
* heal threshold
* strafing
* obsidian placing
* anchoring mode

The CPvP page displays timing/realism data from the selected skill profile and supports per-template saved values in `bot_templates.yml`.

## Inventory page

The inventory editor supports:

* armor piece material cycling
* armor enchant cycling
* main hand item selection
* totem count
* armor trim pattern slots
* armor trim material slots

## Save behavior

When you click **Finish & Save**, the editor writes the template into `bot_templates.yml`.

After saving, test the template with:

```
/pbadmin template spawn <template>
```

{% hint style="warning" %}
Do not edit the same template manually in YAML while a staff member has an active template editor session open. Save or cancel the session first.
{% endhint %}

> **Media placeholder:** Add a GIF showing `/pbadmin template create`, changing bot type to CPvP, opening CPvP settings, saving, and spawning the template.


---

# 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://edelweiss-network.gitbook.io/practicebot/template-editor.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.
