Optional gameplay roles with stat modifiers, starter kits, and restrictions.

Character Classes

Classes are optional. A world with no classes plays exactly as it does today — every character can use everything. Author one or more and you get roles that shape what a character is good at and what they're allowed to touch.

Classes live in Database → Classes.

What a Class Defines

FieldEffect
Name / description / iconWhat players see when choosing
Selectable at creationWhether new characters can pick it (leave off for classes granted later)
Additive statsFlat bonuses (e.g. +5 attack, +20 max HP)
Multiplier statsPercentage modifiers (e.g. ×1.1 move speed)
Starter itemsThe kit a new character of this class begins with
Starter abilitiesAbilities granted on creation
Innate elementAn element applied to this class's attacks
Element / status ratesInnate resistances and vulnerabilities (id → multiplier, 1 = normal)
Sort orderWhere it appears in the list

Restrictions

Restrictions are the enforcement half, and every one of them is checked on the server at equip, use, and cast time — not just hidden in the UI:

RestrictionBlocks
Forbidden equip slotsEquipping anything into a slot (e.g. a monk who can't use an off-hand)
Forbidden weapon typesWielding those authored weapon types
Forbidden armor typesWearing those authored armor types
Forbidden item tagsUsing or equipping anything carrying the tag
Forbidden item idsSpecific items
Forbidden ability ids / tagsLearning or casting those abilities

A character with no class has no restrictions, so classes are purely additive to an existing world — you can introduce them without invalidating anyone's gear.

How a New Character Is Built

Three authored layers combine, in this order:

1. World defaults — the base stat line every character starts from, plus Characters → Starting Inventory and the world's starter abilities. 2. The template — its stats replace the world's for any stat it sets, and its starter items, abilities and starting currency are added on top. A stat the template leaves blank keeps the world value. 3. The classadditive stats apply first, then multiplier stats, so a class with +30 max HP and ×0.75 max HP reads as "thirty more, then three-quarters of the result" no matter which box you filled in first. Its starter items and abilities are added last.

Starter items from all three layers merge: the same item granted twice becomes one stack, capped at what a single stack can hold, so a world sword plus a class sword is one sword rather than two entries.

A character's stats are captured once, at first login, and saved to that character. Retuning a class afterwards changes new characters of that class — it does not silently rewrite anyone who has been levelling.

Gotchas

  • Don't grant what you forbid. A class that lists an ability in Starter abilities and in Forbidden ability ids hands the player a spell that then refuses to cast, with the hotbar slot looking perfectly normal. Same for starting gear whose weapon or armour type the class forbids — it lands in the bag and can never be worn. pnpm --filter @ed5-mmo-studio/db verify:seed fails on both.
  • Starter items only arrive if the character has no saved inventory — that is, on their very first login. Adding an item to a class later does not retroactively hand it to existing characters.
  • A template's starting currency replaces the world default rather than adding to it. Leave it at zero and the character gets the world's starting silver.
  • Innate element and rates come from the class, not the template — a class's element is the affinity the effectiveness matrix tests against when something hits that character.