> For the complete documentation index, see [llms.txt](https://visionstore.gitbook.io/visionstore-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://visionstore.gitbook.io/visionstore-docs/scripts/badges/guides/badge-studio.md).

# Badge Studio

The admin guide to the Badge Studio - design badges, place desks and manage the Registry in game.

Open it with **`/badgestudio`** (or the client export `OpenStudio`). Only admins can open it, and the server checks admin rights again for every action. **ESC** closes it and asks before throwing away unsaved changes. The header shows the detected framework and inventory.

The Studio has three tabs: **Badges**, **Desks** and **Registry**.

{% hint style="info" %}
**Studio changes reach every player at once, with no restart.** They are saved in the database and win over an entry with the same id in the config files.
{% endhint %}

## Source tags

Every badge and desk in the Studio shows where it comes from:

| Tag        | Source                                                               | Stored in                    |
| ---------- | -------------------------------------------------------------------- | ---------------------------- |
| **FILE**   | `config/badges.lua` / `config/desks.lua`, never edited in the Studio | The file                     |
| **STUDIO** | Created in the Studio                                                | The database only            |
| **EDITED** | A file entry that was saved in the Studio                            | The database, as an override |
| **OFF**    | Shown instead of the above while the entry is disabled               |                              |

* **Reset to file** deletes the override; the file version comes back.
* **File entries can't be deleted from the Studio.** Turn **Enabled** off and save, or remove the entry from the file and restart.

## Badges tab

**List (left).** Every badge type with its tag and how many were issued. The search box filters by id and name. **+ New badge** starts a new badge from the City Police preset.

**Live preview (centre).** The badge exactly as players see it, with sample data, your own headshot and the first number of its pool.

* **Open** / **Closed**: the wallet open (badge and ID card) or closed (foil stamp).
* **Show as revoked**: stamps the preview the way a revoked badge looks.

**Inspector (right).** Every field of the badge:

| Section                 | Fields                                                                                                                                      |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Identity                | Badge ID (new badges only), Department name, Short name, Enabled                                                                            |
| Texts                   | Code, Top ribbon, Bottom ribbon, Card title, Card fine print                                                                                |
| Look                    | Start from a preset + **Apply**, Shape, Centre, Logo file, Metal (six metals or **Custom** colour)                                          |
| Colours                 | The nine colours, each with a colour picker and a hex field                                                                                 |
| Who holds and issues it | Members (jobs or gangs, suggestions from your framework), Issuers (job or gang + grade rule), Issuer character IDs, Issuers must be on duty |
| Badge numbers           | Prefix, Digits, First number, Number pool                                                                                                   |
| Inventory item          | Item name (empty = shared item), Item label, Inventory image                                                                                |

What each field does: [Badge types](/visionstore-docs/scripts/badges/configuration/badges.md) and [Designs and logos](/visionstore-docs/scripts/badges/configuration/designs.md).

| Button                | What it does                                                                                                                            |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **Save** / **Create** | Saves to the database. Saving a FILE badge creates an override (EDITED).                                                                |
| **Duplicate**         | Starts a new badge from a copy (id `<id>_copy`, own number pool). Click **Create** to keep it.                                          |
| **Copy as Lua**       | Copies the badge as a `config/badges.lua` entry to the clipboard. Paste it inside `Config.Badges` to move a Studio badge into the file. |
| **Delete**            | Only for STUDIO badges.                                                                                                                 |
| **Reset to file**     | Only for EDITED badges.                                                                                                                 |

{% hint style="warning" %}
The **Badge ID** can't be changed after saving: issued badges point to it. When a badge type is deleted, its issued badges stay in the Registry, but their items show "This badge is damaged and cannot be shown." Creating a type with the same id again brings them back.
{% endhint %}

### Make a badge for your job

{% stepper %}
{% step %}

### Start

Click **+ New badge**. Type a **Badge ID** (letters, numbers and `_`), the **Department name** and a **Short name**.
{% endstep %}

{% step %}

### Pick a look

Choose a preset under **Start from a preset** and click **Apply**. Change the shape, centre symbol, metal and colours, or type a file from `web/logos/` in **Logo file**.
{% endstep %}

{% step %}

### Who holds it, who issues it

Add your job (or gang) under **Members**. Under **Issuers**, add the job and the grade rule (for example "Grade 3 and above").
{% endstep %}

{% step %}

### Numbers and save

Set a **Prefix** and **First number**, then click **Create**. Add the badge to a desk in the **Desks** tab.
{% endstep %}
{% endstepper %}

## Desks tab

| Control                        | What it does                                                                                                        |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| **+ Add desk here**            | Starts a new desk at your position (radius 1.0 m).                                                                  |
| Desk ID, Name                  | Id (new desks only) and label.                                                                                      |
| Position                       | X / Y / Z. **Move here** moves the desk to where you stand. **Teleport** takes you to the desk (closes the Studio). |
| Radius                         | 0.3 to 5.0 m.                                                                                                       |
| Enabled                        | Turn the desk off without deleting it.                                                                              |
| Badges issued here             | Click a badge to add or remove it.                                                                                  |
| Map blip                       | On / off, with sprite, colour and scale.                                                                            |
| **Save** / **Create**          | Saves to the database. The server reads your position itself when you save.                                         |
| **Delete** / **Reset to file** | Delete a STUDIO desk / drop the override of an EDITED file desk.                                                    |

## Registry tab

The Registry lists every badge ever issued, newest first, 25 per page. One search field matches all of these at once (press **Enter** or click **Search**):

| You type                      | Matches                                                               |
| ----------------------------- | --------------------------------------------------------------------- |
| A serial (`1042` or `001042`) | That serial exactly                                                   |
| A badge number (`LSPD-10`)    | Badge numbers containing the text                                     |
| A character ID                | That ID exactly (the stored identifier or the ID printed on the card) |
| A name (`Morgan`)             | Names containing the text                                             |

The drop-down next to it filters by badge type. Click a row to open the badge with its photo, the character ID, the issuer and its current status.

| Button                        | What it does                                           |
| ----------------------------- | ------------------------------------------------------ |
| **Revoke**                    | Voids this badge.                                      |
| **Revoke all of this person** | Voids every valid badge of that person, of every type. |

A revoked badge stays in the Registry with "Revoked by `<name>` on `<date>`". The holder can still show the item, but it's stamped **REVOKED** for everyone who sees it.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://visionstore.gitbook.io/visionstore-docs/scripts/badges/guides/badge-studio.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
