Skip to main content

Smithing System

The smithing system implements OSRS-accurate smelting and smithing mechanics with manifest-driven recipes, tick-based timing, and auto-smithing support.
Smithing code lives in packages/shared/src/systems/shared/interaction/SmithingSystem.ts and uses recipes from ProcessingDataProvider.

Overview

Smithing is a two-step process:
  1. Smelting - Combine ores at a furnace to create bars
  2. Smithing - Use bars at an anvil to create equipment
Both steps:
  • Use tick-based timing (4 ticks = 2.4 seconds per action)
  • Support “Make X” functionality (auto-craft multiple items)
  • Are 100% success rate (except iron ore smelting)
  • Grant Smithing XP per item created

Smelting (Furnaces)

How to Smelt

  1. Have ores in your inventory
  2. Click a furnace
  3. Select bar type from the interface
  4. Choose quantity (1, 5, 10, X, All)
  5. System auto-smelts until out of materials

Smelting Requirements

Smelting Recipes

Iron ore has a 50% failure rate when smelting. Failed attempts consume the ore but grant no bar or XP. This matches OSRS mechanics.

Iron Smelting Failure


Smithing (Anvils)

How to Smith

  1. Have bars in your inventory
  2. Have a hammer in your inventory (required, not consumed)
  3. Click an anvil
  4. Select item from the interface
  5. Choose quantity (1, 5, 10, X, All)
  6. System auto-smiths until out of bars

Smithing Requirements

Smithing Recipes

Weapons: Armor: Tools:

Tick-Based Timing

Both smelting and smithing use 4-tick actions (2.4 seconds):

Session Processing


Auto-Smithing

The system supports auto-smithing - once started, it continues until:
  • Target quantity reached
  • Out of bars
  • Player moves
  • Player disconnects

Hammer Requirement

Smithing at anvils requires a hammer in your inventory:
The hammer is not consumed - it’s a permanent tool.

Manifest Integration

Smelting Recipes

Defined in items.json with smeltingRecipe property:

Smithing Recipes

Defined in items.json with smithingRecipe property:

Station 3D Models

Anvils and furnaces now use manifest-driven 3D models:
This allows easy customization of station appearances without code changes.

Events


API Reference

SmithingSystem

ProcessingDataProvider


Configuration

Constants

Messages

All user-facing messages are centralized:

Security Features

Input Validation

All inputs are validated server-side:

Server-Authoritative

All smithing logic runs server-side:
  1. Recipe validation - Server checks recipe exists
  2. Level checks - Server validates smithing level
  3. Material checks - Server verifies bars in inventory
  4. Hammer check - Server confirms hammer present
  5. Consumption - Server removes bars and adds items

Type Safety

The smithing system uses strong typing with type guards:

Testing

Smithing has comprehensive test coverage: