How to make a Rust recycler output multiplier plugin (Oxide/Carbon)
Scales the amount of resources a recycler returns using a global multiplier plus per-item overrides. It hooks OnItemRecycleAmount and adjusts the returned yield before the item is consumed.
Recyclers return fixed yields, so on a server where scrap and components are plentiful or scarce you cannot tune the economy without editing loot tables. A multiplier lets you reward recycling (for example 1.5x) while keeping specific items at a different rate so one resource does not flood the map.
This plugin uses the OnItemRecycleAmount hook, which fires for each recyclable item as the recycler processes it and asks for the amount to return. The plugin reads the incoming amount, looks up an override for that item's shortname, otherwise applies the global multiplier, and rounds to a whole number. All values live in the config so admins can retune without recompiling. The result is a single file that works on Oxide and on Carbon, with no commands needed for normal operation.
The plugin code
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Oxide.Core;
namespace Oxide.Plugins
{
[Info("Recycler Multiplier", "RustPluginGenerator", "1.0.0")]
[Description("Multiplies recycler output with a global multiplier and per-item overrides.")]
public class RecyclerMultiplier : RustPlugin
{
private const float MinimumAmount = 1f;
private PluginConfig config;
private class PluginConfig
{
[JsonProperty("Global multiplier")]
public float GlobalMultiplier { get; set; } = 1.0f;
[JsonProperty("Per-item overrides (shortname -> multiplier)")]
public Dictionary<string, float> Overrides { get; set; } = new Dictionary<string, float>
{
["scrap"] = 1.0f
};
}
protected override void LoadDefaultConfig() => config = new PluginConfig();
protected override void LoadConfig()
{
base.LoadConfig();
try
{
config = Config.ReadObject<PluginConfig>();
if (config == null) throw new Exception();
}
catch
{
PrintWarning("Configuration file is invalid, using defaults");
LoadDefaultConfig();
}
// Sanitize multipliers so a mistyped value cannot zero out recycling.
if (config.Overrides == null)
{
config.Overrides = new Dictionary<string, float>();
}
if (config.GlobalMultiplier <= 0f)
{
PrintWarning("Global multiplier must be greater than 0, resetting to 1.0");
config.GlobalMultiplier = 1.0f;
}
foreach (var key in new List<string>(config.Overrides.Keys))
{
if (config.Overrides[key] <= 0f)
{
PrintWarning($"Override for '{key}' must be greater than 0, resetting to 1.0");
config.Overrides[key] = 1.0f;
}
}
SaveConfig();
}
protected override void SaveConfig() => Config.WriteObject(config);
private object OnItemRecycleAmount(Item slot, int num3, Recycler recycler)
{
if (slot == null || slot.info == null) return null;
if (num3 <= 0) return null;
float multiplier = config.GlobalMultiplier;
float overrideValue;
if (config.Overrides.TryGetValue(slot.info.shortname, out overrideValue))
{
multiplier = overrideValue;
}
if (Math.Abs(multiplier - 1f) < 0.0001f) return null;
float result = num3 * multiplier;
int amount = (int)Math.Round(result, MidpointRounding.AwayFromZero);
if (amount < MinimumAmount) amount = (int)MinimumAmount;
return amount;
}
}
}Hooks used: OnItemRecycleAmount
Config file
Created automatically on first load at oxide/config/RecyclerMultiplier.json.
{
"Global multiplier": 1,
"Per-item overrides (shortname -> multiplier)": {
"scrap": 1
}
}How the code works
Read the yield and match the item
OnItemRecycleAmount(Item slot, int num3, Recycler recycler)fires with the item being recycled and the vanilla return amount innum3. The plugin first null-checksslotandslot.info, then readsslot.info.shortname. Because the config stores overrides by shortname, the lookup is a singleTryGetValueon theOverridesdictionary.Apply the multiplier
The plugin starts from
config.GlobalMultiplierand replaces it with the override value if the item's shortname is present inOverrides. It multipliesnum3by that factor and rounds withMath.RoundusingMidpointRounding.AwayFromZeroso 2.5 becomes 3 rather than 2. The final number is clamped to a minimum of 1 so a small multiplier on a 1-item yield does not silently delete the output.Return the adjusted amount
OnItemRecycleAmountreturns an object; returning a boxedintreplaces the amount the recycler hands back. Returningnullkeeps the vanilla value. The plugin returnsnullwhen the multiplier is 1.0, so the outcome is identical to vanilla until an admin changes the config.Configure global and per-item values
The
PluginConfigclass holdsGlobal multiplier(a float, default 1.0) andPer-item overrides (shortname -> multiplier)(aDictionary<string, float>). The default dictionary ships a singlescrapentry set to 1.0 as a template.LoadConfigreads the file and falls back toLoadDefaultConfigwith a warning if the JSON is invalid or empty.Guard against bad values
LoadConfigalso checks the loaded multipliers: aGlobalMultiplierat or below zero is reset to 1.0 with a warning, and any override value at or below zero is reset the same way while iterating over a copied key list. A nullOverridesdictionary is replaced with an empty one. The sanitized config is written back withSaveConfig.
Install it on your server
Save RecyclerMultiplier.cs
Keep the file name exactly as the class name. Oxide matches them.Upload it to the plugins folder
Oxide:oxide/plugins/. Carbon:carbon/plugins/. The server compiles and loads it within a few seconds, no restart needed.Edit the config if you want
On first load the default config is written tooxide/config/RecyclerMultiplier.json(Carbon:carbon/configs/RecyclerMultiplier.json). After editing, reload it:oxide.reload RecyclerMultiplier c.reload RecyclerMultiplier # Carbon
Variations
Each one opens the generator with a ready prompt you can tweak.
Add a permission-based multiplier
Gives VIPs a higher recycling rate than regular players.
Generate this versionScale by recycler type
Different rates for safe-zone and player-deployed recyclers.
Generate this versionDaily changing multiplier
Rotates the global multiplier on a timer for events.
Generate this version
FAQ
Does this affect the recycler's processing time?
No. OnItemRecycleAmount only controls how many resources come back per item. The time a recycler takes to process an item is unchanged, and the plugin does not touch the recycler's queue.
What happens if a shortname in my overrides is wrong?
The entry never matches a recycled item because the lookup uses slot.info.shortname exactly. The plugin does not validate shortnames against ItemManager, so check the spelling in game before relying on an override.
Can I use a multiplier below 1?
Yes. The plugin clamps the final amount to at least 1, so a 0.5 multiplier on a yield of 4 returns 2, but a 0.1 multiplier on a yield of 1 still returns 1. A value of 0 or below in the config is reset to 1.0 on load.
How do I install it on Oxide or Carbon?
Drop the compiled .cs file into oxide/plugins on an Oxide server or the equivalent Carbon plugins folder. The plugin has no dependencies and no permissions, so no extra setup is required. Edit oxide/config/RecyclerMultiplier.json and reload the plugin to apply changes.
Will stacking in inventory break the multiplied output?
No. The recycler still creates normal items; the plugin only changes the amount. If the container has no room the game drops the overflow as usual, which is standard recycler behavior.
Customize it for your server
Change the reward, add a cooldown, restrict it to VIPs. Start from this prompt and edit anything.
Edit the prompt on the next screen. 2 free plugins a month, no card.
More loot plugins
- Barrel scrap bonusAwards bonus scrap when a player destroys a loot barrel, with a configurable chance and a VIP multiplier permission.OnEntityDeath
- First opener crate lockThis plugin gives the first player who opens a loot container a temporary claim on it, enforced through the CanLootEntity hook, so anyone outside…CanLootEntityOnEntityKill
- Custom loot tablesReplaces the contents of configured LootContainer crates, matched by short prefab name, with weighted items that have per-item chances and min/max…OnLootSpawn
Last updated Oct 26, 2026.
Customize recycler output multiplier
Customize