---
name: set-anima-derived-stats
description: AnimaSystem's derived stats, Set's own reading of generated characters and items for its browser game. Use when a game wants ready rules for what each material weighs, how armor protects against physical and magic harm, how hard a held item hits, how worn weight slows a body, stamina recovery, whole-number health and stamina, a level and orb-spend projection, or the schema of the derived-stat receipt.
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: Derived stats
---

# Derived stats (AnimaSystem)

The Set API generates, grades and prices items. It never says what an item does. AnimaSystem is Set's own answer for its browser game: it reads each item's **material** and the character's **attributes**, and derives weight, protection, hit power and recovery. It runs in the browser, changes no API value, and is one reading among many. Use it as written, tune it, or replace it.

There is no endpoint for these numbers. Compute them from a character response with the formulas and tables below. Label them as AnimaSystem's, never as Set's grade.

## Inputs

- Each item's material name: `item.props[2].name`, with its slot (`tool` and `offhand` are held; the other 11 slots are worn).
- The material tables' grades and weights: `/api/tables/material-wearables?format=csv`, `/api/tables/material-tools?format=csv`.
- The character's `attributes` (from `finalStats`), especially `carryCapacity`, `stamina`, `maxHealth` and the damage and reduction channels.

Quality, prefix and suffix are not read. No item adds stat points.

## One rating per material

```text
rarity in grade  r = (-log2(share) - least) / (most - least)     over the grade's own materials, 0 to 1
quality          q = (grade - 1 + 0.25 r) / 6.25                 grade F = 1 … S = 7; 0 to 1
rating           V = 1.15 + (2/3) q                              x1.15 to x1.817
mass             m = sqrt(density / 7.85)                        steel = 1
```

Holding or wearing anything rates at least x1.15. One grade is worth one equal step (each grade costs five times the last), and rarity inside a grade is worth 0.25 of a step, so a higher grade always rates higher. A **held** item's rating is its hand's **hit power**: it multiplies that hand's damage and healing.

## Worn items: weight, protection and ward

Coverage shares of a full outfit: chest 0.26, legs 0.16, head 0.10, shoulders 0.10, back 0.10, feet 0.06, waist 0.06, wrist 0.04, neck 0.04, each hand item 0.03, each finger item 0.01.

```text
load            L = Σ coverage × m
capacity        C = carryCapacity / 106                          all-16 body = 1
moveFactor        = max(0.6, 1 / (1 + 0.25 × L / C))            walkSpeed
attackFactor      = max(0.6, 1 / (1 + 0.15 × L / C))            attackSpeed, castSpeed, chargeSpeedAction
recoveryFactor    = max(0.6, 1 / (1 + 0.35 × L / C))            stamina recovery
drag(L, C)        = (moveFactor × attackFactor × recoveryFactor)^(1/3)

defense         D = V / drag(m, 1)                               a full outfit of the material on an all-16 body
physical        A = D^(1 - 1/3 × lean)
ward            W = D^(1 + 1/3 × lean)                        sqrt(A × W) = D
armorFactor       = 1 + Σ coverage × (A - 1);   armorReduction = 1 - 1 / armorFactor
wardFactor        = 1 + Σ coverage × (W - 1);   wardReduction  = 1 - 1 / wardFactor

physicalDamageReduction ← 1 - (1 - physicalDamageReduction) × (1 - armorReduction)
magicalDamageReduction  ← 1 - (1 - magicalDamageReduction)  × (1 - wardReduction)
walkSpeed ← walkSpeed × moveFactor;   attackSpeed, castSpeed, chargeSpeedAction ← × attackFactor
```

The **ward lean** says what a material is good against:

| Lean | Materials |
| ---: | --- |
| +1 (fibres) | cotton, wool, linen, cupro, silk, cashmere, velvet |
| +0.5 (hide, wood, stone) | leather, chitin, wooden, bone, stone, obsidian, crystal |
| 0 | wyrmweave and godhair |
| −0.5 | orichalcum, mythril and diamond |
| −1 (metals) | copper, brass, bronze, iron, steel, silver, titanium, gold, platinum, iridium, adamantite, meteoric |

Within a grade, heavy materials defend more and light ones move, swing and recover faster, at an equal rating.

Some materials are authored above that line, in points of full-outfit damage cut added on an axis (`A' = 1 / (1/A − p)`):

| Material | Physical | Magic |
| --- | ---: | ---: |
| wyrmweave | +0.10 | +0.10 |
| godhair | +0.15 | +0.15 |
| adamantite | 0 | +0.03 |
| meteoric | 0 | +0.03 |

### Worn materials: one full outfit on an all-16 body

`physical` and `magic` are the share of damage the outfit removes before the body's own reductions. `walk`, `attack` and `recovery` are the speed changes from its weight.

```csv
material,grade,mass,lean,rating,physical,magic,walk,attack,recovery
cotton,F,0.44,1,1.150,15.0%,27.8%,-10.0%,-6.2%,-13.4%
wool,F,0.41,1,1.177,15.9%,29.2%,-9.3%,-5.8%,-12.5%
wooden,F,0.30,0.5,1.177,17.7%,23.9%,-6.9%,-4.3%,-9.5%
bone,E,0.49,0.5,1.257,24.9%,33.0%,-11.0%,-6.9%,-14.7%
stone,E,0.59,0.5,1.267,26.7%,35.2%,-12.8%,-8.1%,-17.0%
copper,E,1.07,-1,1.283,47.5%,27.6%,-21.1%,-13.8%,-27.2%
brass,D,1.04,-1,1.363,51.3%,30.2%,-20.6%,-13.5%,-26.7%
bronze,D,1.06,-1,1.375,52.0%,30.7%,-20.9%,-13.7%,-27.0%
linen,D,0.44,1,1.390,25.0%,43.8%,-9.9%,-6.2%,-13.3%
iron,D,1.00,-1,1.390,52.0%,30.7%,-20.0%,-13.1%,-26.0%
leather,C,0.33,0.5,1.470,32.1%,41.8%,-7.6%,-4.7%,-10.4%
chitin,C,0.41,0.5,1.470,33.1%,43.0%,-9.2%,-5.8%,-12.5%
obsidian,C,0.55,0.5,1.470,34.8%,45.1%,-12.1%,-7.7%,-16.2%
cupro,C,0.44,1,1.478,28.1%,48.3%,-9.9%,-6.2%,-13.3%
steel,C,1.00,-1,1.478,55.8%,33.5%,-20.0%,-13.0%,-25.9%
silk,C,0.41,1,1.487,28.1%,48.3%,-9.4%,-5.8%,-12.6%
silver,C,1.16,-1,1.487,57.9%,35.1%,-22.4%,-14.8%,-28.8%
cashmere,C,0.41,1,1.497,28.3%,48.7%,-9.3%,-5.8%,-12.5%
orichalcum,C,1.05,-0.5,1.497,52.2%,41.0%,-20.7%,-13.6%,-26.8%
titanium,B,0.76,-1,1.577,56.7%,34.2%,-15.9%,-10.2%,-21.0%
gold,B,1.57,-1,1.589,65.1%,40.9%,-28.2%,-19.0%,-35.4%
platinum,B,1.65,-1,1.603,66.2%,41.9%,-29.2%,-19.9%,-36.7%
crystal,A,0.58,0.5,1.683,42.1%,53.5%,-12.7%,-8.0%,-16.9%
mythril,A,0.53,-0.5,1.694,53.2%,41.8%,-11.7%,-7.4%,-15.6%
iridium,A,1.70,-1,1.705,69.2%,44.5%,-29.8%,-20.3%,-37.2%
velvet,A,0.42,1,1.710,34.6%,57.2%,-9.5%,-6.0%,-12.9%
diamond,S,0.67,-0.5,1.790,57.6%,45.8%,-14.3%,-9.1%,-19.0%
adamantite,S,0.73,-1,1.794,63.3%,42.4%,-15.5%,-9.9%,-20.4%
meteoric,S,1.00,-1,1.799,66.0%,44.7%,-20.1%,-13.1%,-26.0%
wyrmweave,S,0.35,0,1.806,59.0%,59.0%,-8.0%,-5.0%,-10.9%
godhair,S,0.20,0,1.817,62.5%,62.5%,-4.7%,-2.8%,-6.4%
```

One piece removes `1 − 1 / (1 + coverage × (X − 1))` on an axis, where `X` is the material's full-outfit factor `1 / (1 − share)`. A steel chest piece: `X = 2.261` (a full outfit removes 55.8%), so `1 − 1 / (1 + 0.26 × 1.261) = 24.7%` less physical damage.

### Held materials: hit power

```csv
material,grade,mass,hitPower
wooden,F,0.30,1.150
bone,F,0.49,1.177
stone,E,0.59,1.257
copper,E,1.07,1.283
brass,D,1.04,1.363
bronze,D,1.06,1.375
iron,D,1.00,1.390
obsidian,C,0.55,1.470
steel,C,1.00,1.474
silver,C,1.16,1.479
orichalcum,C,1.05,1.484
titanium,C,0.76,1.497
gold,B,1.57,1.577
platinum,B,1.65,1.590
crystal,B,0.58,1.603
mythril,A,0.53,1.683
iridium,A,1.70,1.710
diamond,S,0.67,1.790
topaz,S,0.67,1.792
emerald,S,0.59,1.794
sapphire,S,0.71,1.798
ruby,S,0.71,1.803
adamantite,S,0.73,1.817
```

A held material's mass also scales its model's weight, which changes tempo and stamina cost ([Derived combat](https://set.world/skills/anima-derived-combat)). Held items have no ward. The item Orb ignores material weight.

## Health, stamina and recovery

- **Maxima.** `floor(attributes.maxHealth)` and `floor(attributes.stamina)`. Damage and healing are whole numbers too (`local-resources-1`).
- **Stamina recovery.** `10 × sqrt(stamina / 88) × recoveryFactor` per second: 6.74 at all-8, 10 at all-16 and 12.43 at all-24 with no armor; 7.41 for an all-16 body in a full steel outfit. Held weight is not in the load; it pays per attempt.
- **Magic resistance.** `1 − (1 − magicalDamageReduction) × (1 − globalResistance)`, with the ward already in `magicalDamageReduction`. It resists magic damage and stamina drain.
- **Weights for display.** A steel Sword is 3 lb and a full steel outfit 50 lb: a worn piece weighs `coverage × m × 50 lb`.

## Levels and orb spend (`anima-scaling-5`)

The API has no level curve. Set's scene and its Roll a character column show one optional projection:

- **Level.** Level 1 is the birth. Each later level grants 3 stat points as 12 seeded grants of 0.25 among the five primary stats (strength, dexterity, agility, intelligence, vitality). Stats stay fractional and may pass 24. At level 99, the highest, the pool is 294 points.
- **Attributes.** The public attribute formulas are applied to the grown stats without the 8 to 24 clamp. Probability and resistance channels get diminishing returns toward 0.85.
- **Orbs per item.** Spending N orbs on an item redraws its quality, prefix, material and suffix with the lottery's candidate count and grade gate, keeping its slot and gear. An item never loses grade.
- Scaled stats are for the local game only. Do not send them to endpoints that require stats in 8 to 24.

## Apply it

1. Roll a character ([Rolling a character](https://set.world/skills/rolling-a-character)) and keep the response unchanged.
2. For each worn item, look up its material's `mass`, `lean` and `rating`, and sum the load and the two factors by coverage.
3. Adjust the five attributes above, and take each hand's hit power from its held item's material.
4. Keep the result beside the response as your own state. Recompute from the original attributes, never from already adjusted ones.

In Set's source this is one call, `withAnimaSystem(character)` in `three-isometric-engine/anima-scene/anima-system.ts`. It returns the character with adjusted `attributes` and an `animaSystem` receipt of every number.

## The receipt schema

```ts
type AnimaSystemPiece = {
  slot: string;                    // a worn slot
  side: 'right' | 'left' | null;   // hand and finger items
  material: string;
  grade: number;                   // 1..7
  coverage: number;
  mass: number;
  protection: number;              // the material's full-outfit physical factor A
  ward: number;                    // the material's full-outfit ward factor W
  quality: number;                 // 0..1
};

type AnimaSystemHeld = { slot: 'tool' | 'offhand'; material: string; grade: number; mass: number; quality: number; power: number };

type AnimaSystemReceipt = {
  version: string;                 // "anima-system-10"
  pieces: AnimaSystemPiece[];
  held: { right: AnimaSystemHeld | null; left: AnimaSystemHeld | null };   // tool, offhand
  load: number;                    // 1.00 is a full steel outfit
  armorQuality: number;
  armorFactor: number;
  armorReduction: number;
  wardFactor: number;
  wardReduction: number;
  moveFactor: number;
  attackFactor: number;
  recoveryFactor: number;
  staminaRecovery: number;         // per second
  baseAttributes: Record<string, number>;   // the attributes before AnimaSystem
};

type AnimaCharacter = Character & { attributes: Record<string, number>; animaSystem: AnimaSystemReceipt };
```

The receipt for the example character in [Rolling a character](https://set.world/skills/rolling-a-character), computed by the rules above:

```jsonc
{
  "version": "anima-system-10",
  "pieces": [
    { "slot": "chest", "side": null, "material": "silk", "grade": 4, "coverage": 0.26, "mass": 0.4132, "protection": 1.3906, "ward": 1.9338, "quality": 0.5056 },
    { "slot": "legs", "side": null, "material": "cotton", "grade": 1, "coverage": 0.16, "mass": 0.4429, "protection": 1.1768, "ward": 1.385, "quality": 0 },
    { "slot": "head", "side": null, "material": "leather", "grade": 4, "coverage": 0.1, "mass": 0.331, "protection": 1.4726, "ward": 1.7192, "quality": 0.48 },
    { "slot": "shoulders", "side": null, "material": "cotton", "grade": 1, "coverage": 0.1, "mass": 0.4429, "protection": 1.1768, "ward": 1.385, "quality": 0 },
    { "slot": "back", "side": null, "material": "wool", "grade": 1, "coverage": 0.1, "mass": 0.4085, "protection": 1.1888, "ward": 1.4133, "quality": 0.04 },
    { "slot": "feet", "side": null, "material": "bone", "grade": 2, "coverage": 0.06, "mass": 0.492, "protection": 1.3318, "ward": 1.4935, "quality": 0.16 },
    { "slot": "waist", "side": null, "material": "linen", "grade": 3, "coverage": 0.06, "mass": 0.4371, "protection": 1.3342, "ward": 1.7801, "quality": 0.36 },
    { "slot": "wrist", "side": null, "material": "bronze", "grade": 3, "coverage": 0.04, "mass": 1.0588, "protection": 2.0839, "ward": 1.4436, "quality": 0.337 },
    { "slot": "neck", "side": null, "material": "copper", "grade": 2, "coverage": 0.04, "mass": 1.0684, "protection": 1.9061, "ward": 1.3806, "quality": 0.2 },
    { "slot": "hand", "side": "right", "material": "leather", "grade": 4, "coverage": 0.03, "mass": 0.331, "protection": 1.4726, "ward": 1.7192, "quality": 0.48 },
    { "slot": "hand", "side": "left", "material": "cotton", "grade": 1, "coverage": 0.03, "mass": 0.4429, "protection": 1.1768, "ward": 1.385, "quality": 0 },
    { "slot": "finger", "side": "right", "material": "gold", "grade": 5, "coverage": 0.01, "mass": 1.5688, "protection": 2.867, "ward": 1.6932, "quality": 0.659 },
    { "slot": "finger", "side": "left", "material": "stone", "grade": 2, "coverage": 0.01, "mass": 0.5865, "protection": 1.3637, "ward": 1.5438, "quality": 0.1748 }
  ],
  "held": {
    "right": { "slot": "tool", "material": "steel", "grade": 4, "mass": 1, "quality": 0.4858, "power": 1.4739 },
    "left": { "slot": "offhand", "material": "iron", "grade": 3, "mass": 1.0013, "quality": 0.36, "power": 1.39 }
  },
  "load": 0.4821,
  "armorQuality": 0.2589,
  "armorFactor": 1.375,
  "armorReduction": 0.2727,
  "wardFactor": 1.611,
  "wardReduction": 0.3793,
  "moveFactor": 0.8959,
  "attackFactor": 0.9348,
  "recoveryFactor": 0.8601,
  "staminaRecovery": 8.9838,
  "baseAttributes": { /* the character's 23 attributes before AnimaSystem */ }
}
```

With it, this character's `physicalDamageReduction` becomes `1 − (1 − 0.152) × (1 − 0.2727) = 0.3832`, its `magicalDamageReduction` 0.4339, its `walkSpeed` `1.155 × 0.8959 = 1.0348` and its `attackSpeed` 1.0657; its sword hand hits with power 1.4739.

## Where to see it

The item card on the home page, the table under `https://set.world/item-models`, and the AnimaSystem section of every character sheet show these readings. The full derivation and each outfit on weak and strong bodies: §13.70 of the reference ([Algorithms](https://set.world/skills/algorithms)). These numbers are the formulas evaluated; they are not a balance study.
