---
name: set-item-properties
description: Reference for the properties of a Set item and the 19 weighted tables it is rolled from. Use when loading the whole item catalog in one call (every base type per slot, every material and grade, every quality, prefix and suffix, tagged with the content version), reading or composing an item's roll vector or index vector, or reading the schema of the table endpoints.
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: Item properties
---

# Item properties

An item is one roll against 19 weighted tables. Its properties are the entries those rolls select:

```text
name = "{quality} {prefix} {material} {gear} of the {suffix}"      parts named "-" are left out
```

This skill owns the tables' structure and the two vectors (`roll`, `indexes`). Each table's meaning has its own skill: [Prefixes](https://set.world/skills/item-prefixes), [Suffixes](https://set.world/skills/item-suffixes), [Materials](https://set.world/skills/item-materials), [Slots](https://set.world/skills/equipment-slots).

## The catalog in one call

```sh
curl https://set.world/api/tables                  # every table with every entry, tagged with contentVersion
curl 'https://set.world/api/tables?format=csv'     # the same, one row per entry
curl https://set.world/api/tables/tool             # one table, by name or by index 0..18
curl 'https://set.world/api/tables/8?format=csv'
curl 'https://set.world/api/tables/prefix?name=burning'   # one entry by name; index= and q= filter too
```

`/api/tables` is the whole item catalog: every base type (gear) per slot, every material with its grade, and every quality, prefix and suffix. Load it once per `contentVersion` and cache it.

```ts
type TableRole = 'quality' | 'prefix' | 'material' | 'slot' | 'gear' | 'suffix';

type TableEntry = {
  index: number;                   // the value that appears in an item's `indexes`
  name: string;                    // "-" means no word
  weight: number;                  // a higher weight is likelier
  probability: number;             // weight / totalWeight
  rollFrom: number | null;         // the inclusive range of raw `roll` values that select this entry
  rollTo: number | null;
  grade?: Grade;                   // material tables
  tier?: number;                   // material tables, 1..7
  materialRank?: number;           // material tables, 1 most common
  class?: string | null;           // the `tool` table: the class bound to that mainhand
  gearTable?: number;              // the `slot` table: the index of that slot's gear table
  materialTable?: number;          // the `slot` table: 2 (wearables) or 3 (tools)
};

type Table = {
  index: number;                   // 0..18, the position in `roll` and `indexes`
  name: string;
  role: TableRole;
  slot?: string;                   // gear tables: the slot whose base types these are
  slots?: string[];                // material tables: the slots that draw from it
  count: number;
  totalWeight: number;
  entries: TableEntry[];
};

type CatalogResponse = { contentVersion: string; order: string[]; tables: Table[]; note: string };   // GET /api/tables
type TableResponse = Table & { contentVersion: string };                                             // GET /api/tables/:table
```

The catalog as served, shortened to one entry for each table shown:

```jsonc
{
  "contentVersion": "4.swpi78HUCtcrZ1Eoi9dipw",
  "order": ["quality", "prefix", "material-wearables", "material-tools", "slot", "head", "shoulders", "neck", "tool", "offhand", "wrist", "hand", "legs", "feet", "finger", "back", "waist", "chest", "suffix"],
  "tables": [
    { "index": 0, "name": "quality", "role": "quality", "count": 12, "totalWeight": 215898, "entries": [
      { "index": 5, "name": "fine", "weight": 42699, "probability": 0.19777394880915988, "rollFrom": 119899, "rollTo": 162597 } /* … 11 more */ ] },
    { "index": 1, "name": "prefix", "role": "prefix", "count": 164, "totalWeight": 652, "entries": [
      { "index": 5, "name": "burning", "weight": 1, "probability": 0.0015337423312883436, "rollFrom": 493, "rollTo": 493 } /* … 163 more */ ] },
    { "index": 2, "name": "material-wearables", "role": "material", "count": 31, "totalWeight": 832598, "slots": ["head", "shoulders", "neck", "wrist", "hand", "legs", "feet", "finger", "back", "waist", "chest"], "entries": [
      { "index": 30, "name": "godhair", "weight": 300, "probability": 0.00036031794455427467, "rollFrom": 832298, "rollTo": 832597, "tier": 7, "grade": "S", "materialRank": 31 } /* … 30 more */ ] },
    { "index": 3, "name": "material-tools", "role": "material", "count": 23, "totalWeight": 562118, "slots": ["tool", "offhand"], "entries": [
      { "index": 10, "name": "steel", "weight": 35600, "probability": 0.06333189828470179, "rollFrom": 430998, "rollTo": 466597, "tier": 4, "grade": "C", "materialRank": 9 } /* … 22 more */ ] },
    { "index": 4, "name": "slot", "role": "slot", "count": 13, "totalWeight": 46300, "entries": [
      { "index": 3, "name": "tool", "weight": 8300, "probability": 0.17926565874730022, "rollFrom": 9100, "rollTo": 17399, "gearTable": 8, "materialTable": 3 } /* … 12 more */ ] },
    { "index": 5, "name": "head", "role": "gear", "count": 20, "totalWeight": 712299, "slot": "head", "entries": [
      { "index": 0, "name": "cap", "weight": 60000, "probability": 0.08423428925212587, "rollFrom": 0, "rollTo": 59999 } /* … 19 more */ ] },
    { "index": 8, "name": "tool", "role": "gear", "count": 145, "totalWeight": 145, "slot": "tool", "entries": [
      { "index": 52, "name": "sword", "weight": 1, "probability": 0.006896551724137931, "rollFrom": 52, "rollTo": 52, "class": "Adventurer" } /* … 144 more */ ] },
    { "index": 18, "name": "suffix", "role": "suffix", "count": 195, "totalWeight": 1293, "entries": [
      { "index": 10, "name": "dawn", "weight": 1, "probability": 0.0007733952049497294, "rollFrom": 1108, "rollTo": 1108 } /* … 194 more */ ] },
    /* … and 11 more gear tables: shoulders, neck, offhand, wrist, hand, legs, feet, finger, back, waist, chest */
  ],
  "note": "…"
}
```

The CSV has one row per entry, with the same columns for every table and the version on every row:

```csv
table,role,index,name,weight,probability,rollFrom,rollTo,grade,tier,materialRank,class,gearTable,materialTable,contentVersion
quality,quality,5,fine,42699,0.19777394880915988,119899,162597,,,,,,,4.swpi78HUCtcrZ1Eoi9dipw
material-tools,material,10,steel,35600,0.06333189828470179,430998,466597,C,4,9,,,,4.swpi78HUCtcrZ1Eoi9dipw
tool,gear,52,sword,1,0.006896551724137931,52,52,,,,Adventurer,,,4.swpi78HUCtcrZ1Eoi9dipw
```

For a gear row, `table` is the slot. A single table's CSV carries only that table's own columns, then `contentVersion`.

## The 19 tables

| Index | Table | Role | Entries |
| ---: | --- | --- | ---: |
| 0 | `quality` | quality | 12 |
| 1 | `prefix` | prefix | 164 |
| 2 | `material-wearables` | material | 31 |
| 3 | `material-tools` | material | 23 |
| 4 | `slot` | slot | 13 |
| 5 | `head` | gear | 20 |
| 6 | `shoulders` | gear | 8 |
| 7 | `neck` | gear | 8 |
| 8 | `tool` | gear | 145 |
| 9 | `offhand` | gear | 144 |
| 10 | `wrist` | gear | 13 |
| 11 | `hand` | gear | 6 |
| 12 | `legs` | gear | 10 |
| 13 | `feet` | gear | 5 |
| 14 | `finger` | gear | 7 |
| 15 | `back` | gear | 5 |
| 16 | `waist` | gear | 4 |
| 17 | `chest` | gear | 26 |
| 18 | `suffix` | suffix | 195 |

The index order is a public mapping: position `i` of an item's `roll` and `indexes` belongs to table `i`.

## How one item reads the tables

1. `slot` (table 4) picks one of the 13 slots.
2. The slot picks its **gear table** (`gearTable`) and its **material table** (`materialTable`).
3. `quality` (0), `prefix` (1) and `suffix` (18) are drawn independently.
4. The other thirteen positions (the unused material table and twelve unused gear tables) are rolled too, but this item ignores them.

So six factors define an item: quality, prefix, slot, material, gear and suffix. An item response exposes five of them as `props = [quality, prefix, material, gear, suffix]` and the slot as `slot`.

## Rolls and indexes

- A **roll** is a raw integer in `[0, totalWeight)` for its table. `roll` is the item's identity and the value used in item URLs.
- An **index** is the entry the roll lands on: the entry whose `[rollFrom, rollTo]` contains the roll.
- Appraisal endpoints take either vector: `rolls=` or `indexes=`, 19 dash-joined integers, all in range, including the ignored positions.

To build an item on purpose, choose an entry per table and send its `index`, or any roll in its range. The steel sword used across these skills:

```text
indexes = 5-5-0-10-3-0-0-0-52-0-0-0-0-0-0-0-0-0-10
rolls   = 119899-493-0-430998-9100-0-0-0-52-0-0-0-0-0-0-0-0-0-1108
```

That is `fine burning steel sword of the dawn`: only the quality, prefix, tool-material, slot, tool and suffix positions matter, and the rolls are the first value of each chosen entry's range.

```js
const indexOf = (table, roll) => table.entries.find((entry) => entry.rollFrom !== null && roll >= entry.rollFrom && roll <= entry.rollTo).index;
```

## Quality

The quality word (table 0) colours the name and the rarity score. It does not decide the grade; the material does. `-` (no word) is 27.8% of rolls; `fine` and `refined` are the most common words and `legendary` the rarest at 0.14%. Read `/api/tables/quality` for all 12 entries.

## What each property means to a game

| Property | Set's meaning | Yours to decide |
| --- | --- | --- |
| Material | The grade F to S, and with it the orb value, salvage value and power budget | What the material does |
| Slot | Where the item is worn; an advisory attribute domain | Inventory rules |
| Gear | The base type: the item's form and its 3D model; a mainhand's class | What the form does |
| Quality, prefix, suffix | Rarity score and one theme channel each | Any effect at all |

Related: [Rolling an item](https://set.world/skills/rolling-an-item) for the item object, [Calculations](https://set.world/skills/calculations) for rarity and themes, [Item models](https://set.world/skills/anima-item-models) for each base type's model.
