Join the Game4Freak Discord Get exclusive plugin sneak peeks, talk directly with VisEntities, never miss important updates, and unlock special discount codes!
Loot Inject

Loot Inject 1.1.0

Inject items into existing loot tables without replacing them
Most loot plugins replace Rust's loot tables entirely, wiping out the vanilla loot in the process. Loot Inject works differently. It adds items to crates and barrels without touching what's already there, or swaps out specific items one at a time.

You set up rules that say things like "5% chance an AK shows up in elite crates" or "replace every MP5 at Launch Site with a Custom SMG". You can control the stack size, spawn chance, item condition, skin, weapon attachments, and loaded ammo. Rules are grouped into profiles so you can turn whole sets on or off with a single switch.


How It Works

Every time a crate, barrel, or other loot container spawns, the plugin checks your rules and decides whether to add, replace, or leave items as they are. Vanilla loot still spawns normally, your rules just modify what ends up inside.

Each rule has two jobs:
  1. Decide which containers it cares about (which crate types, and optionally which monuments)
  2. Decide what to do when it finds one (add an item, or replace an item)
Rules run in one of two modes:

Add Mode

Drops a new item into the container next to the existing loot. If the container is already full, you can either tell the plugin to skip the item or to make room by adding an extra slot.

Use this when you want to give players a chance at bonus loot, for example a small chance of an AK in every elite crate, or guaranteed extra scrap in barrels.

Replace Mode

Looks for a specific item in the container and swaps it for a different one. Everything else in the container stays untouched.

Use this when you want to change what a crate gives out without rewriting the whole loot table, for example replacing every MP5 at Launch Site with a Custom SMG, or swapping low tier medical supplies for bandages.

Configuration

JSON:
{
  "Global Settings": {
    "Enable Debug Logging (shows injection details in console)": false,
    "Process Already Spawned Containers On Plugin Load/Reload": true
  },
  "Loot Profiles": {
    "Example - Add Items": {
      "Enabled": false,
      "Injections": [
        {
          "Replace Existing Item (false = add new item to loot)": false,
          "Item Shortname (item to add, or item to find if replacing)": "rifle.ak",
          "Replacement Item Shortname (only used when replacing)": null,
          "Target Container Prefabs (full prefab path e.g. assets/bundled/prefabs/radtown/crate_elite.prefab)": [
            "assets/bundled/prefabs/radtown/crate_elite.prefab",
            "assets/bundled/prefabs/radtown/crate_normal.prefab"
          ],
          "Only At Monuments (leave empty to apply everywhere)": [],
          "Spawn As Blueprint Instead Of Item": false,
          "Minimum Stack Amount": 1,
          "Maximum Stack Amount": 1,
          "Chance To Spawn Percent (0-100)": 5.0,
          "Item Condition Percent (0-100, only for items with durability)": 100.0,
          "Custom Display Name (empty = default item name)": "",
          "Skin ID (0 = default skin)": 0,
          "Weapon Attachments (e.g. weapon.mod.holosight, weapon.mod.silencer)": [
            "weapon.mod.holosight"
          ],
          "Loaded Ammo (only for weapons)": {
            "Ammo Type Shortname (e.g. ammo.rifle, ammo.pistol)": "ammo.rifle",
            "Amount To Load In Magazine": 30
          },
          "Expand Container Capacity When Full (false = skip injection if no room)": false
        }
      ]
    },
    "Example - Replace Items": {
      "Enabled": false,
      "Injections": [
        {
          "Replace Existing Item (false = add new item to loot)": true,
          "Item Shortname (item to add, or item to find if replacing)": "smg.mp5",
          "Replacement Item Shortname (only used when replacing)": "smg.2",
          "Target Container Prefabs (full prefab path e.g. assets/bundled/prefabs/radtown/crate_elite.prefab)": [
            "assets/bundled/prefabs/radtown/crate_elite.prefab"
          ],
          "Only At Monuments (leave empty to apply everywhere)": ["Launch Site"],
          "Spawn As Blueprint Instead Of Item": false,
          "Minimum Stack Amount": 1,
          "Maximum Stack Amount": 1,
          "Chance To Spawn Percent (0-100)": 100.0,
          "Item Condition Percent (0-100, only for items with durability)": 100.0,
          "Custom Display Name (empty = default item name)": "",
          "Skin ID (0 = default skin)": 0,
          "Weapon Attachments (e.g. weapon.mod.holosight, weapon.mod.silencer)": [],
          "Loaded Ammo (only for weapons)": null,
          "Expand Container Capacity When Full (false = skip injection if no room)": false
        }
      ]
    }
  }
}

Global Settings

  • Enable Debug Logging -- Prints detailed messages to the server console whenever a container is processed, an injection succeeds, or an injection is skipped. Useful while tuning rules, noisy in production
  • Process Already Spawned Containers On Plugin Load/Reload -- When the plugin loads, iterate every existing LootContainer on the map and run injection rules against them. Set to true if you want changes to take effect mid-wipe without a server restart

Loot Profiles

Profiles are named containers for groups of related injection rules. Each profile has its own Enabled flag so you can switch whole rule sets on or off without editing individual rules.

The key of each profile (for example "Example - Add Items") is just a label for your own organization — it's not referenced anywhere except in debug logs. Use names that describe what the profile does (e.g. "Elite Crate Buffs", "Launch Site Only", "Scrap Rebalance").
  • Enabled -- Master switch for the profile. When false, every rule inside it is skipped regardless of its own settings
  • Injections -- List of Injection Rules belonging to this profile

Injection Rules

Each rule is a single injection action — either "add this item" or "replace this item with that one" — scoped to specific containers and optionally specific monuments.
  • Replace Existing Item -- Mode switch. false runs the rule in Add Mode, true runs it in Replace Mode
  • Item Shortname -- In Add Mode, the item that gets inserted. In Replace Mode, the item the plugin searches for in the container
  • Replacement Item Shortname -- Only used in Replace Mode. The item that replaces each match. Ignored in Add Mode
  • Target Container Prefabs -- Full prefab paths of containers this rule applies to. Must be exact matches (e.g. assets/bundled/prefabs/radtown/crate_elite.prefab). Leave empty or omit to match every container
  • Only At Monuments -- Monument name filter. Uses case-insensitive substring matching against the monument's display name (e.g. "Launch Site", "military", "airfield"). Empty list means the rule runs everywhere on the map, including outside monuments
  • Spawn As Blueprint Instead Of Item -- When true, the plugin creates a blueprint fragment of the item rather than the item itself. Ignores attachments, ammo, condition, and skin since those don't apply to blueprints
  • Minimum Stack Amount -- Lower bound of the random stack size. Inclusive
  • Maximum Stack Amount -- Upper bound of the random stack size. Inclusive. For single items (weapons, tools), set both min and max to 1
  • Chance To Spawn Percent -- Probability the rule fires on a matching container. 100 always fires, 5 fires roughly 1 in 20 times. Rolled independently per container per rule
  • Item Condition Percent -- Condition of the injected item as a percentage of its max condition. Only applied to items that have durability (weapons, tools, armor). 100 = brand new, 50 = half health. Ignored for blueprints and items without condition
  • Custom Display Name -- Overrides the item's in-game name. Leave empty to use the default name
  • Skin ID -- Steam Workshop skin ID applied to the item. 0 keeps the default skin
  • Weapon Attachments -- List of attachment shortnames to mount on the weapon (e.g. weapon.mod.holosight, weapon.mod.silencer, weapon.mod.lasersight). Only works on items that have a held entity inheriting from BaseProjectile. Silently skipped for non-weapons
  • Loaded Ammo -- Pre-loads the weapon's magazine. Set to null or omit entirely to leave the magazine empty. See Loaded Ammo for fields
  • Expand Container Capacity When Full -- Add Mode only. When the container has no free slots, true adds one slot to its capacity so the item can fit; false skips the injection entirely

Loaded Ammo

Optional sub-object on each injection rule. Only applied to weapon items.
  • Ammo Type Shortname -- Shortname of the ammo that fills the magazine. Must be a valid ammo item
  • Amount To Load In Magazine -- Number of rounds to load. Automatically clamped to the weapon's magazine capacity, so setting a huge number is safe — it just fills the mag

Finding Monument Names

Enable debug logging and reload the plugin to see monument names in console output. When you see "at monument: Launch Site", you can use "Launch Site" in your Only At Monuments filter.
To apply injections everywhere on the map, leave Only At Monuments as an empty array [].
Author
VisEntities
License duration
Unlimited
Price
7.99 USD
First release
Last update

Ratings

0.00 star(s) 0 reviews

Also by VisEntities

  • One Time Bag
    One Time Bag
    Turns sleeping bags into single-use respawn points
  • Dangerous Collectibles
    Dangerous Collectibles
    Adds a chance for collectibles like stumps to explode when picked up
  • Recoil Tracker
    Recoil Tracker
    Records weapon recoils and analyzes player shot accuracy against them

Latest updates

  1. 1.1.0

    Target container prefabs now use full prefab paths for exact matching (e.g...
Back
Top
Chat commands start with a /, while console commands can be entered directly in the F1 console or server console. Use find <keyword> in console to search for available commands related to the plugin. Parameters in < > are required, while [ ] are optional.
This plugin uses Oxide's permission system. Grant or revoke permissions using oxide.grant and oxide.revoke. You can assign them to individual players or groups using their Steam id or group name.
Settings are stored in the config file found under the config/ directory. You can edit this file manually, then reload the plugin to apply your changes.
Persistent data is saved in the data/ directory. This includes things like saved settings, usage stats, or player progress depending on the plugin. Deleting a data file will reset stored progress or customizations.
Language files are located in the lang/ folder. To translate messages, copy the en.json file into your target language folder (e.g. fr, de) and edit the values. Reload the plugin after changes to apply new messages.
This section lists public methods exposed by the plugin for use in other plugins. You can call these via the CallHook method. Ensure the plugin is loaded before calling its API to avoid null reference errors.
These are custom hooks that other plugins can listen for. Simply define a method with the same name and expected parameters in your plugin to handle the event. Hooks are triggered at key moments and are useful for extending or reacting to plugin behavior.
These hooks are injected into the game's code using Harmony. They let the plugin run code at key points in the game's internal logic. You can return values to block or modify behavior. Use with caution — these are powerful and can affect core mechanics.
Cart