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
| Detail | Value |
|---|---|
| Frameworks | VORP, RSG, auto |
| Interaction | Forge prop proximity prompt |
| Configuration | Forges, recipes, temperature, and skill in config.lua |
Features
World Prop Forge Interaction
World Prop Forge Interaction
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.Temperature System
Temperature System
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.Categorized Recipes
Categorized Recipes
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.Skill Progression
Skill Progression
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.
Job Locking
Job Locking
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.Crafting Progress
Crafting Progress
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.
Framework Inventory Integration
Framework Inventory Integration
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
Import the database schema
Run
sh-forge/sql.sql against your server database to create the skill table used for XP and level tracking.Set your framework
Open
config.lua and set Config.Framework to 'vorp', 'rsg', or 'auto' to match your server.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.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.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.Configuration
config.lua
Recipe Structure
Recipes are organized into named categories. Each recipe key is the output item name. Thematerials table lists required inputs; set consume = false on a tool entry to keep the tool in the player’s inventory after crafting.
config.lua
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.| Category | Example Outputs |
|---|---|
| Tools | Blacksmith Hammer, Pickaxe, Hatchet |
| Materials | Iron, Silver, Copper, Leather, Nails, Bullet Casings, Gems |
Adding New Items
- VORP
- RSG
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.