# Classes

The Classes plugin lets you define character classes and assign them to characters. Characters can have one main class and multiple secondary classes.

## Creating a Class Entry

Open the Spark Editor, go to **Classes** and click **Create New**.

Each class entry uses the standard database entry fields:

| Field        | Description                                                   |
| ------------ | ------------------------------------------------------------- |
| Display Name | Class name shown in-game (e.g., "Warrior", "Mage", "Ranger"). |
| Description  | Class description text.                                       |
| Icon         | Sprite for the class in UI.                                   |

Classes are primarily used as identifiers that other systems reference through requirements. For example, you can gate abilities behind a class requirement, restrict equipment to specific classes, or unlock quest content based on the player's class.

## Main Class vs. Secondary Classes

Each character has one **main class** and can have any number of **secondary classes**. This supports systems like multi-classing or specializations.

Classes can also be **unlocked** separately from being assigned. Unlocked classes are available for the player to choose from, while assigned classes are actively applied to the character.

## Class-Related Triggers

| Trigger             | Description                                                                                                           |
| ------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Add Secondary Class | Adds or removes a secondary class from the character. Configure the class entry and whether to remove instead of add. |

## Class-Related Requirements

| Requirement         | Description                                                              |
| ------------------- | ------------------------------------------------------------------------ |
| Has Class           | Checks if the character has a specific class (either main or secondary). |
| Has Secondary Class | Checks if the character has a specific class as a secondary class.       |
| Main Class          | Checks if the character's main class is a specific class.                |

## Use Cases

Classes are commonly used to restrict abilities (e.g., only Warriors can use "Shield Bash"), gate equipment (e.g., heavy armor requires Warrior class), provide class-specific quests, and define progression paths. Combined with the Requirements system, classes become a powerful tool for gating content throughout your game.


---

# 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://docs.sparkframework.dev/documentation/user-guide/plugins/classes.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.
