Documentation

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:

lua
enabled = true

#placement.command

Command that prints a ready coords line for a machine at the player's position and heading to the F8 console.

Example:

lua
command = "shredderpos"

#placement.permission

Permission checked by the placement command through zyke_lib.

Example:

lua
permission = "command"

#admin.enabled

Enables the admin panel.

Example:

lua
enabled = true

#admin.command

Command that opens the admin panel.

Example:

lua
command = "shredderadmin"

#admin.permission

Permission checked on both client and server for the admin panel. This is a permission identifier, not a job name.

Example:

lua
permission = "command"

#logs.enabled

Writes every shredder action to the zyke_shredder_logs table and sums it per day in zyke_shredder_stats for the admin panel. Discord logs are separate; see server/unlocked/hooks.lua and the zyke_lib webhooks.

Example:

lua
enabled = true

#logs.keepDays

Removes log rows older than this many days on start and once a day. 0 keeps every row. Daily statistics are always kept.

Example:

lua
keepDays = 90

#logs.refusals

Logs actions the server turned down. Set to false to leave them out.

Example:

lua
refusals = 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:

lua
speeds = {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:

lua
seconds = 1.5

#feed.anim

Animation played while loading a part.

Example:

lua
anim = {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:

lua
reach = 0.8

#maxLoads

Maximum parts on the infeed or in the cutters at once.

Example:

lua
maxLoads = 6

#idleStopSeconds

Seconds a running shredder waits without parts before stopping. 0 keeps it running.

Example:

lua
idleStopSeconds = 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:

lua
enabled = true

#overheat.limit

Heat at which the thermal cutout stops the machine. A full line trips it after about 130 pieces.

Example:

lua
limit = 100

#overheat.resumeAt

Heat the machine must cool to before it can start again.

Example:

lua
resumeAt = 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:

lua
coolPerMinute = {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:

lua
enabled = true

#jam.chance

Share of parts that jam, from 0 to 1. 0.06 is about one part in sixteen.

Example:

lua
chance = 0.06

#jam.maxReversals

Maximum times one part can jam on its way through.

Example:

lua
maxReversals = 2

#spawnDistance

Distance from a machine at which its props spawn.

Example:

lua
spawnDistance = 120.0

#animateDistance

Distance from a machine at which its moving parts are animated.

Example:

lua
animateDistance = 60.0

#reach

Furthest distance from the control pedestal or the bin at which a player can use them.

Example:

lua
reach = 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:

lua
capacity = 60

#bin.shared

false keeps each character's output for themselves. true lets anyone empty the whole bin.

Example:

lua
shared = false

#bin.seconds

Duration of the collecting animation in seconds.

Example:

lua
seconds = 2.5

#bin.anim

Animation played while collecting from the bin.

Example:

lua
anim = {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:

lua
outputModels = {
    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_wheelclamp running.

Example:

lua
fallbackProp = "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, and stop together, and likewise the four generator sounds, since each group is mixed to the same level.

Example:

lua
sounds = {
    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. color tints supported effects, 0 to 1 per channel. overheat is the smoke shown while cooling; remove it to leave the smoke out.

Example:

lua
effects = {
    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:

lua
id = "sandy_scrapyard"

#machines.<machine>.label

Name shown for the machine.

Example:

lua
label = "Scrapyard Shredder"

#machines.<machine>.coords

Ground point under the cutting chamber, with w as 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 /shredderpos to print a ready line.

Example:

lua
coords = vec4(2427.2236328125, 3129.0163574219, 48.175247192383, 200.0)

#machines.<machine>.snapToGround

Drops the machine onto the ground under coords.

Example:

lua
snapToGround = true

#machines.<machine>.blip

Map marker for the machine. Set enabled = false to hide it.

Example:

lua
blip = {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

true burns diesel while the shredder runs, stops the shredder when the tank is empty, and lets players fill it at the filler. false needs no fuel and the generator only starts and stops with the shredder.

Example:

lua
requireFuel = true

#generator.tank

Litres the tank holds.

Example:

lua
tank = 40.0

#generator.startFuel

Litres in the tank before anyone has filled it.

Example:

lua
startFuel = 0.0

#generator.burnPerMinute

Litres burned per minute while the shredder runs.

Example:

lua
burnPerMinute = 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:

lua
fuelItems = {
    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:

lua
litreWeight = 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 pos and rot.

Example:

lua
can = {
    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:

lua
pour = {
    litresPerSecond = 3.5,
    anim = {dict = "weapon@w_sp_jerrycan", clip = "fire", flag = 1},
}

#generator.exhaust

Smoke from the stack: a burst of startPuffs dark puffs as the engine catches and a light haze every intervalMs while running. intervalMs = 0 leaves the haze out.

Example:

lua
exhaust = {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:

lua
enabled = true

#buyer.payoutAccount

Account the buyer pays into, such as cash, bank, or black_money.

Example:

lua
payoutAccount = "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:

lua
maxShare = 0.4

#buyer.market.minShare

Once demand falls below this share, the buyer stops buying that item.

Example:

lua
minShare = 0.1

#buyer.market.reopenShare

Share demand must recover to before a closed item is bought again.

Example:

lua
reopenShare = 0.15

#buyer.market.dropPerSale

Share removed for every piece sold outside an order.

Example:

lua
dropPerSale = 0.002

#buyer.market.recoverPerHour

Share recovered per hour.

Example:

lua
recoverPerHour = 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:

lua
rerollMinutes = 45

#buyer.orderSize

Different items in one order. Pieces toward the order pay full price and do not affect demand.

Example:

lua
orderSize = 3

#buyer.items

Items the buyer accepts. price is the full price of one piece, wanted is the amount range an order asks for, and weight is how often orders pick the item. Leave wanted out to buy an item without ever ordering it.

Example:

lua
items = {
    scrap_steel = {price = 30, wanted = {min = 12, max = 20}, weight = 5},
    scrap_glass = {price = 6},
}

#buyer.positions

Buyer peds. coords is where the player stands to talk, with w as the ped's heading. Set blip.enabled = false to hide the map marker.

Example:

lua
positions = {
    {
        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},
    },
}