Documentation

Recipes

How shredder recipes, outputs, and variants work.

Recipes are stored in the zyke_shredder_recipes table and managed in the Admin Panel. A new server imports the default recipes once, the first time the table is created. Changes apply to every player immediately.

Players can read every enabled recipe from the clipboard on the control pedestal.

#Recipe Fields

FieldMeaning
Input itemThe item the recipe accepts. Each item has one recipe.
Shred timeSeconds the cutters spend on the part.
Particlessparks, dust, or none.
Crunch soundA sound key from Config.Settings.shredder.sounds, such as metal or plastic.
ModelProp shown on the belt. Empty rides as steel shreds.
LooksModels for specific metadata.image values, such as graded converters.
OutputsItems always rolled for the part.
VariantsExtra outputs chosen by the item's metadata.

#Outputs

Each output drops between min and max pieces, with a chance from 0 to 1 of dropping at all. Outputs are rolled when the part is loaded and land in the bin once it is shredded.

A recipe's most possible pieces cannot exceed bin.capacity, since such a part could never be loaded.

#Variants

Variants add outputs based on the item's metadata. The first variant whose metadata matches adds its outputs; later variants are skipped. A field set to a list matches any of its values. A variant without metadata always matches, so place it last as the fallback.

The default small converter recipe always gives catalyst powder, then rusty scrap for rusted grades and steel scrap for every other grade.

Example:

lua
catalytic_converter_small = {
    shredSeconds = 9,
    effect = "sparks",
    sound = "metal",
    prop = "zyke_catalytic_small",
    outputs = {
        {item = "catalyst_powder", min = 1, max = 1},
    },
    variants = {
        {metadata = {grade = {"patchy", "rusty", "flaking", "corroded", "perforated", "holed"}}, outputs = {{item = "scrap_rusty", min = 2, max = 3}}},
        {outputs = {{item = "scrap_steel", min = 2, max = 3}}},
    },
}

Durability never changes the output.

#Default Recipes

The defaults include converters from Catalytic Converters, wheel clamps from zyke_wheelclamp, angle grinder tools from zyke_anglegrinder, and a range of electronics, tools, and household items. Parts from resources that are not installed are simply never loaded.