Recipe Variables (craftingrecipes.lua)
name -- Internal name matching inventory system
label -- Display name in UI
threeD -- 3D model display (false for custom weapons)
requiredXp -- XP needed to unlock
rewardXP -- XP gained from crafting
craftDuration -- Crafting time in milliseconds
repairDuration -- Repair time in milliseconds (weapons only)
description -- Item description
heading -- Model rotation
proximity -- Required distance of model from camera
model -- Prop model
image -- UI image
requiredMaterials -- Crafting materials array
requiredRepairMaterials -- Repair materials array (weapons)
quantity -- quantity of item to give at once
Recipe Types:
['repairkit'] = {
name = "repairkit",
label = "Repair Kit",
threeD = false,
requiredXp = 10,
rewardXP = 5,
craftDuration = 15000,
description = "Vehicle repair kit",
model = 'prop_toolchest_01',
image = 'repairkit.png',
quantity = 2,
requiredMaterials = {
{name = "metalscrap", label = 'Metal scrap', amount = 1},
{name = "steel", label = 'Steel', amount = 2}
}
}
['weapon_pistol'] = {
name = "weapon_pistol",
label = "Pistol",
threeD = true,
requiredXp = 0,
rewardXP = 10,
craftDuration = 120000,
repairDuration = 15000,
description = "Standard pistol",
image = 'weapon_pistol.png',
requiredMaterials = {
{name = "barrel", label = 'Barrel', amount = 1},
},
}
Custom Weapons or Weapons without 3d crafting(Do not use this format if you're using weaponmodelmap to map your custom weapons)
['weapon_custom'] = {
name = "weapon_custom",
label = "Custom Weapon",
threeD = false,
requiredXp = 50,
rewardXP = 15,
craftDuration = 120000,
repairDuration = 15000,
description = "Custom weapon",
image = 'weapon_custom.png',
requiredMaterials = {
{name = "part1", amount = 1}
},
requiredRepairMaterials = { --Required
{name = "part1", amount = 1}
}
}
Last updated