Skip to main content
sh-forge adds a blacksmith forge crafting system to your RedM server. Players bring raw materials to a forge prop, heat it to the required temperature using fuel items, and craft finished goods through a menu interface. Every recipe, forge location, prop model, and output item is fully configurable in config.lua. The system integrates directly with VORP and RSG inventory to handle material consumption and item delivery, and includes a skill progression system that rewards experienced blacksmiths with higher success rates and faster crafting.

Overview

DetailValue
FrameworksVORP, RSG, auto
InteractionForge prop proximity prompt
ConfigurationForges, recipes, temperature, and skill in config.lua

Features

Each forge entry in Config.Forges anchors to a world prop model at defined coordinates. You can use an existing map prop by enabling useWorldObject, or spawn the model directly at the coordinates you specify. Multiple forge locations are supported, each with its own recipe category restrictions and optional job lock.
Before crafting can begin the forge must reach a minimum temperature, set in Config.BringToTemp.RequiredTemp. Players stoke the forge with fuel items — coal, wood, or hardwood each raise the temperature by a configurable amount. The temperature decays back to the base level over time when not fuelled. A visual fire effect appears on the forge model while it is heating, cooling, or ready.
Recipes are grouped into named categories (for example, Tools and Materials). Each recipe specifies required input items and quantities (materials), an output item, a craft time in seconds, a success chance percentage, and an XP reward. Individual forges can be restricted to specific recipe categories.
Each character accumulates XP from successful crafts. As their level rises, their success chance bonus increases (configurable per level), capping at a maximum bonus percentage. At the professional level the success chance is boosted to at least a configured minimum; at master level crafts always succeed.
Individual forge locations can be restricted to specific jobs using jobLock. Players who do not hold the required job see a configurable deny message and cannot access that forge’s menu.
When a player starts crafting, a progress indicator runs for the configured duration. Cancelling before completion does not consume materials. Materials are only deducted on a successful craft completion.
sh-forge checks the player’s inventory through your framework’s native item system before displaying available recipes. Recipes the player cannot afford (missing materials) are shown as greyed out in the menu rather than hidden, so players know what materials they need to gather next.

Installation

1

Add the resource

Place the sh-forge folder inside your server’s resources directory.
2

Import the database schema

Run sh-forge/sql.sql against your server database to create the skill table used for XP and level tracking.
3

Set your framework

Open config.lua and set Config.Framework to 'vorp', 'rsg', or 'auto' to match your server.
4

Add forge items to your registry

Ensure all input and output items referenced in your recipes exist as valid items in your framework’s item registry. Also add your fuel items (coal, wood, hwood by default). The forge will not display recipes that reference unregistered items.
5

Configure your forge locations

Add your forge locations to Config.Forges. Each entry takes a set of coordinates (x, y, z, heading), a prop model, and optional job lock and category restrictions.
6

Define your recipes

Add your crafting recipes to Config.Recipes, grouped by category name. Each recipe needs a material list, output item, craft time, success chance, and XP value.
7

Start the resource

Add ensure sh-forge to your server.cfg and restart your server.

Configuration

config.lua
Config.Framework = 'vorp'  -- 'vorp', 'rsg', or 'auto'

-- Forge locations
Config.Forges = {
    {
        id             = 'valentine',
        useWorldObject = false,    -- true = attach to existing map prop
        model          = 'p_forge01x',
        coords         = { -367.8042, 799.6621, 116.0420, 182.9815 },
        allowedCategories = 'all', -- 'all' or a table of category names
        spawnIfMissing = true,
        jobLock = {
            enabled     = true,
            allowedJobs = { ['blacksmithV'] = true },
            denyMessage = 'You are not allowed to use this forge.',
        },
    },
}

-- Temperature system
Config.BringToTemp = {
    BaseTemp        = 20,    -- Starting/ambient temperature in °C
    RequiredTemp    = 120,   -- Minimum temperature before crafting can start
    MaxTemp         = 450,
    TempDecayRate   = 0.05,  -- Degrees per second decay back to base
    VisualFire      = true,  -- Show fire effect on the forge model
    Items = {                -- Fuel items and their temperature increase
        ['coal']  = 15,
        ['wood']  = 20,
        ['hwood'] = 25,
    },
}

-- Skill progression
Config.Skill = {
    enabled              = true,
    baseLevelXP          = 6000,  -- XP to reach level 1; increases by this each level
    xpPerCraft           = 20,    -- Fallback XP if recipe has none
    successBonusPerLevel = 8,     -- +% success chance per level above 1
    successBonusMax      = 40,    -- Maximum total bonus percentage
    professionalLevel    = 7,     -- At this level, chance is boosted to professionalMinChance
    professionalMinChance = 95,
    masterLevel          = 10,    -- At this level, success chance is always 100%
}

-- Proximity prompt
Config.Prompt = {
    keyControl   = 0xE30CD707,  -- R
    showDist     = 3.0,
    interactDist = 2.0,
    text         = 'Press [R] to use the Forge',
}

Recipe Structure

Recipes are organized into named categories. Each recipe key is the output item name. The materials table lists required inputs; set consume = false on a tool entry to keep the tool in the player’s inventory after crafting.
config.lua
Config.Recipes = {
    ['Tools'] = {
        ['bs_hammer'] = {
            menuOrder    = 1,
            maxCount     = 10,      -- Maximum quantity selectable in the UI slider
            craftTimeSec = 60,
            successChance = 100,
            xp           = 25,
            count        = 1,       -- Output quantity per craft
            materials = {
                { name = 'WEAPON_MELEE_HAMMER', type = 'weapon', count = 1 },
                { name = 'iron',   count = 3 },
                { name = 'silver', count = 3 },
            },
            output = { type = 'item', name = 'bs_hammer' },
        },
    },

    ['Materials'] = {
        ['iron'] = {
            menuOrder    = 2,
            maxCount     = 10,
            craftTimeSec = 60,
            successChance = 75,
            xp           = 25,
            count        = 1,
            materials = {
                { name = 'ironore', count = 6 },
                { name = 'coal',    count = 2 },
                { name = 'bs_hammer', count = 1, consume = false },
            },
            output = { type = 'item', name = 'iron' },
        },
    },
}
Materials are only removed from the player’s inventory on successful craft completion. If a player disconnects or the server restarts mid-craft, no items are consumed and the crafting timer resets on next interaction.

Default Recipe Categories

The table below shows the two built-in recipe categories and example outputs to help you understand how to structure your recipe list.
CategoryExample Outputs
ToolsBlacksmith Hammer, Pickaxe, Hatchet
MaterialsIron, Silver, Copper, Leather, Nails, Bullet Casings, Gems

Adding New Items

Register new input or output items through your VORP item configuration before adding them to forge recipes. The item name in Config.Recipes must match the item’s registered name exactly, including case.
-- Example VORP item registration
VORPcore:addItem('ironore', 'Iron Ore', 'Raw iron ore for smelting', 1, false)
Pair sh-forge with a mining resource so players must gather ironore, silverore, and similar raw materials before they can craft. This creates a complete economy loop — gather, smelt, craft — rather than buying finished goods directly.
If you reference an item in a recipe that does not exist in your framework’s item registry, that recipe will appear greyed out for all players regardless of their inventory. Double-check all item names after adding new recipes.