Config
Explanations and examples for the current shredder configuration.
Edit zyke_shredder/shared/unlocked/config.lua. Distances are metres, belt speeds are metres per second, and durations ending in Ms are milliseconds. Fuel amounts are litres.
Keybinds can be changed in GTA / FiveM settings. Framework, inventory, and webhook settings live in zyke_lib. Recipes are not part of the config; manage them in the Admin Panel.
#Full Default Config
#Config.Settings.shredder
#enabled
Enables the shredder. When disabled, machines, the buyer, and item registration do not load.
Example:
luaenabled = true
#placement.command
Command that prints a ready
coordsline for a machine at the player's position and heading to the F8 console.Example:
luacommand = "shredderpos"
#placement.permission
Permission checked by the placement command through
zyke_lib.Example:
luapermission = "command"
#admin.enabled
Enables the admin panel.
Example:
luaenabled = true
#admin.command
Command that opens the admin panel.
Example:
luacommand = "shredderadmin"
#admin.permission
Permission checked on both client and server for the admin panel. This is a permission identifier, not a job name.
Example:
luapermission = "command"
#logs.enabled
Writes every shredder action to the
zyke_shredder_logstable and sums it per day inzyke_shredder_statsfor the admin panel. Discord logs are separate; seeserver/unlocked/hooks.luaand thezyke_libwebhooks.Example:
luaenabled = true
#logs.keepDays
Removes log rows older than this many days on start and once a day.
0keeps every row. Daily statistics are always kept.Example:
luakeepDays = 90
#logs.refusals
Logs actions the server turned down. Set to
falseto leave them out.Example:
luarefusals = true
#speeds
Belt speeds in metres per second and the cutter shaft speed in RPM. At
0.3, a part takes about ten seconds to reach the hopper.Example:
luaspeeds = {infeed = 0.3, outfeed = 0.25, shaftRpm = 24}
#feed.seconds
Duration of the loading animation in seconds. The part leaves the inventory when it is placed on the belt.
Example:
luaseconds = 1.5
#feed.anim
Animation played while loading a part.
Example:
luaanim = {dict = "mp_common", clip = "givetake1_a", flag = 48}
#feed.reach
Furthest distance from either side of the belt's lower end at which a player can load or unload parts.
Example:
luareach = 0.8
#maxLoads
Maximum parts on the infeed or in the cutters at once.
Example:
luamaxLoads = 6
#idleStopSeconds
Seconds a running shredder waits without parts before stopping.
0keeps it running.Example:
luaidleStopSeconds = 120
#overheat.enabled
Enables the thermal cutout. Each piece of scrap cut adds one heat. At the limit, the machine stops with its parts in place, the warning lamp lights, and smoke rises from the hopper.
Example:
luaenabled = true
#overheat.limit
Heat at which the thermal cutout stops the machine. A full line trips it after about 130 pieces.
Example:
lualimit = 100
#overheat.resumeAt
Heat the machine must cool to before it can start again.
Example:
luaresumeAt = 40
#overheat.coolPerMinute
Heat lost per minute while running and while stopped. Heat is saved with the machine and cools at the stopped rate while the server is down.
Example:
luacoolPerMinute = {running = 10, stopped = 30}
#jam.enabled
Enables jams. A jammed part stalls the shafts, which reverse briefly to free it and then continue cutting.
Example:
luaenabled = true
#jam.chance
Share of parts that jam, from
0to1.0.06is about one part in sixteen.Example:
luachance = 0.06
#jam.maxReversals
Maximum times one part can jam on its way through.
Example:
luamaxReversals = 2
#spawnDistance
Distance from a machine at which its props spawn.
Example:
luaspawnDistance = 120.0
#animateDistance
Distance from a machine at which its moving parts are animated.
Example:
luaanimateDistance = 60.0
#reach
Furthest distance from the control pedestal or the bin at which a player can use them.
Example:
luareach = 2.0
#bin.capacity
Pieces of scrap the bin holds. A part only enters the cutters once the bin has room for its output; until then, the infeed holds it at the top and no more parts can be loaded.
Example:
luacapacity = 60
#bin.shared
falsekeeps each character's output for themselves.truelets anyone empty the whole bin.Example:
luashared = false
#bin.seconds
Duration of the collecting animation in seconds.
Example:
luaseconds = 2.5
#bin.anim
Animation played while collecting from the bin.
Example:
luaanim = {dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", clip = "machinic_loop_mechandplayer", flag = 1}
#outputModels
Model shown on the outfeed for each output item. Items without an entry show as steel scrap.
Example:
luaoutputModels = { scrap_steel = "zyke_shredder_scrap_steel", catalyst_powder = "zyke_shredder_scrap_fines", }
#fallbackProp
Model used for parts whose own prop is not streamed, such as clamps without
zyke_wheelclamprunning.Example:
luafallbackProp = "zyke_shredder_scrap_steel"
#sounds
Sounds files played at the machine, with volume and distance. A list of names plays one at random. Remove a line to leave that sound out. Keep the volumes of
start,motor,jam, andstoptogether, and likewise the four generator sounds, since each group is mixed to the same level.Example:
luasounds = { motor = {name = "machines/shredder_motor.wav", volume = 0.35, distance = 40.0}, pour = {name = "machines/diesel_pour.wav", volume = 0.14, distance = 3.0}, }
#effects
Particles thrown from the hopper while parts are cut, repeated every
intervalMs.colortints supported effects,0to1per channel.overheatis the smoke shown while cooling; remove it to leave the smoke out.Example:
luaeffects = { sparks = {asset = "core", name = "ent_brk_sparking_wires", scale = 1.4, intervalMs = 300}, dust = {asset = "scr_recartheft", name = "scr_wheel_burnout", scale = 0.3, intervalMs = 650, color = {0.55, 0.53, 0.5}}, }
#Machines
Each entry in Config.Settings.shredder.machines places one shredder. In the paths below, <machine> means one entry.
#machines.<machine>.id
Unique key for everything saved for the machine: its bin, tank, heat, and loaded parts. Keep it once the machine is in use.
Example:
luaid = "sandy_scrapyard"
#machines.<machine>.label
Name shown for the machine.
Example:
lualabel = "Scrapyard Shredder"
#machines.<machine>.coords
Ground point under the cutting chamber, with
was the heading the infeed runs along. The loading end sits 3 metres behind, the pedestal beside it on the right, the bin 2.5 metres to the right, and the generator 2.4 metres to the left. Use/shredderposto print a ready line.Example:
luacoords = vec4(2427.2236328125, 3129.0163574219, 48.175247192383, 200.0)
#machines.<machine>.snapToGround
Drops the machine onto the ground under
coords.Example:
luasnapToGround = true
#machines.<machine>.blip
Map marker for the machine. Set
enabled = falseto hide it.Example:
luablip = {enabled = true, sprite = 527, color = 17, scale = 0.7}
#Generator
The diesel generator beside the drive powers the shredder. Starting the shredder cranks the generator first, and it runs along with it.
#generator.requireFuel
trueburns diesel while the shredder runs, stops the shredder when the tank is empty, and lets players fill it at the filler.falseneeds no fuel and the generator only starts and stops with the shredder.Example:
luarequireFuel = true
#generator.tank
Litres the tank holds.
Example:
luatank = 40.0
#generator.startFuel
Litres in the tank before anyone has filled it.
Example:
luastartFuel = 0.0
#generator.burnPerMinute
Litres burned per minute while the shredder runs.
Example:
luaburnPerMinute = 1.0
#generator.fuelItems
Usable can items and the litres each holds when full. A can keeps its remaining litres in metadata; pouring stops when the tank is full, and empty cans are kept.
Example:
luafuelItems = { diesel_can = 20.0, }
#generator.litreWeight
Grams each litre adds on top of the empty can's item weight. Only inventories that weigh metadata use it, such as ox_inventory. The can's durability bar shows how full it is.
Example:
lualitreWeight = 1000
#generator.can
Carry animation and prop. Using a can takes it out and carries it at the side until it is used again. A different model needs its own
posandrot.Example:
luacan = { anim = {dict = "move_weapon@jerrycan@generic", clip = "idle"}, prop = {model = "w_am_jerrycan", bone = 28422, pos = vec3(0.2856, 0.0187, -0.0093), rot = vec3(-90.0, 0.0, 90.0)}, }
#generator.pour
Litres poured per second and the pouring animation.
Example:
luapour = { litresPerSecond = 3.5, anim = {dict = "weapon@w_sp_jerrycan", clip = "fire", flag = 1}, }
#generator.exhaust
Smoke from the stack: a burst of
startPuffsdark puffs as the engine catches and a light haze everyintervalMswhile running.intervalMs = 0leaves the haze out.Example:
luaexhaust = {asset = "scr_recartheft", name = "scr_wheel_burnout", scale = 0.08, intervalMs = 1200, color = {0.22, 0.21, 0.2}, startPuffs = 6, startColor = {0.08, 0.08, 0.08}}
#Scrap Buyer
The scrap buyer pays for shredder output. See Scrap Buyer for how demand and orders work.
#buyer.enabled
Enables the scrap buyer.
Example:
luaenabled = true
#buyer.payoutAccount
Account the buyer pays into, such as
cash,bank, orblack_money.Example:
luapayoutAccount = "cash"
#buyer.market.maxShare
Highest share of an item's price the buyer pays. Demand is shared by all players and saved in the database.
Example:
luamaxShare = 0.4
#buyer.market.minShare
Once demand falls below this share, the buyer stops buying that item.
Example:
luaminShare = 0.1
#buyer.market.reopenShare
Share demand must recover to before a closed item is bought again.
Example:
luareopenShare = 0.15
#buyer.market.dropPerSale
Share removed for every piece sold outside an order.
Example:
luadropPerSale = 0.002
#buyer.market.recoverPerHour
Share recovered per hour.
Example:
luarecoverPerHour = 0.1
#buyer.rerollMinutes
Minutes before each character's order is replaced, whether or not it was delivered. Every character's timer runs separately.
Example:
luarerollMinutes = 45
#buyer.orderSize
Different items in one order. Pieces toward the order pay full price and do not affect demand.
Example:
luaorderSize = 3
#buyer.items
Items the buyer accepts.
priceis the full price of one piece,wantedis the amount range an order asks for, andweightis how often orders pick the item. Leavewantedout to buy an item without ever ordering it.Example:
luaitems = { scrap_steel = {price = 30, wanted = {min = 12, max = 20}, weight = 5}, scrap_glass = {price = 6}, }
#buyer.positions
Buyer peds.
coordsis where the player stands to talk, withwas the ped's heading. Setblip.enabled = falseto hide the map marker.Example:
luapositions = { { label = "Scrap Buyer", model = "s_m_y_dockwork_01", coords = vec4(2403.51, 3127.95, 48.15, 250.0), scenario = "WORLD_HUMAN_CLIPBOARD", blip = {enabled = true, sprite = 500, color = 17, scale = 0.7}, }, }