Installation

The steps to correctly install this on your server.

Step 1 - Install Resource

Download the resource from your keymaster, add it to your resources in any folder of your choice.

Step 2 - Inventory

  1. Add the inventory item below to mythic-inventory/items/tools.lua

{
    name = "crafting_bench",
    label = "Crafting Bench",
    price = 2000,
    isUsable = true,
    isRemoved = false,
    isStackable = false,
    type = 3,
    rarity = 2,
    closeUi = true,
    metalic = true,
    weight = 0.5,
},
  1. Replace ignoredFields in mythic-inventory\ui\src\components\Inventory\Tooltip.jsx with the code below and rebuild your inventory, instructions on rebuilding resources can be found in the official Mythic Framework Discord.

const ignoredFields = [
	'ammo',
	'clip',
	'CreateDate',
	'Container',
	'Quality',
	'mask',
	'accessory',
	'watch',
	'hat',
	'BankId',
	'VpnName',
	'EvidenceCoords',
	'EvidenceType',
	'EvidenceWeapon',
	'EvidenceDNA',
	'WeaponTint',
	'CustomItemLabel',
	'CustomItemImage',
	'Items',
	'Department',
	'Scratched',
	'PoliceWeaponId',
	'Mugshot',
	'MethTable',
	'CustomAmt',
	'Brew',
];
  1. Update the schematic component code in mythic_inventory/server/crafting.lua with the code below, you can find it around line 240.

Schematics = {
	Has = function(self, bench, item)
		if _types[bench] ~= nil then
			for k, v in ipairs(_types[bench].recipes) do
				if v.schematic == item then
					return true
				end
			end
		end

		return false
	end,
	Add = function(self, bench, item, dontInsert)
		if _types[bench] ~= nil and _schematics[item] ~= nil then
			if not Crafting.Schematics:Has(bench, item) then
				Database.Game:insertOne({
					collection = "schematics",
					document = {
						bench = bench,
						item = item,
					},
				})

				local f = table.copy(_schematics[item])
				f.schematic = item
				Crafting:AddRecipeToBench(bench, item, f)
			end
		end

		return false
	end,
	AddNoInsert = function(self, bench, item)
		if _types[bench] ~= nil and _schematics[item] ~= nil then
			if not Crafting.Schematics:Has(bench, item) then
				local f = table.copy(_schematics[item])
				f.schematic = item
				Crafting:AddRecipeToBench(bench, item, f)
			end
		end

		return false
	end,
},
  1. Add the crafting_bench.webp image to your inventory images folder in mythic/inventory/ui/images/items/.

Step 3 - Edit Config

  • If you have renamed mythic-base at all then you can edit the calls for that in ff_delivery/configs/shared.lua the field to edit is called SharedConfig.BaseName = "mythic-base". Just simply change the string content to the name of your mythic framework base.

  • If you wish to change the bench prop you can do that by changing the string SharedConfig.BenchProp in ff_dealerheist/configs/server.lua.

Step 4 - Ensuring Resource

Open your server.cfg file and at the bottom of your resources make sure to ensure the reason by typing ensure ff_delivery and then saving your file.

Step 5 - Items

  1. Add a way for the inventory item crafting_bench to be obtained in your server, I would recommend the hardware store.

  2. Add a way for item schematics to be obtained in your server, without schematics the bench won't have any crafting functionality.

Last updated