Skip to main content

Classes Configuration

Classes are templates: you can edit the bundled configs or override them. Each class has tiers (T0–T4), innate stat bonuses per tier, weapon damage bonuses per weapon kind, and a list of passives. When you use a weapon that matches one of the class’s weapon kinds, you get the class’s damage bonus and passives for that weapon; innate bonuses apply whenever you have that class selected.

How class bonuses apply

  • Weapon kinds — In ClassesGlobalConfig.json, WeaponKinds defines which weapons the mod recognizes. Each kind has an IncludedInId string (a part of the id is enough: e.g. "Wand" matches any item id containing “Wand”). When you hold or use a weapon, the mod checks whether the weapon’s item id (case-insensitive) contains that string. If it does, the weapon is treated as that kind.
  • Class weapons — Each class lists weapon kind ids in its Weapons array and in each tier’s Dmg object. Only weapons that match one of those kinds get the class’s damage bonus (percentage per level). Innate bonuses (health, defense, etc.) apply for the class regardless of weapon.
  • Passives — Class passives trigger in combat (damage dealt, damage taken, on kill) when you have that class selected; they are not tied to a specific weapon, but playing with that class’s weapons is how you tier up and unlock more.
To give a class bonuses for a modded weapon (e.g. from another mod), register the weapon in WeaponKinds and add its id to the class’s Weapons and Dmg. Step-by-step: Add Modded Weapons to a Class.

Config checklist

  • Weapon kinds — Every weapon id you use in a class’s Weapons and Dmg must exist in ClassesGlobalConfig.jsonWeaponKinds (with IncludedInId and Icon).
  • All five tiers — Each class file must have exactly 5 tier objects (T0–T4). Each tier must have T, Innate, and Dmg; Dmg keys must match the Weapons array.
  • Passives — Every id in a class’s Passives array must exist in PassivesConfig.json.
  • Reload — After editing, use /lvl reload or restart the server so the mod picks up changes.

Config location

  • Class files: mods/Zuxaw_RPGLeveling/Classes/Class<Name>.json (e.g. ClassHeavy.json)
  • Global class list: ClassesGlobalConfig.json in the same folder (enables/disables classes, weapon kinds, tier progression)
  • Display names: All class names and descriptions are overridable via MessagesLanguageMapping so you can localize or rename without editing class JSON

Class JSON structure

Each class file contains:
FieldDescription
IdUnique class id (e.g. "Heavy"). Used in code and config references.
IconItem ID used as the class icon in the UI (e.g. "Weapon_Battleaxe_Doomed").
WeaponsArray of weapon kind ids this class gets damage bonuses for (e.g. ["Axe", "Battleaxe"]). Must match entries in ClassesGlobalConfig.jsonWeaponKinds.
TiersArray of tier definitions (T0–T4). Each tier has T, Innate (stat bonuses per level), and Dmg (weapon damage % per level per weapon).
PassivesArray of passive ids (e.g. ["HighGuard", "ThickSkin", "Overkill"]). Must exist in PassivesConfig.json.

Innate and Dmg

  • Innate — Stat bonuses that scale with your player level. Keys are stat names (e.g. Health, Stamina, Defense, MovementSpeed, ManaRegenSpeed). Values are per-level rates (e.g. 0.35 = 0.35% per level, or as defined by the mod).
  • Dmg — Per-weapon damage bonus per level. Keys are weapon kind ids; values are percentage per level (e.g. 1 = 1% per level).

Adding or removing classes

  • To add a class: create a new Class<YourClass>.json and add its filename to the default class list in the mod (or ensure your config loader includes it).
  • To disable a class: remove it from the list of loaded class files in ClassesGlobalConfig.json / the mod’s class list, or omit its file.
  • To override a class: replace or edit the corresponding Class<Name>.json; you can change weapons, passives, and all tier values.

Full class JSON example

Below is a complete Heavy class file. Every class file follows this shape: Id, Icon, Weapons, Tiers (with T, Innate, Dmg per tier), and Passives.
{
  "Version": "0.3.0",
  "Id": "Heavy",
  "Icon": "Weapon_Battleaxe_Doomed",
  "Weapons": ["Axe", "Battleaxe"],
  "Tiers": [
    {
      "T": 0,
      "Innate": {
        "Health": 1.5,
        "Stamina": 0.35,
        "StaminaConsumption": 0.12,
        "Defense": 0.35,
        "MovementSpeed": 0.06
      },
      "Dmg": { "Axe": 1.0, "Battleaxe": 1.0 }
    },
    {
      "T": 1,
      "Innate": {
        "Health": 1.75,
        "Stamina": 0.42,
        "StaminaConsumption": 0.16,
        "Defense": 0.42,
        "MovementSpeed": 0.075
      },
      "Dmg": { "Axe": 2.0, "Battleaxe": 2.0 }
    },
    {
      "T": 2,
      "Innate": {
        "Health": 2.0,
        "Stamina": 0.5,
        "StaminaConsumption": 0.2,
        "Defense": 0.5,
        "MovementSpeed": 0.09
      },
      "Dmg": { "Axe": 3.0, "Battleaxe": 3.0 }
    },
    {
      "T": 3,
      "Innate": {
        "Health": 2.25,
        "Stamina": 0.58,
        "StaminaConsumption": 0.24,
        "Defense": 0.58,
        "MovementSpeed": 0.105
      },
      "Dmg": { "Axe": 4.0, "Battleaxe": 4.0 }
    },
    {
      "T": 4,
      "Innate": {
        "Health": 2.5,
        "Stamina": 0.65,
        "StaminaConsumption": 0.28,
        "Defense": 0.65,
        "MovementSpeed": 0.12
      },
      "Dmg": { "Axe": 5.0, "Battleaxe": 5.0 }
    }
  ],
  "Passives": ["HighGuard", "ThickSkin", "Overkill"]
}
  • Innate keys can include: Health, Stamina, StaminaConsumption, Defense, MovementSpeed, ManaRegenSpeed, etc. Values are per-level rates (e.g. 1.5 = 1.5% per level for Health).
  • Dmg keys must match the class Weapons array; values are damage % per level for that weapon.
  • Passives ids must exist in PassivesConfig.json.

Minimal class JSON example

If you override an existing class and only want to change a few things, you still need all five tiers (T0–T4). Here is a minimal structure; adjust numbers and passive ids as needed.
{
  "Version": "0.3.0",
  "Id": "Edge",
  "Icon": "Weapon_Longsword_Mithril",
  "Weapons": ["Longsword", "Sword"],
  "Tiers": [
    { "T": 0, "Innate": { "Defense": 0.2 }, "Dmg": { "Longsword": 0.5, "Sword": 1.0 } },
    { "T": 1, "Innate": { "Defense": 0.3 }, "Dmg": { "Longsword": 1.0, "Sword": 1.5 } },
    { "T": 2, "Innate": { "Defense": 0.4 }, "Dmg": { "Longsword": 1.5, "Sword": 2.0 } },
    { "T": 3, "Innate": { "Defense": 0.5 }, "Dmg": { "Longsword": 2.0, "Sword": 2.5 } },
    { "T": 4, "Innate": { "Defense": 0.6 }, "Dmg": { "Longsword": 2.5, "Sword": 3.0 } }
  ],
  "Passives": ["DuelFocus", "Unscathed", "Riposte"]
}

ClassesGlobalConfig.json example

Global class settings live in the same Classes/ folder. WeaponKinds defines which weapon ids can be used in class Weapons and Dmg; TierProgression defines how players advance from T0 to T4 (by level range and kills).
{
  "Version": "0.3.0",
  "EnableClasses": true,
  "TierProgression": [
    { "From": 0, "To": 1, "LvlMin": 1, "LvlMax": 25, "Kills": 75 },
    { "From": 1, "To": 2, "LvlMin": 25, "LvlMax": 50, "Kills": 150 },
    { "From": 2, "To": 3, "LvlMin": 50, "LvlMax": 75, "Kills": 250 },
    { "From": 3, "To": 4, "LvlMin": 75, "LvlMax": 100, "Kills": 300 }
  ],
  "WeaponKinds": [
    { "IncludedInId": "Battleaxe", "Icon": "Weapon_Battleaxe_Doomed" },
    { "IncludedInId": "Axe", "Icon": "Weapon_Axe_Adamantite" },
    { "IncludedInId": "Longsword", "Icon": "Weapon_Longsword_Mithril" },
    { "IncludedInId": "Staff", "Icon": "Weapon_Staff_Crystal_Flame" }
  ]
}
  • IncludedInId — A substring that the weapon’s item id must contain (case-insensitive). You do not need the full item id: a part is enough to define a whole kind. Example: "Wand" matches any weapon whose id contains “Wand” (e.g. Weapon_Wand_Wood, Weapon_Wand_Crystal_Flame). Example: "Lightsaber" matches StarWarsMod_Weapon_Lightsaber_Blue. This value is the id you use in class Weapons and Dmg.
  • Icon — Item ID used in the UI for this weapon kind (e.g. the mod’s weapon item id).

Custom weapons (modded weapons)

To give a class bonuses, add the weapon kind id to the class’s Weapons array and to its Dmg entries per tier so the class gets bonuses when using that weapon. To give a class bonuses for a modded weapon: (1) Register the kind in WeaponKinds with IncludedInId and Icon. (2) Add that id to the class Weapons array and to every tier’s Dmg. Full step-by-step: Add Modded Weapons to a Class.