> ## Documentation Index
> Fetch the complete documentation index at: https://hyperscape-ai-mintlify-docs-update.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Skills System

> Skill progression, XP formulas, and resource gathering

## Overview

Hyperscape features a RuneScape-inspired skill system with leveling, XP gain, and level requirements for equipment and activities.

## Available Skills

Hyperscape has **17 skills** total:

### Combat Skills

| Skill            | Purpose                                               |
| ---------------- | ----------------------------------------------------- |
| **Attack**       | Melee accuracy, weapon requirements                   |
| **Strength**     | Melee damage                                          |
| **Defense**      | Damage reduction, armor requirements                  |
| **Constitution** | Health points                                         |
| **Ranged**       | Ranged combat accuracy and damage                     |
| **Magic**        | Spellcasting accuracy and damage                      |
| **Prayer**       | Combat bonuses via prayers (trained by burying bones) |

### Gathering Skills

| Skill           | Activity                  |
| --------------- | ------------------------- |
| **Woodcutting** | Chop trees for logs       |
| **Mining**      | Mine rocks for ores       |
| **Fishing**     | Catch fish at water spots |

### Artisan Skills

| Skill            | Activity                                                |
| ---------------- | ------------------------------------------------------- |
| **Firemaking**   | Create fires from logs                                  |
| **Cooking**      | Prepare food from raw fish                              |
| **Smithing**     | Smelt ores into bars and smith equipment                |
| **Crafting**     | Create leather armor, dragonhide, jewelry, and cut gems |
| **Fletching**    | Create bows, arrows, and arrow components               |
| **Runecrafting** | Convert essence into runes at mystical altars           |

### Support Skills

| Skill       | Activity                        |
| ----------- | ------------------------------- |
| **Agility** | Movement and shortcuts (future) |

## XP and Leveling

### XP Formula

Hyperscape uses RuneScape's XP curve:

```
XP for Level N = floor(sum(floor(L + 300 * 2^(L/7))) / 4) for L = 1 to N-1
```

### Level Milestones

| Level | Total XP   |
| ----- | ---------- |
| 10    | 1,154      |
| 20    | 4,470      |
| 30    | 13,363     |
| 50    | 101,333    |
| 70    | 737,627    |
| 99    | 13,034,431 |

## Resource Gathering

### Woodcutting

Requirements:

* Hatchet in inventory or equipped
* Click tree to chop

Success rate improves with level. Higher-level trees require higher Woodcutting levels.

| Tree   | Level | XP   |
| ------ | ----- | ---- |
| Normal | 1     | 25   |
| Oak    | 15    | 37.5 |
| Willow | 30    | 67.5 |
| Yew    | 60    | 175  |
| Magic  | 75    | 250  |

### Mining

Requirements:

* Pickaxe in inventory or equipped
* Click ore rock to mine

**OSRS-Accurate Mechanics:**

* Pickaxe tier affects **roll frequency** (not success rate)
* Success rate is **level-only** (pickaxe doesn't affect it)
* Rocks have **100% depletion** on successful mine (1/8 chance)
* Dragon/Crystal pickaxes have **bonus speed rolls**

| Ore        | Level | XP   | Depletion  |
| ---------- | ----- | ---- | ---------- |
| Copper/Tin | 1     | 17.5 | 1/8 chance |
| Iron       | 15    | 35   | 1/8 chance |
| Coal       | 30    | 50   | 1/8 chance |
| Mithril    | 55    | 80   | 1/8 chance |
| Adamantite | 70    | 95   | 1/8 chance |
| Runite     | 85    | 125  | 1/8 chance |

**Pickaxe Tiers:**

| Pickaxe | Level | Roll Ticks | Bonus Speed            |
| ------- | ----- | ---------- | ---------------------- |
| Bronze  | 1     | 8 ticks    | None                   |
| Iron    | 1     | 7 ticks    | None                   |
| Steel   | 6     | 6 ticks    | None                   |
| Mithril | 21    | 5 ticks    | None                   |
| Adamant | 31    | 4 ticks    | None                   |
| Rune    | 41    | 3 ticks    | None                   |
| Dragon  | 61    | 3 ticks    | 1/6 chance for 2 ticks |
| Crystal | 71    | 3 ticks    | 1/4 chance for 2 ticks |

<Info>
  Dragon and Crystal pickaxes have a chance to mine faster: Dragon has a 1/6 chance for 2-tick rolls (avg 2.83 ticks), Crystal has a 1/4 chance (avg 2.75 ticks).
</Info>

### Fishing

Requirements:

* Fishing rod in inventory
* Click fishing spot

| Fish      | Level | XP  |
| --------- | ----- | --- |
| Shrimp    | 1     | 10  |
| Trout     | 20    | 50  |
| Lobster   | 40    | 90  |
| Swordfish | 50    | 100 |
| Shark     | 76    | 110 |

## Artisan Skills

### Firemaking

Use tinderbox on logs in inventory to create a fire.

| Log    | Level | XP    |
| ------ | ----- | ----- |
| Normal | 1     | 40    |
| Oak    | 15    | 60    |
| Willow | 30    | 90    |
| Yew    | 60    | 202.5 |
| Magic  | 75    | 303.8 |

### Cooking

Use raw fish on a fire or range to cook.

| Food      | Level | XP  | Heals |
| --------- | ----- | --- | ----- |
| Shrimp    | 1     | 30  | 3 HP  |
| Trout     | 15    | 70  | 7 HP  |
| Lobster   | 40    | 120 | 12 HP |
| Swordfish | 45    | 140 | 14 HP |
| Shark     | 80    | 210 | 20 HP |

<Warning>
  Cooking can fail at low levels, burning the food. Ranges reduce burn chance compared to fires.
</Warning>

### Smithing

Smelt ores into bars at furnaces, then smith bars into equipment at anvils.

#### Smelting (at Furnace)

| Bar     | Level | Ores Required             | XP   | Success Rate |
| ------- | ----- | ------------------------- | ---- | ------------ |
| Bronze  | 1     | 1 Copper + 1 Tin          | 6.25 | 100%         |
| Iron    | 15    | 1 Iron Ore                | 12.5 | 50%          |
| Steel   | 30    | 1 Iron Ore + 2 Coal       | 17.5 | 100%         |
| Mithril | 50    | 1 Mithril Ore + 4 Coal    | 30   | 100%         |
| Adamant | 70    | 1 Adamantite Ore + 6 Coal | 37.5 | 100%         |
| Rune    | 85    | 1 Runite Ore + 8 Coal     | 50   | 100%         |

<Info>
  Iron ore has a 50% failure rate when smelting, matching OSRS mechanics.
</Info>

#### Smithing (at Anvil)

Click an anvil to open the smithing interface. **Requires a hammer in your inventory** (not consumed). Select the item to smith and quantity.

**Weapons:**

| Item            | Level | Bars Required | XP   | Ticks |
| --------------- | ----- | ------------- | ---- | ----- |
| Bronze Sword    | 4     | 1 Bronze      | 12.5 | 4     |
| Bronze Scimitar | 5     | 2 Bronze      | 25   | 4     |
| Iron Sword      | 19    | 1 Iron        | 25   | 4     |
| Steel Sword     | 34    | 1 Steel       | 37.5 | 4     |
| Mithril Sword   | 54    | 1 Mithril     | 50   | 4     |

**Armor:**

| Item              | Level | Bars Required | XP    | Ticks |
| ----------------- | ----- | ------------- | ----- | ----- |
| Bronze Platebody  | 18    | 5 Bronze      | 62.5  | 4     |
| Iron Platebody    | 33    | 5 Iron        | 125   | 4     |
| Steel Platebody   | 48    | 5 Steel       | 187.5 | 4     |
| Mithril Platebody | 68    | 5 Mithril     | 250   | 4     |

**Tools:**

| Item           | Level | Bars Required | XP   | Ticks |
| -------------- | ----- | ------------- | ---- | ----- |
| Bronze Hatchet | 1     | 1 Bronze      | 12.5 | 4     |
| Bronze Pickaxe | 1     | 1 Bronze      | 12.5 | 4     |
| Iron Hatchet   | 16    | 1 Iron        | 25   | 4     |
| Steel Hatchet  | 31    | 1 Steel       | 37.5 | 4     |

**Arrowtips (Multi-Output):**

| Item              | Level | Bars Required | XP   | Output Qty |
| ----------------- | ----- | ------------- | ---- | ---------- |
| Bronze arrowtips  | 1     | 1 Bronze      | 12.5 | 15         |
| Iron arrowtips    | 15    | 1 Iron        | 25   | 15         |
| Steel arrowtips   | 30    | 1 Steel       | 37.5 | 15         |
| Mithril arrowtips | 50    | 1 Mithril     | 50   | 15         |
| Adamant arrowtips | 70    | 1 Adamant     | 62.5 | 15         |
| Rune arrowtips    | 85    | 1 Rune        | 75   | 15         |

<Warning>
  You must have a hammer in your inventory to smith items at an anvil. The hammer is not consumed.
</Warning>

<Info>
  Smithing supports "Make X" functionality - you can smith multiple items in one session. The system auto-smiths until you run out of bars or reach the target quantity. Arrowtips produce 15 per bar (used for Fletching arrows).
</Info>

### Crafting

Create leather armor, dragonhide equipment, jewelry, and cut gems using various tools.

#### Leather Crafting (Needle + Thread)

Use needle on leather to open the crafting interface. **Requires thread in inventory** (5 uses per thread).

| Item              | Level | Materials | XP   | Category |
| ----------------- | ----- | --------- | ---- | -------- |
| Leather gloves    | 1     | 1 Leather | 13.8 | Leather  |
| Leather boots     | 7     | 1 Leather | 16.3 | Leather  |
| Leather cowl      | 9     | 1 Leather | 18.5 | Leather  |
| Leather vambraces | 11    | 1 Leather | 22   | Leather  |
| Leather body      | 14    | 1 Leather | 25   | Leather  |
| Leather chaps     | 18    | 1 Leather | 27   | Leather  |

#### Dragonhide Crafting (Needle + Thread)

Use needle on dragon leather for high-level ranged armor.

| Item                   | Level | Materials              | XP  | Category   |
| ---------------------- | ----- | ---------------------- | --- | ---------- |
| Green d'hide vambraces | 57    | 1 Green dragon leather | 62  | Dragonhide |
| Green d'hide chaps     | 60    | 2 Green dragon leather | 124 | Dragonhide |
| Green d'hide body      | 63    | 3 Green dragon leather | 186 | Dragonhide |

#### Jewelry Crafting (Furnace + Moulds)

Use furnace to craft jewelry from gold/silver bars. **Requires specific mould in inventory** (not consumed).

| Item                | Level | Materials               | Mould          | XP |
| ------------------- | ----- | ----------------------- | -------------- | -- |
| Gold ring           | 5     | 1 Gold bar              | Ring mould     | 15 |
| Sapphire ring       | 20    | 1 Gold bar + 1 Sapphire | Ring mould     | 40 |
| Gold necklace       | 6     | 1 Gold bar              | Necklace mould | 20 |
| Sapphire necklace   | 22    | 1 Gold bar + 1 Sapphire | Necklace mould | 55 |
| Gold amulet (u)     | 8     | 1 Gold bar              | Amulet mould   | 30 |
| Sapphire amulet (u) | 24    | 1 Gold bar + 1 Sapphire | Amulet mould   | 65 |

#### Gem Cutting (Chisel)

Use chisel on uncut gems to create cut gems for jewelry.

| Item     | Level | Materials        | XP    |
| -------- | ----- | ---------------- | ----- |
| Sapphire | 20    | 1 Uncut sapphire | 50    |
| Emerald  | 27    | 1 Uncut emerald  | 67.5  |
| Ruby     | 34    | 1 Uncut ruby     | 85    |
| Diamond  | 43    | 1 Uncut diamond  | 107.5 |

#### Tanning System

Convert hides to leather at tanner NPCs for a coin fee.

| Hide             | Output               | Cost  | Location   |
| ---------------- | -------------------- | ----- | ---------- |
| Cowhide          | Leather              | 1 gp  | Tanner NPC |
| Green dragonhide | Green dragon leather | 20 gp | Tanner NPC |
| Blue dragonhide  | Blue dragon leather  | 20 gp | Tanner NPC |
| Red dragonhide   | Red dragon leather   | 20 gp | Tanner NPC |
| Black dragonhide | Black dragon leather | 20 gp | Tanner NPC |

<Info>
  Tanning is instant (no XP granted). It's a service provided by NPCs to convert hides into usable leather for crafting.
</Info>

**Crafting Mechanics:**

* **Thread Consumption**: Thread has 5 uses before being consumed
* **Tick-Based**: Each craft takes 2-3 ticks (1.2-1.8 seconds)
* **Movement Cancellation**: Walking or entering combat cancels crafting
* **Make-X**: Craft multiple items in one session with quantity memory
* **Recipe Filtering**: Recipes filter by input item (e.g., chisel + uncut sapphire shows only sapphire)
* **Auto-Select**: Single recipe auto-selects to skip to quantity selection

### Fletching

Create bows, arrows, and arrow components using a knife and various materials.

Requirements:

* Knife in inventory
* Logs or arrow components

**Arrow Crafting:**

| Item           | Level | Materials                                | XP  | Output Qty |
| -------------- | ----- | ---------------------------------------- | --- | ---------- |
| Arrow shaft    | 1     | 1 logs + knife                           | 5   | 15         |
| Headless arrow | 1     | 15 arrow shafts + 15 feathers            | 1   | 15         |
| Bronze arrow   | 1     | 15 headless arrows + 15 bronze arrowtips | 1.3 | 15         |
| Iron arrow     | 15    | 15 headless arrows + 15 iron arrowtips   | 2.5 | 15         |
| Steel arrow    | 30    | 15 headless arrows + 15 steel arrowtips  | 5   | 15         |

**Bow Crafting:**

| Item                | Level | Materials                       | XP   |
| ------------------- | ----- | ------------------------------- | ---- |
| Shortbow (u)        | 5     | 1 logs + knife                  | 5    |
| Shortbow            | 5     | 1 shortbow (u) + 1 bowstring    | 5    |
| Oak shortbow (u)    | 20    | 1 oak logs + knife              | 16.5 |
| Willow shortbow (u) | 35    | 1 willow logs + knife           | 33.3 |
| Yew longbow (u)     | 70    | 1 yew logs + knife              | 75   |
| Yew longbow         | 70    | 1 yew longbow (u) + 1 bowstring | 75   |

<Info>
  Fletching produces multiple items per action for arrows and shafts (15 per action). Arrowtips are created via Smithing (15 per bar).
</Info>

**Fletching Mechanics:**

* **Multi-Output**: Arrow shafts and arrows produce 15 items per action
* **Item-on-Item**: Stringing bows and assembling arrows use item-on-item interactions
* **Tick-Based**: Each fletch takes 2-3 ticks (1.2-1.8 seconds)
* **Movement Cancellation**: Walking or entering combat cancels fletching
* **Make-X**: Fletch multiple items in one session with quantity memory
* **Category Grouping**: UI groups recipes by type (arrow\_shafts, shortbows, longbows, stringing, arrows)

### Runecrafting

Convert essence into runes at mystical altars scattered throughout the world.

Requirements:

* Rune essence or pure essence in inventory
* Access to a runecrafting altar

**Rune Types:**

| Rune   | Level | XP/Essence | Multi-Rune Levels                  |
| ------ | ----- | ---------- | ---------------------------------- |
| Air    | 1     | 5          | 11, 22, 33, 44, 55, 66, 77, 88, 99 |
| Mind   | 2     | 5.5        | 14, 28, 42, 56, 70, 84, 98         |
| Water  | 5     | 6          | 19, 38, 57, 76, 95                 |
| Earth  | 9     | 6.5        | 26, 52, 78                         |
| Fire   | 14    | 7          | 35, 70                             |
| Body   | 20    | 7.5        | 46, 92                             |
| Cosmic | 27    | 8          | 59                                 |
| Chaos  | 35    | 8.5        | 74                                 |
| Nature | 44    | 9          | -                                  |
| Law    | 54    | 9.5        | -                                  |
| Death  | 65    | 10         | -                                  |

<Info>
  Runecrafting is instant (no tick delay). Multi-rune levels grant +1 rune per essence. Example: At level 22, you get 3 air runes per essence (base 1 + level 11 threshold + level 22 threshold).
</Info>

**Runecrafting Mechanics:**

* **Instant Conversion**: Click altar to instantly convert ALL essence in inventory
* **Two Essence Types**: Rune essence (basic runes only), pure essence (all runes)
* **Multi-Rune Crafting**: Higher levels grant bonus runes per essence
* **Altar-Specific**: Each altar produces one rune type (air altar → air runes)
* **No Failure**: Always succeeds (100% success rate)
* **Mystical Visuals**: Altars feature color-coded particle effects matching rune type

## Equipment Level Requirements

Equipment and activities have level gates:

| Tier         | Attack/Defense | Ranged | Crafting |
| ------------ | -------------- | ------ | -------- |
| Bronze       | 1              | 1      | 1        |
| Iron         | 5              | -      | -        |
| Steel        | 10             | 10     | -        |
| Mithril      | 20             | 20     | -        |
| Adamant      | 30             | -      | -        |
| Rune         | 40             | -      | -        |
| Dragon       | 60             | -      | -        |
| Green d'hide | -              | 40     | 57-63    |

## Skill Data Files

Skill configuration is in `packages/shared/src/data/` and `packages/server/world/assets/manifests/`:

| File                      | Purpose                    |
| ------------------------- | -------------------------- |
| `tier-requirements.json`  | Level requirements by tier |
| `skill-unlocks.json`      | What unlocks at each level |
| `gathering/*.json`        | Resource nodes, yields, XP |
| `recipes/crafting.json`   | Crafting recipes and XP    |
| `recipes/tanning.json`    | Tanning costs and outputs  |
| `recipes/smelting.json`   | Smelting recipes           |
| `recipes/smithing.json`   | Smithing recipes           |
| `recipes/cooking.json`    | Cooking recipes            |
| `recipes/firemaking.json` | Firemaking XP              |

## Prayer System

Prayer provides combat bonuses at the cost of draining prayer points:

**Training:**

* Bury bones for Prayer XP (4.5 XP for regular bones)
* Right-click bones in inventory → "Bury"
* 2-tick (1.2s) delay between burials

**Prayer Points:**

* Maximum points = Prayer level (1-99)
* Drain while prayers are active
* Recharge at altars (purple boxes in world)

**Available Prayers:**

* **Thick Skin** (Level 1): +5% Defense
* **Burst of Strength** (Level 4): +5% Strength
* **Clarity of Thought** (Level 7): +5% Attack
* **Rock Skin** (Level 10): +10% Defense
* **Superhuman Strength** (Level 13): +10% Strength

<Info>
  See [Prayer System](/wiki/game-systems/prayer) for complete mechanics, drain formulas, and combat integration.
</Info>

***

## Default Skill Values

Skills start at level 1 with 0 XP, except Constitution which starts at level 10:

```typescript theme={"theme":{"light":"github-light","dark":"tokyo-night"}}
// From packages/shared/src/entities/player/PlayerEntity.ts
playerData.skills = {
  attack: { level: 1, xp: 0 },
  strength: { level: 1, xp: 0 },
  defense: { level: 1, xp: 0 },
  constitution: { level: 10, xp: 1154 },  // Starts at level 10
  ranged: { level: 1, xp: 0 },
  magic: { level: 1, xp: 0 },
  prayer: { level: 1, xp: 0 },
  woodcutting: { level: 1, xp: 0 },
  mining: { level: 1, xp: 0 },
  fishing: { level: 1, xp: 0 },
  firemaking: { level: 1, xp: 0 },
  cooking: { level: 1, xp: 0 },
  smithing: { level: 1, xp: 0 },
  agility: { level: 1, xp: 0 },
  crafting: { level: 1, xp: 0 },
};
```

<Info>
  Constitution starts at level 10 (1,154 XP) like RuneScape's Hitpoints.
  Player health equals their Constitution level.
</Info>
