Skip to content

Dismantle Items

Dismantle items are defined in /data/dismantle.lua.

Items are defined with key, value pairs. Key serves as the ID of the recipe and will be used to refer by the code.

Options

  • itemName string — The item name of the item being dismantled

  • label? string — Setting this option will override the original item label

  • category string — The label used to group the item in the NUI

  • description? string — Description of the item shown in the NUI, will use the default description if not defined

  • time number — Dismantling time in second

  • level? number — Level required to use this recipe, you must set enableLevel to true in settings.lua to use this option

  • exp? number — Exp given to the player when the dismantling is done, you must set enableLevel to true in settings.lua to use this option

  • recipe table[] — Items given to the player after dismantling

    • itemName string
    • count number
  • tools? table[] — Items required to dismantle the item, but will not be consumed

    • itemName string
    • count number

Examples

lua
local dismantles = {
    ['clothe'] = {
        itemName = 'clothe',
        recipe = {
            {itemName = 'wool', count = 2},            
        },
        level = 1,
        category = 'Medical',
        time = 5,
    },
}

return dismantles