> For the complete documentation index, see [llms.txt](https://cylexdev.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cylexdev.gitbook.io/docs/cylex_mdt/features/department-tools.md).

# Department Tools

Configure and use the admin toolkit: tags, incident templates, penal code, radio codes, uniforms, weapon records, analytics, and the immutable audit log.

Department Tools is the administrative backbone of Cylex MDT. These pages let you build and maintain the reference data your officers use every day — from the penal code that drives charge calculations in reports to the audit log that records every action anyone takes in the MDT. Most tools are accessible to any officer with the appropriate rank permission, and a few (Analytics, Logs) are restricted to supervisors or bosses by default.

<details>

<summary>Tags</summary>

Tags are reusable colored labels you attach to incidents, citizen profiles, and vehicle records. They give officers a fast visual way to identify and filter records — for example, mark a citizen as **Dangerous**, flag a vehicle as **Stolen**, or label an incident as **Drug Related**.

#### Creating a tag <a href="#id-0da681ad-9bbc-4109-a61f-bbc2c8330d2f" id="id-0da681ad-9bbc-4109-a61f-bbc2c8330d2f"></a>

Navigate to **Tags** in the sidebar. Click **Create Tag** and fill in:

* **Tag Name** — for example, `Dangerous`, `Drug Dealer`, `Stolen`, or `Repaired`.
* **Color** — pick from the preset palette or enter a hex code for a custom color.
* **Description** — a short note explaining when to use the tag (shown in the tag picker when officers search for it).

Click **Create** to save. The tag is immediately available in the tag picker across the Incidents, Citizens, and Vehicles pages.

#### Using tags <a href="#id-085e89e1-7f69-4803-9b33-d1392bdebd43" id="id-085e89e1-7f69-4803-9b33-d1392bdebd43"></a>

On any incident report, citizen profile, or vehicle record, click **Add Tag** to search for and apply tags. You can apply multiple tags to a single record. Tags appear as colored badges and can be used as filters on the Incidents, Citizens, and Vehicles list pages to narrow results instantly.

#### Editing and deleting tags <a href="#c209b7a3-1ad1-493e-9ee8-d5049d5dc446" id="c209b7a3-1ad1-493e-9ee8-d5049d5dc446"></a>

Click any tag in the Tags list to open the edit form. Update the name, color, or description and click **Update**. To remove a tag permanently, click **Delete Tag** — this cannot be undone, and the tag will be removed from every record it was applied to.

{% hint style="info" %}
Deleting a tag removes it from all records it was attached to. Review its usage before deleting.
{% endhint %}

</details>

<details>

<summary>Templates</summary>

Templates are saved incident description blocks you can apply to a new report with one click. Instead of typing out a standard traffic stop description from scratch every time, create a template once and reuse it.

#### Creating a template <a href="#dccd1865-4535-4f58-9e85-7c3dc265fe24" id="dccd1865-4535-4f58-9e85-7c3dc265fe24"></a>

Navigate to **Templates** in the sidebar. Click **Create Template** and:

1. Enter a **Template Name** — for example, `Traffic Stop Report` or `Domestic Disturbance`.
2. Write the template content using the rich-text editor. The toolbar supports:
   * **Bold**, *Italic*, Underline, Strikethrough
   * Heading 1, Heading 2, Heading 3, Normal text
   * Bullet list, Numbered list
   * Align Left, Align Center, Align Right
   * Clear formatting
3. Optionally **Mark as default** — a default template auto-fills the incident description field every time a new report is created.

Click **Create** to save.

#### Applying a template <a href="#id-9da2b74a-c56f-4331-9a6e-e1878187b6d3" id="id-9da2b74a-c56f-4331-9a6e-e1878187b6d3"></a>

Inside a new or existing incident report, click the template selector in the description field. Choose a template from the list and its content fills the description immediately. You can edit the filled content before submitting the report.

Mark your most-used template as default to save officers a click on every new report. Only one template can be the default at a time.

#### Removing the default flag <a href="#id-3ebaa3e0-47d5-4bc3-97a4-a8ee46441181" id="id-3ebaa3e0-47d5-4bc3-97a4-a8ee46441181"></a>

To unset the default template, open the template and click **Remove default**. The description field will no longer auto-fill when a new report opens.

</details>

<details>

<summary>Charges / penal code</summary>

The Charges page is your department's full editable penal code. Every charge you define here is available in the incident report builder, where selecting charges automatically calculates the total fine, jail sentence, community service, and warrant time for each suspect.

#### Categories <a href="#id-29e727e0-2a1b-4d7a-a7be-a52552f983ff" id="id-29e727e0-2a1b-4d7a-a7be-a52552f983ff"></a>

Charges are organized into categories. The default categories come from `editable/config.lua`:

```lua
Config.ChargeCategories = {
    'Violent Crimes',
    'Property Crimes',
    'Drug Offenses',
    'White Collar',
    'Traffic',
    'Weapons',
    'Other',
}
```

You can add custom categories directly from the Charges page by clicking **Add Category** and entering a name.

#### Felony classes <a href="#d485e7f3-e925-4c22-85bf-e7ed9691b7e8" id="d485e7f3-e925-4c22-85bf-e7ed9691b7e8"></a>

Each charge is assigned a felony class that describes its severity. The available classes are also configured in `editable/config.lua`:

```lua
Config.FelonyClasses = {
    'Infraction',
    'Misdemeanor',
    'Class C Felony',
    'Class B Felony',
    'Class A Felony',
}
```

#### Adding a charge <a href="#id-35046bb4-5eeb-419f-871a-e086268c8c2a" id="id-35046bb4-5eeb-419f-871a-e086268c8c2a"></a>

Click **New Charge** inside any category tab and fill in:

| Field                 | Description                                 |
| --------------------- | ------------------------------------------- |
| **Charge Name**       | Display name, e.g. `Armed Robbery`          |
| **Category**          | The category this charge belongs to         |
| **Felony Class**      | Severity from Infraction to Class A Felony  |
| **Default Fine**      | Base fine amount in `$` (max `$10,000,000`) |
| **Default Sentence**  | Base jail sentence in months (max `9,999`)  |
| **Community Service** | Default community service hours             |
| **Warrant Time**      | Hours the resulting warrant stays active    |

{% hint style="info" %}
Setting **Warrant Time** to `0` creates an unlimited warrant. The warrant will remain active until an officer manually resolves it, regardless of the `Config.WarrantDecayOffline` setting.
{% endhint %}

#### How charges drive report auto-calculation <a href="#id-6e00062a-b66b-458a-9dd2-7f46a01fecee" id="id-6e00062a-b66b-458a-9dd2-7f46a01fecee"></a>

When you add charges to a suspect in an incident report, the MDT sums all default fines, sentences, community service hours, and warrant times across every selected charge and displays the totals at the bottom of the suspect block. Officers can adjust individual values before submitting if the circumstances warrant a deviation from the defaults.

</details>

<details>

<summary>Radio codes</summary>

The Radio Codes page stores your department's 10-code reference list. Officers can open this page mid-shift to look up the meaning of any code used over the radio.

#### Adding a code <a href="#id-7a64f357-439c-412c-8e4d-77f46da43dc5" id="id-7a64f357-439c-412c-8e4d-77f46da43dc5"></a>

Click **Add Code** and fill in:

* **Code Number** — the code itself, e.g. `10-41`.
* **Description** — a short explanation, e.g. `Starting shift`.

Click **Save** to add it to the list. Codes are displayed in a table sorted by code number and are searchable by code or description.

#### Editing and deleting codes <a href="#d3022327-8492-4217-9c6d-52a1ca94906e" id="d3022327-8492-4217-9c6d-52a1ca94906e"></a>

Click the edit icon on any row to update the code number or description. Click the delete icon to remove a code — a confirmation dialog appears before deletion.

#### Department scoping <a href="#id-043fdca7-4d24-48d3-b303-dde58fc848e9" id="id-043fdca7-4d24-48d3-b303-dde58fc848e9"></a>

When `Config.DepartmentScopedData` is `true`, each department manages its own set of radio codes. Officers only see the codes belonging to their department.

```lua
-- editable/config.lua
Config.DepartmentScopedData = true
```

</details>

<details>

<summary>Uniforms</summary>

The Uniforms page gives every officer a quick in-game reference for the clothing slot codes that make up each rank's uniform. Instead of searching Discord or asking a supervisor, officers open this page, select their rank, and copy the slot codes directly.

#### How it works <a href="#c5785922-ea85-42bf-b2d3-7d3fc9ee1a53" id="c5785922-ea85-42bf-b2d3-7d3fc9ee1a53"></a>

The left panel lists all ranks for your department. Click a rank to load its uniform on the right. The detail panel shows:

* A **preview photo** of the uniform (added via URL when configuring the rank).
* A code list organized by clothing slot:

| Slot             | Category      |
| ---------------- | ------------- |
| Tops & Jackets   | `torso`       |
| Undershirt       | `undershirt`  |
| Legs             | `legs`        |
| Shoes            | `shoes`       |
| Hats & Helmets   | `hats`        |
| Glasses          | `glasses`     |
| Masks            | `masks`       |
| Decals           | `decals`      |
| Scarves & Chains | `accessories` |
| Hands & Arms     | `hands`       |

#### Male and female variants <a href="#a175bb24-f57c-4e9f-aa9e-ddb7bd639c9a" id="a175bb24-f57c-4e9f-aa9e-ddb7bd639c9a"></a>

Use the **Male** / **Female** tab at the top of the detail panel to switch between gender variants. Each variant stores its own set of slot codes, so you can configure different codes for each.

#### Editing uniform codes <a href="#id-4ab1304e-9cff-47f5-929b-93231be35fc3" id="id-4ab1304e-9cff-47f5-929b-93231be35fc3"></a>

Click **Edit Codes** to enter edit mode for the selected rank. Update any slot code and click **Save Codes** when done. Add a preview photo URL in the photo field and it appears above the code list for every officer who views this rank.

{% hint style="info" %}
Officers can press and hold **J** (configurable via `Config.UniformPopupKey`) to open a floating uniform popup overlay in-game without opening the full MDT.
{% endhint %}

</details>

<details>

<summary>Weapons</summary>

The Weapons page is a department-wide log of every weapon confiscated from or issued to a citizen by an officer. It provides a searchable record you can reference when investigating cases or verifying ownership.

#### Weapon records <a href="#id-9cc1fa1d-569a-49f9-84cf-6a41e355d00a" id="id-9cc1fa1d-569a-49f9-84cf-6a41e355d00a"></a>

Each record contains:

| Field         | Description                                             |
| ------------- | ------------------------------------------------------- |
| **Type**      | Confiscated or Given                                    |
| **Weapon**    | The weapon model, e.g. `Pistol`, `Assault Rifle`        |
| **Serial No** | A manually entered serial number, e.g. `A1B2-C3D4-E5F6` |
| **Owner**     | The citizen the weapon was taken from or given to       |
| **Officer**   | The officer who logged the record                       |
| **Date**      | When the record was created                             |

Action types are color-coded: **Taken** (confiscated) appears in red and **Given** (issued) appears in green.

#### Adding a record <a href="#da69cd56-0294-4e12-8c73-963b2afa9634" id="da69cd56-0294-4e12-8c73-963b2afa9634"></a>

Click **Add Weapon** and fill in the action type, weapon model, serial number, owner citizen (search by name), and an optional note about the circumstances. Click **Save**.

#### Searching records <a href="#id-81d4743e-65e7-4723-9a0e-808793fb8f38" id="id-81d4743e-65e7-4723-9a0e-808793fb8f38"></a>

Use the search bar to filter by serial number, weapon model, or owner name. Use the **All / Confiscated / Given** filter tabs to narrow by action type.

#### Weapons available for logging <a href="#ed954f95-7a8d-4e9d-9974-c408c07bb56d" id="ed954f95-7a8d-4e9d-9974-c408c07bb56d"></a>

The weapon models available in the dropdown are defined in `editable/config.lua` under `Config.Weapons`. The list covers pistols, SMGs, rifles, shotguns, snipers, and melee weapons. Add or remove entries from that list to control which weapons appear in the dropdown.

</details>

<details>

<summary>Analytics</summary>

Analytics gives bosses and supervisors a department-wide statistics dashboard. Charts animate in when the page loads and reflect all historical MDT data for your department.

#### What you can see <a href="#f30f98ee-c342-4419-8e0a-6d2b4ff86309" id="f30f98ee-c342-4419-8e0a-6d2b4ff86309"></a>

* **Incidents per day** — a time-series chart showing report volume over time
* **Top charges** — the most frequently applied charges across all incident reports
* **Most active officers** — ranked by number of reports created or assigned
* **Evidence flow** — evidence items logged across cases over time

#### Enabling analytics <a href="#id-9a998fc9-4b39-487c-b7f5-b2f424c7cb5f" id="id-9a998fc9-4b39-487c-b7f5-b2f424c7cb5f"></a>

Analytics is enabled via `Config.EnabledPages` in `editable/config.lua`:

```lua
Config.EnabledPages = {
    ['analytics'] = true,   -- Department statistics dashboard (boss/supervisor)
}
```

Set it to `false` to hide the Analytics page from the sidebar entirely.

{% hint style="info" %}
Access to the Analytics page is controlled by your rank permissions. By default it is restricted to boss and supervisor ranks. Adjust this in the Permissions Manager.
{% endhint %}

</details>

<details>

<summary>Logs</summary>

The Logs page is an immutable audit trail of every action taken inside the MDT. Every create, edit, delete, view, login, and logout event is recorded automatically — nothing is ever missed, and no log entry can be deleted.

#### What gets logged <a href="#id-47dfd7ef-dc43-4b7a-8ab3-1a5fb8f8b127" id="id-47dfd7ef-dc43-4b7a-8ab3-1a5fb8f8b127"></a>

Every action across all MDT pages generates a log entry. Categories include:

| Category   | Examples                                   |
| ---------- | ------------------------------------------ |
| `Incident` | Report created, edited, deleted, viewed    |
| `Evidence` | Evidence record created, uploaded          |
| `BOLO`     | BOLO issued, closed                        |
| `Citizen`  | Profile viewed, note added, status changed |
| `Officer`  | Profile updated, roster edited             |
| `Charge`   | Charge created, edited, deleted            |
| `FTO`      | FTO report created or updated              |
| `Vehicle`  | Vehicle record viewed or edited            |
| `System`   | Login, logout                              |

#### Log entry format <a href="#a71980eb-6b4f-4056-b5b3-5f00f0452b0b" id="a71980eb-6b4f-4056-b5b3-5f00f0452b0b"></a>

Each entry records the officer's name, the action type, the target record (with its identifier), and a precise timestamp. Example entries:

* `Officer Martinez created Incident — Incident #4421`
* `Sgt. Rodriguez deleted Evidence — Evidence #87`
* `Chief Morrison logged into MDT system`

#### Filtering logs <a href="#id-7d8d1c92-67a1-4c6c-bf41-ce08e20cb9b1" id="id-7d8d1c92-67a1-4c6c-bf41-ce08e20cb9b1"></a>

Use the filter tabs to narrow the log to a specific action category: **All**, **Created**, **Edited**, **Deleted**, **Flagged**, or **System**. Use the search bar to find entries by officer name or record name.

{% hint style="info" %}
Log entries cannot be deleted. This is by design — the log is your department's permanent accountability record. If you need to restrict who can *view* the logs, adjust the Logs page permission in the Permissions Manager.
{% endhint %}

</details>
