---
name: set-character-classes
description: Reference for the 145 character classes in the Set World API, such as Knight, Highlander or Reaper, each bound to one mainhand weapon and described by a line of flavor prose. Use when listing or downloading the class table, reading the schema of a class row and of the class on a character, finding a character's class from its mainhand, or deciding what a class does in a game.
license: Free to use when obtained from set.world, commercially too (the API, what it returns, the skills and downloaded models). The source code of Set is © Jimmy Lee under CC BY-NC 4.0 and its commercial use needs a paid waiver.
metadata:
  version: "0.8.9"
  title: Classes
---

# Classes

Set has 145 classes, one for each mainhand in the tool table. A character's class is decided by the weapon it holds: a longsword makes a Knight, a broadsword a Highlander, a scythe a Reaper.

```sh
curl https://set.world/api/classes               # JSON
curl 'https://set.world/api/classes?format=csv'  # name,mainhand,flavor
```

## Schema

```ts
type CharacterClass = { name: string; flavor: string; mainhand: string };   // mainhand: a base type in the `tool` table
type ClassesResponse = { count: number; data: CharacterClass[] };
```

```json
{
  "count": 145,
  "data": [
    {
      "name": "Highlander",
      "flavor": "Let the Highlander keep counsel with the spirits of these shores, for where the dead speak and the living listen, the broadsword alone shall render judgment",
      "mainhand": "broadsword"
    },
    {
      "name": "Knight",
      "flavor": "Cast upon these shores with a code of honor unbroken, the Knight takes up the longsword that the law within might be upheld without",
      "mainhand": "longsword"
    }
  ]
}
```

Two of the 145 rows are shown. The table opens Highlander, Knight, Slave Knight, Berserker, Swordmaster, Reaper, Executioner, Corsair.

## Query one class

```sh
curl 'https://set.world/api/classes?mainhand=sword'      # the class bound to a mainhand
curl 'https://set.world/api/classes?name=Knight'         # one class by name
curl 'https://set.world/api/classes?q=shores'            # every class whose name, mainhand or description has the text
```

The first answers with the same shape, filtered ([API connection](https://set.world/skills/api-connection) owns the filters):

```json
{
  "count": 1,
  "data": [{ "name": "Adventurer", "flavor": "The Adventurer arrived upon these shores seeking a tale; what was found is a story that permits no departure", "mainhand": "sword" }]
}
```

`flavor` is the class's description, written in Set's in-world voice ([Text flavor](https://set.world/skills/text-flavor)).

## On a character

`/api/roll/character` returns `class` as one row of this table. It always equals the class bound to the gear in the mainhand:

```js
character.class.mainhand === character.equipment.tool.props[3].name;   // true
```

Every mainhand has the same weight, so each class is 1 in 145 of characters. `/api/tables/tool` lists each mainhand with its class ([Item properties](https://set.world/skills/item-properties)). If your game swaps a character's mainhand, look the new class up by `mainhand`.

## What a class does

In Set, a class is a name, a sentence and a weapon. It grants no stats, skills, abilities or restrictions. Never infer a rule from the flavor sentence. What a Knight can do that a Corsair cannot is your game's design. A hypothetical schema:

```ts
type ClassRule = { class: string; mainhand: string; abilities: string[]; statGrowth: Partial<StatBlock>; allowedSlots?: Slot[] };
// { class: 'Knight', mainhand: 'longsword', abilities: ['guard'], statGrowth: { strength: 1, vitality: 1 } }
```

In Set's own models the mainhand also decides the character's weapon model and attack ([Item models](https://set.world/skills/anima-item-models), [Animations](https://set.world/skills/anima-animations)).

Names are data: keep them exactly as returned ([Text flavor](https://set.world/skills/text-flavor)).
