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 resource. When disabled, machines, the compact set, 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. Use one permission or a list; any match grants access.commandis the ACE permission, and the remaining defaults are the ESX admin groups.Example:
luapermission = {"command", "admin", "superadmin", "owner"}
#interaction
How players use the spots on every machine and compact prop.
"points"showszyke_libinteraction markers, used with E while looking at them."target"usesox_targetorqb-targetthroughzyke_lib, with a box on each part of the machine.Example:
luainteraction = "points"
#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. Use one permission or a list; any match grants access. These are permission identifiers and groups, not job names.
Example:
luapermission = {"command", "admin", "superadmin", "owner"}
#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
truelets anyone empty the whole bin and take any part back off the infeed.falsekeeps each character's output for themselves, while the heap in the bin still shows everyone's.Example:
luashared = true
#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.The compact set plays the key prefixed with
compactwhen one exists, such ascompactMotororcompactGeneratorLoop, and the scrapyard shredder's sound otherwise.plugis the cable going into or coming out of a socket.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}, compactMotor = {name = "machines/compact_motor.wav", volume = 0.2, distance = 18.0}, plug = {name = "machines/cable_plug.wav", volume = 0.2, distance = 6.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 scrapyard shredder. In the paths below, <machine> means one entry. Compact shredders are set up by players and are not listed here; see Compact Set.
#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 scrapyard shredder. Starting the shredder cranks the generator first, and it runs along with it. The portable generator has its own settings under compact.generator.
#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}}
#Compact Set
Settings under Config.Settings.shredder.compact cover the compact shredder, portable generator, power cable, and catch crate that players carry as items. See Compact Shredder for how the set is used.
#compact.enabled
Enables the compact set. When disabled, its items are not registered and no props load.
Example:
luaenabled = true
#compact.items
Inventory items that set up each prop when used. The generator's item must not stack, since it stores the diesel left in its tank.
Example:
luaitems = {shredder = "shredder_compact", generator = "shredder_generator", box = "shredder_box"}
#compact.admin
Command and permission for setting up or removing compact props without the item or the wait. See Commands.
Example:
luaadmin = { command = "shreddercompact", permission = {"command", "admin", "superadmin", "owner"}, }
#compact.placement.maxDistance
Furthest distance from the player at which a prop can be set up.
Example:
luamaxDistance = 3.0
#compact.placement.maxSlope
Steepest ground a prop can stand on, in degrees.
Example:
luamaxSlope = 12.0
#compact.placement.maxPerPlayer
Most props of each kind one character can have set up at once.
0removes the limit.Example:
luamaxPerPlayer = 2
#compact.placement.setupSeconds
Duration of the progress bar that sets a prop up.
Example:
luasetupSeconds = 8.0
#compact.placement.packSeconds
Duration of the progress bar that packs a prop back into its item.
Example:
luapackSeconds = 6.0
#compact.placement.pickupDelaySeconds
Seconds a prop must stand before it can be packed up again.
0removes the wait.Example:
luapickupDelaySeconds = 60
#compact.placement.anim
Animation played while setting up and packing up.
Example:
luaanim = {dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", clip = "machinic_loop_mechandplayer", flag = 1}
#compact.placement.fuelOnPickup
What happens to the diesel in a generator that is packed up.
"keep"stores it in the item and returns it to the tank when set up again,"lose"empties the tank, and"refuse"only lets an empty generator be packed up.Example:
luafuelOnPickup = "keep"
#compact.access
Who may use a prop someone else set up, per action:
"owner"for the character who set it up, or"anyone". Admins withcompact.admin.permissionalways may. The rules are applied inserver/unlocked/can_checks.lua; edit them there for jobs, gangs, or keys. See Can-Check Hooks.Example:
luaaccess = { load = "anyone", operate = "anyone", collect = "anyone", refuel = "anyone", link = "anyone", pickup = "owner", }
#compact.cable
maxLengthis the furthest the cable reaches between the generator's outlet and the shredder's inlet. Carrying it further puts it back.itemis the inventory item a cable is: it leaves the inventory once plugged into a shredder, and whoever pulls it out at either end gets it back.item = falsegives every generator a cable of its own.Example:
luacable = {maxLength = 8.0, item = "shredder_cable"}
#compact.dockDistance
A catch crate set up this close to a shredder's outlet snaps into place and docks.
Example:
luadockDistance = 0.8
#compact.switchAnim
Animation for reaching down to the shredder's control panel, the generator's key switch, and its socket.
Example:
luaswitchAnim = {dict = "pickup_object", clip = "pickup_low", flag = 48}
#compact.shredTimeMultiplier
Every recipe's shred time is multiplied by this in the compact shredder.
Example:
luashredTimeMultiplier = 1.6
#compact.shaftRpm
Cutter shaft speed of the compact shredder in RPM.
Example:
luashaftRpm = 18
#compact.idleStopSeconds
Seconds a running compact shredder waits without a part before stopping.
0keeps it running.Example:
luaidleStopSeconds = 60
#compact.overheat
The compact shredder's own thermal cutout, read like overheat. The small cutters trip after about 30 pieces cut back to back. It is enabled separately from the scrapyard shredder's; add
enabled = falseto turn it off.Example:
luaoverheat = { limit = 30, resumeAt = 12, coolPerMinute = {running = 5, stopped = 15}, }
#compact.jam
The compact shredder's own jam settings, read like jam. By default it jams twice as often as the scrapyard shredder. It is enabled separately; add
enabled = falseto turn it off.Example:
luajam = { chance = 0.12, maxReversals = 2, }
#compact.effectScale
Size of the sparks and dust from the hopper, as a share of the scrapyard shredder's.
Example:
luaeffectScale = 0.5
#compact.box.capacity
Pieces the catch crate holds. A part only goes in the hopper while the docked crate has room for the most it can give. An empty crate takes any part.
Example:
luacapacity = 12
#compact.box.shared
truelets anyone at the crate take what is in it.falsekeeps each character's output for themselves. A crate cannot be packed up while anything is in it.Example:
luashared = true
#compact.generator
The portable generator, read like Generator. It has its own switch and burns diesel for as long as it runs, whether the shredder does or not. It takes the cans from
generator.fuelItems.Example:
luagenerator = { requireFuel = true, tank = 15.0, startFuel = 0.0, burnPerMinute = 0.35, exhaust = {asset = "scr_recartheft", name = "scr_wheel_burnout", scale = 0.04, intervalMs = 1500, color = {0.22, 0.21, 0.2}, startPuffs = 4, startColor = {0.08, 0.08, 0.08}}, }
#compact.fumes.enabled
Enables exhaust fumes from a portable generator running indoors. Outdoors, nothing builds up.
Example:
luaenabled = true
#compact.fumes.bucketsAreIndoors
Counts every routing bucket other than
0as indoors, for instanced apartments and shells. Props set up inside a game interior always count as indoors. Custom rules belong in the indoor Can-Check Hooks.Example:
luabucketsAreIndoors = true
#compact.fumes.risePerMinute
Fume level gained per minute while an indoor generator runs. The level runs from
0to100.Example:
luarisePerMinute = 10.0
#compact.fumes.fallPerMinute
Fume level lost per minute while the generator is off.
Example:
luafallPerMinute = 15.0
#compact.fumes.thresholds
Levels at which each stage begins. At
haze, smoke hangs around the generator. Atcough, nearby players cough and their view dims. Atdamage, they lose health. Atstall, the engine chokes and stops.Example:
luathresholds = {haze = 25, cough = 50, damage = 75, stall = 100}
#compact.fumes.restartBelow
Level the fumes must fall below before a stalled generator can start again.
Example:
luarestartBelow = 40
#compact.fumes.radius
Distance from the generator within which players are affected.
Example:
luaradius = 10.0
#compact.fumes.damage
Health lost every
intervalSecondsat the damage stage.Example:
luadamage = {amount = 4, intervalSeconds = 5}
#compact.fumes.haze
Smoke particles shown around the generator from the haze stage.
Example:
luahaze = {asset = "scr_recartheft", name = "scr_wheel_burnout", scale = 0.6, intervalMs = 900, color = {0.35, 0.34, 0.33}}
#compact.fumes.cough
Cough animation and how often it plays.
Example:
luacough = {dict = "timetable@gardener@smoking_joint", clip = "idle_cough", flag = 49, intervalSeconds = 9}
#compact.fumes.screen
Timecycle modifier that dims the view, reaching
strengthonce the level is atstall.Example:
luascreen = {modifier = "BarryFadeOut", strength = 0.5}
#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}, }, }