# templates

Templates are saved bot profiles stored in `bot_templates.yml`. They are the best way to create repeatable arena bots, ranked practice bots, event bots, and controlled test bots.

## Default template examples

PracticeBot ships with example templates similar to:

| Template       | Type     | Purpose                    |
| -------------- | -------- | -------------------------- |
| `arena_normal` | `NORMAL` | Melee PvP arena bot.       |
| `arena_cpvp`   | `CPVP`   | Crystal PvP arena bot.     |
| `arena_dummy`  | `DUMMY`  | Passive/frozen target bot. |

## Template command workflow

Create a template:

```
/pbadmin template create arena_normal_easy
```

Edit a template:

```
/pbadmin template edit arena_normal_easy
```

Spawn a template at your location:

```
/pbadmin template spawn arena_normal_easy
```

Spawn a target-bound template:

```
/pbadmin template spawn arena_normal_easy PlayerName
```

Spawn a template at exact coordinates:

```
/pbadmin template spawn arena_normal_easy world 100 64 100 90 0
```

Delete a template:

```
/pbadmin template delete arena_normal_easy
```

## Template structure

Each template contains:

| Section        | Applies to        | Purpose                                                                                      |
| -------------- | ----------------- | -------------------------------------------------------------------------------------------- |
| General fields | all types         | Name, display name, skin, type, target binding, death/kill behavior, respawn delay, warm-up. |
| `settings`     | `NORMAL`, `DUMMY` | Movement, shield, resistance, frozen, PvP enablement.                                        |
| `combat`       | `NORMAL`          | Strafe, W-tap, S-tap, crits, shield breaker, reach, aggression, crit chance/speed.           |
| `inventory`    | all types         | Armor, enchants, offhand, totems, main hand, armor trims.                                    |
| `cpvp`         | `CPVP`            | Crystal PvP behavior, difficulty, timings, realism, FOV, pearls, anchors, block breaking.    |

## General fields

| Field                   | Values                       | Description                                                                 |
| ----------------------- | ---------------------------- | --------------------------------------------------------------------------- |
| `name`                  | text                         | Internal readable name.                                                     |
| `display-name`          | text                         | NPC name shown above the bot.                                               |
| `skin-name`             | player name or empty         | Skin source name. Empty uses default/editor skin behavior.                  |
| `bot-type`              | `NORMAL`, `CPVP`, `DUMMY`    | Template bot type.                                                          |
| `allow-gui`             | `true`/`false`               | Compatibility flag. Runtime template bots normally keep regular GUI closed. |
| `target-binding`        | `REQUIRED`, `NONE`, `BOT`    | How the template handles targets.                                           |
| `death-mode`            | `REMOVE`, `RESPAWN`          | What happens when the bot dies.                                             |
| `kill-mode`             | `DESPAWN`, `RESPAWN`, `NONE` | What happens after the bot kills its target.                                |
| `respawn-delay-seconds` | number                       | Delay before respawn when respawn behavior is used.                         |
| `warm-up-seconds`       | number                       | Delay before the bot starts fighting after spawn.                           |

## Target binding modes

| Mode       | Description                                                                        |
| ---------- | ---------------------------------------------------------------------------------- |
| `REQUIRED` | A live player target is required. Best for duel/arena bots.                        |
| `NONE`     | No explicit player target is accepted. Useful for passive or autonomous templates. |
| `BOT`      | Intended for bot-targeting scenarios.                                              |

## Death and kill modes

| Field        | Value     | Behavior                                  |
| ------------ | --------- | ----------------------------------------- |
| `death-mode` | `REMOVE`  | Bot despawns after death.                 |
| `death-mode` | `RESPAWN` | Bot respawns from the same template.      |
| `kill-mode`  | `DESPAWN` | Bot despawns after killing the target.    |
| `kill-mode`  | `RESPAWN` | Bot respawns after killing the target.    |
| `kill-mode`  | `NONE`    | Bot stays alive after killing the target. |

## Recommended template strategy

Use separate templates for separate roles:

* `arena_normal_easy`
* `arena_normal_hard`
* `arena_cpvp_medium`
* `arena_cpvp_pro`
* `dummy_static`
* `dummy_mace_training`

This is cleaner than repeatedly changing global defaults.

> **Media placeholder:** Add a screenshot of `bot_templates.yml` showing one Normal, one CPvP, and one Dummy template with private data hidden.


---

# 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/templates-1.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.
