> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rpg-leveling.zuxaw.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Create a Custom Class

> Step-by-step guide to overriding an existing class (e.g. Jedi with lightsaber) in RPG Leveling.

# How to Create a Custom Class

Classes are **templates**. For now you can only **override an existing class** - use one of the bundled class files as a template and replace its content with your theme (e.g. turn Edge into a Jedi class that boosts lightsabers). Adding a brand-new class file is not supported yet. This guide walks you through overriding.

## 1. Define weapon kinds (if using custom weapons)

If your class uses weapons from another mod (e.g. "Lightsaber"):

1. Open `mods/Zuxaw_RPGLeveling/Classes/ClassesGlobalConfig.json`.
2. Under **WeaponKinds**, add an entry: `"IncludedInId": "Lightsaber", "Icon": "YourMod_Lightsaber"` (use the item id your mod uses).
3. Save. The mod will now recognize that weapon kind for class bonuses.

## 2. Override an existing class JSON

Pick one of the **existing** class files to use as a template (e.g. `ClassEdge.json`). Edit that file in place - do not create a new filename; the mod only loads the default class list. Replace its content with your theme while keeping the same structure.

* **File:** `mods/Zuxaw_RPGLeveling/Classes/Class<Name>.json` - use an **existing** name (e.g. `ClassEdge.json`), not a new one.
* **Required fields:**
  * **Id** - Class id (e.g. `"Jedi"` for display; can match your theme).
  * **Icon** - Item ID for the class icon in the UI.
  * **Weapons** - Array of weapon kind ids (e.g. `["Lightsaber"]`). Must be in `ClassesGlobalConfig.json` → WeaponKinds.
  * **Tiers** - Array of 5 tiers (T0–T4). Each tier has **T**, **Innate** (stat bonuses per level), and **Dmg** (weapon damage % per level per weapon).
  * **Passives** - Array of passive ids from [PassivesConfig](passives-config). Use existing passives or add your own to `PassivesConfig.json`.

Copy the structure from another class file, then change `Id`, `Weapons`, `Icon`, `Passives`, and tune `Innate` and `Dmg` per tier to match your theme. Save as the **same** filename you started from (e.g. keep `ClassEdge.json`).

## 3. Set display name and description

Use **MessagesLanguageMapping** (see [Config Messages](config-messages)) to set the class name and description shown in the UI. Keys are class id lowercase (e.g. `jedi`). You can also localize or rename any passive names there.

## Summary

1. Add weapon kinds in `ClassesGlobalConfig.json` if using modded weapons.
2. **Override** an existing class file (e.g. `ClassEdge.json`) with your theme: same filename, new content (Id, Icon, Weapons, Tiers, Passives).
3. Override display names/descriptions in MessagesLanguageMapping.

For full field reference, see [Classes Configuration](classes-config) and [Passives Configuration](passives-config).
