# Commands

**Version:** 1.0.0

All Heirlooms commands start with `/ksheirloom`. The command has no aliases.

| Command | Used by | Permission |
|---------|---------|------------|
| `/ksheirloom` | players | `ks.heirlooms.user.open` (allowed unless denied) |
| `/ksheirloom admin` | admins | `ks.heirlooms.admin` |
| `/ksheirloom test [--level=<0-3>]` | admins | `ks.heirlooms.admin` |
| `/ksheirloom check` | admins | `ks.heirlooms.admin` |
| `/ksheirloom clear` | admins | `ks.heirlooms.admin` |
| `/ksheirloom wear` | admins | `ks.heirlooms.admin` |
| `/ksheirloom reload` | admins, console | `ks.heirlooms.admin` |
| `/kslang [code]` | players | none (shared by all KyuubiSoft mods) |

`test`, `check`, `clear` and `wear` act on the item in your hand: the active hotbar slot, or the tool from the tool belt while you use it. A shield in the off-hand slot is not "in your hand" for these commands.

Answers come in the player's language (see [Getting Started](./getting-started#6-languages)).

---

## Player command

### `/ksheirloom`

Opens the story window of the item in your hand. See [UI Pages](./ui-pages#the-story-window).

- With a story in hand, the window opens on the **Chronicle** tab.
- With an empty hand or an item without a story, it opens on the **Hall of fame**, the only tab that needs no story.
- A player whose `ks.heirlooms.user.open` is set to `false` gets "You are not allowed to do that."

---

## Admin commands

### `/ksheirloom admin`

Opens the admin window with the pages Overview, Rules, Titles, Boons and Item. See [UI Pages](./ui-pages#the-admin-window). The window closes itself if the admin permission is taken away while it is open.

### `/ksheirloom test [--level=<0-3>]`

Writes a made-up story onto the item in your hand, to check the tooltip and the window without playing for hours.

| Level | Fame | Count |
|-------|------|-------|
| `0` | New | 0 |
| `1` | Proven | 57 |
| `2` (default) | Famous | 348 |
| `3` | Legendary | 1,204 |

- Example: `/ksheirloom test --level=3`. Values outside 0 to 3 are moved to the nearest of them.
- A real story on the item is overwritten and leaves the hall of fame.
- Answers: "Sample story written (fame level 2). Hover over the item." / "Hold a weapon, a tool or a shield in your hand." / "This item cannot carry a story. Only items that never stack and wear down can."
- An item whose kind is switched off in the rules also gets "This item cannot carry a story".

### `/ksheirloom check`

Shows in chat what the item in your hand carries:

```
Story found: 348 counted, 2 owners, fame level 2, title wolfsbane, kind melee.
Durability 74 of 120.
Extra data on the item: 448 bytes.
```

- The fame level is a number: 0 New, 1 Proven, 2 Famous, 3 Legendary. The title is its id, `-` for none.
- Without a story: "This item has no story." For a broken item the second line reads "Durability 0 of 120, the item is broken."
- Items without durability, such as shields, skip the durability line.

### `/ksheirloom clear`

Removes the story from the item in your hand and takes it out of the hall of fame. Answers "Story removed." or "This item has no story." The item becomes an ordinary item again; a new story begins with its next count.

### `/ksheirloom wear`

Sets the durability of the item in your hand to 0, to test breaking and repairing. Answers "Durability set to 0. Repair the item now." Items without durability get "This item has no durability."

If the item carries a story, the break goes into its chronicle, and the repair does too once you repair the item.

### `/ksheirloom reload`

Reads `config.json` and the language files in `localization/` again. Answers "Heirlooms config and texts reloaded." From the server console the answer is in English.

Changes made in the admin window do not need a reload; they apply at once.

---

## `/kslang`

The language command shared by all KyuubiSoft mods. It has no permission.

| Command | What it does |
|---------|--------------|
| `/kslang` | Shows your current language and the available codes in chat |
| `/kslang <code>` | Sets your language, for example `/kslang de-DE` |
| `/kslang auto` | Follows your game language again |

It changes the window, chat and card texts. The tooltip always follows the game language.