Garry's Mod

Garry's Mod

134 ratings
Universal Crafting System
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Roleplay
File Size
Posted
Updated
56.864 KB
5 Jul, 2019 @ 1:06pm
30 May @ 10:20pm
38 Change Notes ( view )

Subscribe to download
Universal Crafting System

Description
This is a simple, yet highly customizable crafting table made to work with all gamemodes.

Features:
  • Not hard coded to accept specific entities like other crafting systems.

  • Accepts any entity as an ingredient and/or craftable item. (As long as the item is configured correctly.)

  • Allows for an infinite amount of new items to be added.

  • Button that allows players to manually remove ingredients from the table.

  • Extra ingredients leftover after crafting an item stay in the table for another use.

  • Customizable sounds, UI colors, table appearance, table health, and item spawn function. Some elements such as sounds, table appearance, and table health can be customized in-game as long as you're a superadmin.

  • Comes with HL2 and DarkRP weapon support by default.

  • Comes with rock and tree entities that players can mine with a crowbar to obtain crafting ingredients.

  • Includes category support for large amounts of items.

  • Icons next to each recipe to let the player know if it's able to be crafted, close to having enough materials to be crafted, or can't be crafted.

  • Developer functions to help addon and server developers integrate their own systems with this one. You can find more info about that here.[github.com]

  • Automation option that allows users to tell the table to repeatedly craft a certain item as long as it has enough ingredients.

Other Versions:
I've made other versions of this addon with special features for specific servers. If you're looking for a specific feature that this version doesn't have, one of these versions might have it. Please note that I do not give any support for these versions.
  • Blueprint Version[github.com] - Requires players to place a blueprint of the specified crafting item near the table before being able to craft said item. Items can also be configured to not require a blueprint so it can be crafted like normal.

  • Table Type Version[github.com] - Allows developers to make more than one table with different items. Useful if you want a separate item list for different teams.

FAQs:

How do I craft an item?
Simply touch the required ingredients with the table and it will accept it. After all of the required items are in the table, click the craft items button and select the item you want to craft, then press the craft button and your item will spawn below the table.

How do I create new items or customize the table?
You cannot add new items in the workshop version. You will need to download or clone the GitHub version[github.com], go to 'lua/entities/crafting_table', open the shared.lua file, and follow the instructions from there. To customize the table, you can either use the limited in-game customization options in the workshop version, or download the GitHub version and navigate to the craft_config.lua file in 'lua/autorun' to have access to the full customization options.

Why do rocks/trees spawn invisible after a map change?
This can happen when you save rocks or trees with a perma prop system that saves an entity's color data. If the server shuts down or changes levels while a rock or tree is in it's "mined" state, the entity can become permanently stuck like that. You can prevent this by using a more simplistic perma-prop system that doesn't save this data, or by writing a script that spawns rocks/trees at hard-coded coordinates.
It's also possible for this to happen if you set a custom model for rocks/trees that is either invalid or corrupted.

Will you help me with [thing I want to do]?
If you are having issues changing values in the config or creating new items, I will guide you through the process. I will NOT generate whole configs for you, or help you make a customized version of the addon to suit your needs. If you want a more advanced level of customization that exceeds what is possible with the default configs, you will have to do it yourself.

[github.com]
105 Comments
OPGman  [author] 16 Jan, 2023 @ 9:34am 
the only way to access the crafting menu is through the table, and support for other ways of accessing the menu is not planned as I only make bug fixes and very minor improvements for this addon now
thunkinator 16 Jan, 2023 @ 2:27am 
If this is still being worked on, is there a way to make this system not bound to a table, but instead a bind?
Omen 15 Aug, 2021 @ 4:53am 
finally, i dont have to keep using jmods workbench with its config entirely resetting everytime only 1 mistake goes wrong, i owe you one!
OPGman  [author] 25 Apr, 2021 @ 11:02am 
I really don't have the time to offer support for custom stuff like that, so you will have to figure that out on your own. Sorry.
OPGman  [author] 23 Apr, 2021 @ 9:56am 
No the name of the main folder doesn't matter
OPGman  [author] 23 Apr, 2021 @ 9:08am 
The zip file needs to be extracted and the folder structure should look something like this: garrysmod/addons/crafting-system/lua
Saros 23 Feb, 2021 @ 10:28am 
Much appreciated, thank you dude.
OPGman  [author] 23 Feb, 2021 @ 9:44am 
Run that function in a loop. For example, this will spawn 5 items on top of each other, with self being the crafting table entity:

for i = 1, 5 do
local e = ents.Create( "screw" )
e:SetPos( self:GetPos() + Vector( 0, 0, i * 5 ) )
e:Spawn()
end
Saros 23 Feb, 2021 @ 5:10am 
Relatively new to LUA and I'm using the GitHub version, tried looking for an answer but there didn't seem to be any in the comments. Is there a way for me to make a recipe that spawns multiple of an item? I've tried " local e = ents.Create ( "screw", 5 ) " but only one of the item spawns. Any help would be appreciated, thanks in advance.
matteo 17 Feb, 2021 @ 8:41pm 
someone should make a customization for the wasteland weaponry mod!!!!