RedM documentation

Murphy's Craft

Crafting System

Crafting Props System


Overview

The Crafting Props System allows players to craft items by interacting with physical props (objects) in the game world, such as campfires, workbenches, anvils, etc. The system automatically detects props around the player without requiring fixed coordinates.

Configuration

Add prop-based crafting stations in shared/config.lua:

lua
Config.CraftingProps = {
{
name = "Campfire", -- Display name shown in the tip
prop = "p_campfire02x", -- Prop model name or hash
cat = { "cuisinier", "food" }, -- Categories available at this prop
searchRadius = 15.0, -- Radius around player to search for this prop (default: 10.0)
interactionRadius = 2.0, -- Distance from prop to allow interaction (default: 2.0)
},
{
name = "Butcher Table",
prop = `p_table29x`, -- Can use hash directly
cat = { "food" },
searchRadius = 10.0,
interactionRadius = 1.5,
},
{
name = "Forge",
prop = "p_anvil01x",
cat = { "armurier", "bricoleur" },
searchRadius = 12.0,
interactionRadius = 3.0,
},
}

Parameters

  • name: Display name shown in the proximity tip when player is near the prop
  • prop: Prop model name (string) or hash (number). Common props:
    • p_campfire02x - Campfire
    • p_table29x - Butcher table
    • p_anvil01x - Anvil
    • p_craftingbench01x - Crafting bench
  • cat: Array of craft categories available (must match categories in Craft table)
  • searchRadius: How far from the player to search for this prop type (default: 10.0 meters)
  • interactionRadius: How close player must be to the prop to craft and see the tip (default: 2.0 meters)

How It Works

  1. System continuously scans around the player for configured props
  2. When player is within searchRadius of a prop type, it's detected
  3. When player is within interactionRadius, a proximity tip is displayed showing the prop name
  4. Player presses the craft keybind (default: F2) to access categories
  5. Crafting menu opens with available recipes from that prop

Key Features

  • Automatic Detection: No fixed coordinates needed - works with any instance of the prop
  • Dynamic: Detects all props of the configured type within search radius
  • Proximity Tips: Shows helpful tip when player is near an interactive prop
  • Flexible: Same prop type can be used anywhere in the world
  • Priority System: Closest prop/table gets priority if multiple are nearby

Differences from CraftingTables

Feature CraftingTables CraftingProps
Location Fixed coordinates Dynamic detection around player
Setup Define exact position Define prop model only
Flexibility Specific locations only Any prop of that type works
Use Case Buildings, permanent stations Campfires, anvils, portable items
Blips Supported Not supported
Proximity Tip Yes Yes
Coverage Area-based (radius) Object-based (near prop)

Export Functions

lua
-- Get nearby props player can interact with
local props = exports['murphy_craft']:GetNearbyCraftingProps()
-- Returns: array of prop configs player is near
-- Get all nearby categories (includes tables, props, and basics)
local categories = exports['murphy_craft']:GetNearbyCraftingCategories()
-- Returns: array of category names

Example Use Cases

Campfire Cooking

lua
{
name = "Campfire",
prop = "p_campfire02x",
cat = { "cuisinier", "food" },
searchRadius = 15.0, -- Detect campfires within 15m
interactionRadius = 2.0, -- Must be within 2m to craft
}
  • Allows cooking at any campfire in the world
  • Players see "Campfire" tip when within 2m
  • Perfect for outdoor cooking

Blacksmith Anvil

lua
{
name = "Forge",
prop = "p_anvil01x",
cat = { "armurier", "bricoleur" },
searchRadius = 12.0,
interactionRadius = 3.0,
}
  • Works at any anvil prop
  • Access weapon crafting and tinkering
  • Realistic smithing locations

Butcher Table

lua
{
name = "Butcher Table",
prop = "p_table29x",
cat = { "food" },
searchRadius = 10.0,
interactionRadius = 1.5,
}
  • Process meat at butcher tables
  • Tight interaction radius for precision
  • Works at any table of this type

Tips & Best Practices

  • Search Radius: Use larger values (15-20m) for sparse props, smaller (8-10m) for common ones
  • Interaction Radius: Keep between 1.5-3.0m for realistic interaction
  • Performance: Props are checked every 500ms - efficient for many props
  • Compatibility: Works alongside CraftingTables and CraftingStations
  • No Spawning Required: Props already in the world are automatically detected
  • Multiple Props: If multiple props of same type are nearby, closest one takes priority

Troubleshooting

Prop not detected?

  • Verify prop model name is correct (use freecam and native to check)
  • Increase searchRadius temporarily to test
  • Check if prop is actually spawned in world

Tip not showing?

  • Ensure player is within interactionRadius
  • Check if another closer table/station/prop is taking priority
  • Verify name field is set correctly

Can't craft?

  • Confirm cat array contains valid category names from your Craft configs
  • Check recipe requirements are met
  • Verify player has needed items in inventory

Last updated: February 19, 2026