# Admin Window

# Admin Window

Since version 3.1.0 one admin window in the KyuubiSoft "Goldfiligran" look replaces the old admin panel. Everything you change is a **draft** until you press **Save**.

:::note
The admin window is new in 3.1.0 and has not been tested in game yet.
:::

## Opening the window

| Way in | Notes |
|--------|-------|
| `/ksachievementadmin panel` (`/acadmin panel`) | Player only |
| The Achievements tile in the KyuubiSoft hub `/ksadmin` | The hub itself needs `ks.admin` |
| The NPC `showcase_achievements` | |

Every way in, and every save or player action, needs **`ks.achievements.admin`**. On a showcase server visitors can browse the window read-only. Player data stays hidden from them: the Players tab shows "Player data is hidden", also for visitors who hold the admin right. See [Permissions](./permissions).

---

## Layout

- **Navigation** in three groups:
  - **Content:** Achievements, Categories, Titles, Lootbags
  - **Players:** Players, Statistics
  - **Settings:** Display & titles, Notifications, Tracking, Points & book, General
- **Global search** over achievements, categories, titles, players and settings, with a jump to the result.
- **Footer** with the draft: the list of changes (each one can be reverted on its own), **Discard** and **Save**.

---

## Saving

- **Errors block saving** and open the check view with **Go to**. Warnings do not block.
- Every save makes a **backup set** (the last 20 are kept), writes the files atomically and rolls back if something fails. Then the content reloads and the change applies at once.
- If another admin changed the **same** entry in the meantime, the window asks "Save anyway?". Other changes are merged.
- **Undo last save** (in General) loads the previous state as a new draft.
- Saving runs in the background, so the world does not stall.

---

## Achievements

### List

- Chains are one row.
- Filters by category, trigger, source (standard / custom) and status, search by id and name, paging.
- **New** from a template (mining chain, monster hunt, play time, collect items, secret / admin only, empty) or as a copy with a free id.
- **Add stage** appends the next stage to a chain.

### Editing standard achievements

You can edit the shipped achievements directly. The change is stored as an **override with the same id** in the custom files, so players keep their progress and titles. **Reset to default** removes the override. Custom achievements are written back to their own file. Unknown keys and comments in the files are kept.

### Editor

- **Basics** with the points it gives (live).
- **Texts per language:** a missing language shows the fallback in grey and is never saved.
- **Trigger** from a catalog with a matching target picker. Triggers that are easy to abuse are marked, and the check view warns when such a trigger gives rewards.
- **Prerequisites** with navigation along the chain.
- **Title**, with "also used by" when other achievements give the same title.
- **Rewards:** item (with the item picker), lootbag (shows its contents), MMO skill XP (from the integration) and command (with executor). Command rewards that run as the console need `ks.core.admin.dialog.console`; see [Permissions](./permissions#command-rewards-that-run-as-the-console).
- **Preview** of the book row and an **impact preview** ("unlocks at once for N online players").
- **References** before deleting or renaming: other achievements, Quests and Core dialogs that use the id.
- **Rename with "keep progress"** moves the player data to the new id, for offline players at their next login.

### Check view

Errors, warnings and hints, each with **Go to**. Examples: duplicate ids, missing prerequisites or cycles, unknown items, lootbags or skills, an id equal to a trigger type, `skill_level` targets that never fire (only the milestones 10, 25, 50, 75 and 100, and `total:` 100, 500, 1000, 1500, 2000 and 2300 are sent), abuse-prone triggers with rewards.

### Disabling achievements

A **disabled** achievement is not shown, counted or tracked. Player data stays. A prerequisite on a disabled achievement counts as fulfilled. The list is stored as `disabledAchievements` in `config.json`.

---

## Categories

Name per language, icon, order in the book, create, rename (the achievements follow) and delete when a category is empty. Stored as `categoryOrder` and `categoryIcons` in `config.json`.

## Titles

All titles with their colour, the achievements that grant them, how many players unlocked them and who wears them now. Title ids that several achievements share are marked.

## Lootbags

Shows the lootbag rewards of this mod. With the KyuubiSoft Lootbags mod installed, the link opens that mod's admin window (it needs `ks.lootbag.admin`). See [Lootbags](./lootbags).

---

## Players tool

For **online and offline** players: unlocked achievements, progress, points, waiting rewards, history and the active title.

| Action | Notes |
|--------|-------|
| Unlock | With or without rewards, points and follow-up events (default: with, as before) |
| Revoke | Shows the dependent achievements first |
| Reset | Sets one achievement of the player back to the start |
| Set progress | For one achievement |
| Points ± | Add or remove achievement points |
| Deliver / remove a waiting reward | |
| Set / remove title | |

- Actions for offline players are **queued** and run once at their next login.
- Every action is logged with a reason and can be reverted.
- `/acadmin grant` and `revoke` use the same tool.

## Statistics

Rarest and never reached achievements, server firsts, achievements that cannot count on this server, top points and waiting rewards. Rows open the editor or the player. The player scan runs when you start it.

---

## Settings

Five pages for the options of `config.json`:

| Page | Contains |
|------|----------|
| **Display & titles** | Title display in chat and on nameplates, group prefixes (all reachable; the LuckPerms import adds only missing groups) |
| **Notifications** | Unlock notification mode, duration, broadcast, reward hint |
| **Tracking** | Tracking switches, save interval, creative mode |
| **Points & book** | Points per difficulty (with a note that points are a shop currency), book options |
| **General** | Content switches with counts, backups, **Undo last save**, a button to `/kssettings` |

The server language is set in KyuubiSoft Core's settings window (`/kssettings`), not here. Options that are never read stay untouched in the file and are not shown. See [Configuration](./configuration).