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 in the searchable recipe book, opened from the clipboard on the control pedestal or on a compact shredder.

#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.
Compact shredderWhether the compact shredder takes the part too.

#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. Chances can be set in 0.1% steps.

#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.

#Compact Shredder

Each recipe has a Compact shredder switch. The editor shows whether the part's model passes the compact shredder's throat, but that is only a hint; the switch decides. The part's shred time is multiplied by compact.shredTimeMultiplier there.

Among the defaults, large parts such as monitors, PC towers, car wheels, and guitars stay out of the compact shredder.

#Default Recipes

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