[Release][ESX] Crafting System

salty_crafting

Crafting system for FiveM using EssentialMode Extended (ESX) inventory and item system.
Screenshot

Features

Using the existing items and inventory system in ESX, players can craft new items using predefined recipes. Recipes can create new ESX items or weapons.

Setup

This resource uses and requires ESX. ESX must be installed and working. In addition, this resource assumes that you have items already setup. In order to add items to ESX, add them to the items table of your database.

The configuration of this resource is done entirely in the config.lua file.

Configuration

Recipes are defined in tables with the following structure:

['resultingItemName'] = {
    { item = "ingredient1", quantity = 2, remove = true },
    { item = "ingredient2", quantity = 3 },
},

In the example above, the resultingItemName requires two “ingredient1” and three “ingredient2”. NOTE: These are all based on the name field of the item in the database, not the label field. There is no limit on the amount of recipes you can create, nor the amount of ingredients each recipe can have. The remove parameter is optional. remove = false will prevent the ingredient item from being removed from the player’s inventory. remove will default to true if not specified.

The Crafting Menu can be made available either through a “store” where a player must visit a specified location on the map, or through a keyboard shortcut. Both of these options may be configured through the config.lua file.

Download

This resource is available on GitHub: https://github.com/SaltyGrandpa/salty_crafting

Notes

This resource uses NUI callbacks. If you rename the resource, it will break. If you must rename it, no support will be offered. Anything you should need to customize is in the config.lua file. Let me know if you want options added, I can add them in when time allows.

43 Likes

Nice release man. Do you plan to keep this updated, or are you done with the project?

I suppose it depends on your definition of keeping it updated. If any bugs or exploits are found, I’ll gladly patch them. And if ESX updates and breaks compatibility, I’ll update it to be compatible. That said, I’m not personally using this on my server and made it for funzies, so I don’t think many new features will come for the foreseeable future, unless they’re heavily requested.

1 Like

Yeah that was more or less what I was asking.

Very nice release, hope to see more like this.

2 Likes

It’d be real neat if there was a configuration option that allowed some items to not be removed from the inventory but rather just to be required.

Either that or have it so you can give multiple of the same item in one hit.

I could add a remove toggle pretty easily that allows you to keep the item. I’ll add it in sometime later today.

3 Likes

Added the optional remove parameter to the recipes table as @iceybeta requested. OP updated to include details on it’s usage.

2 Likes

You sexy bastard! This is awesome. I was literally thinking of a crafting system. And the UI looks juicy!
You saved my life bro!
I would never have done this as good!
Now I’m just waiting for a esx skills mod… praying to the esx gods…:eyes:

3 Likes

++1


Love it

1 Like

What a great idea. Looks like a fun way of providing some commonly needed items.

You did it Salty - thx :wink: best Team ever ;))))

1 Like

Hello i have a problem with this scipt i can’t close crafting menu any idea whats happend? :wink:

The script works perfectly for me.

ESC will close the menu. I should/maybe/will add a close button.

Or you renamed the resource and broke the NUI callback.

Now Works Thank You :slight_smile:

2 Likes

Do you think is possible to add a quantity for the item ?

Like this .

	["craking", quantity = 1] = { 
	{item = "computer", quantity = 1, remove = true }, 
	{item = "cd", quantity = 5, remove = true },

this can be cool for drugs or other idea of item

1 Like

you can add anthing that there are items for, its very customisable

i ask about the finish item… not ingredient , in the config you can only receive one item .

@Algoma I understand your request, I’ve had a user PM me as well with the same request. Could you open a GitHub issue with this and I’ll get around to it when time allows? I have one other feature request queued as well.

1 Like

dont worries i do it , thanks

1 Like