How to add new strain?

  • In the shared/config.lua file, there is a table named "strains" where you can create an unlimited number of weed strains. In the image, you have an example of how to create strains. "p_haze" and "p_haze_seed" must be added to your items inside the inventory (or if you use qb-core, then shared/items.lua). The name of the table and the seed key must always be added to your items.

  • There is also table named "items" where you can edit items for pot, fertilizer, water and reward item, those item also needs to be added in your inventory or wherever you need to put your items

qb-core/shared/items.lua example

['p_haze'] = {
        name = 'p_haze',
        label = 'Purple Haze',
        weight = 100,
        type = 'item',
        image = 'p_haze.png',
        unique = true,
        useable = false,
        shouldClose = true,
        combinable = nil,
        description = 'Weed strain type: purple haze'
    },

    ['p_haze_seed'] = {
        name = 'p_haze_seed',
        label = 'Purple Haze Seed',
        weight = 100,
        type = 'item',
        image = 'p_haze_seed.png',
        unique = true,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Purple Haze Seed'
    },

    ['weedpot'] = {
        name = 'weedpot',
        label = 'Weed Pot',
        weight = 100,
        type = 'item',
        image = 'weedpot.png',
        unique = true,
        useable = false,
        shouldClose = false,
        combinable = nil,
        description = 'Weed Pot'
    },

    ['fertilizer'] = {
        name = 'fertilizer',
        label = 'Fertilizer',
        weight = 100,
        type = 'item',
        image = 'fertilizer.png',
        unique = true,
        useable = false,
        shouldClose = false,
        combinable = nil,
        description = 'fertilizer'
    },

    ['cannabis'] = {
        name = 'cannabis',
        label = 'Canabis',
        weight = 100,
        type = 'item',
        image = 'cannabis.png',
        unique = true,
        useable = false,
        shouldClose = false,
        combinable = nil,
        description = 'Canabis'
    },

ox_inventory/data.items.lua example

['p_haze_seed'] = {
		label = 'Purple Haze Seed',
		weight = 20,
		stack = true,
		close = true,
		client = {
			export = "uniq-weedplant.plantNewSeed",
		}
	},

	['p_haze'] = {
		label = 'Purple haze',
		weight = 150,
		stack = true,
		close = false,
	},

	['weedpot'] = {
		label = 'Weed Pot',
		weight = 500,
		stack = true,
		close = false,
	},
	
	['fertilizer'] = {
		label = 'Fertilizer',
		weight = 100,
		stack = true,
		close = false
	},

	['cannabis'] = {
		label = 'Cannabis',
		weight = 500,
		stack = true,
		close = false
	},

Last updated