> For the complete documentation index, see [llms.txt](https://docs.sparkframework.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sparkframework.dev/documentation/user-guide/plugins/classes.md).

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