Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

1 Screenshot

  • 693,883
  • 3,022
  • 40.78 kB

Works with

About CustomLoot

Formerly NPCLoot.
Populate npc corpses, containers, and barrels with custom loot.

General info.
Users can create as many loottables as required, and assign them to npc/container types by name.

To create a new loot table, simply set the "lootTable" entry for some container type in config to a new made up name.
This will create a new /data file of that name, which you can customise.

The same loot table can be used for multiple corpse types.

New categories and items are added automatically so, hopefully, data should never need to be wiped.
Default loottable has all probabilities set to zero and will required customisation.
I intend to provide some sample loottables for free download in the near future.

Item choice is done by two-tier probability.
For each spawned item a category is chosen, based on your category probabilities,
then an item is chosen from that category, based on your item probabilities for that category.

See notes at bottom for further info on probabilities.


Optional dependencies -



  • corpseTypePerBotSpawnProfile - true/false
  • allowDuplicates - true/false
  • Include_DM_Crates - true/false

NPC types.

  • Military Tunnel
  • Junkpile Scientist
  • Mounted Scientist (CH47)
  • Compound Scientist
  • BanditTown
  • Murderer
  • ScareCrow
  • CargoShip
  • HeavyScientists
  • Excavator
  • OilRig
  • BotSpawn *

*if Global option 1 is true, this entry is replaced with one entry per existing BotSpawn profile, by name.
Eg, The Dome 0, Airfield 0, LaunchSite 0, etc.

Container Types

  • bradley_crate
  • heli_crate
  • supply_drop
  • dm ammo
  • dm c4
  • dm construction resources
  • dm construction tools
  • dm food
  • dm medical
  • dm res
  • dm tier1 lootbox
  • dm tier2 lootbox
  • dm tier3 lootbox
  • loot_barrel_1
  • loot_barrel_2 
  • loot-barrel-1
  • loot-barrel-2
  • oil_barrel
  • codelockedhackablecrate
  • crate_basic
  • crate_elite
  • crate_mine
  • crate_normal
  • crate_normal_2
  • crate_normal_2_food
  • crate_normal_2_medical
  • crate_tools
  • crate_underwater_advanced
  • crate_underwater_basic
  • foodbox
  • minecart
  • trash-pile-1

Options per type:

  • "enabled": true/false (governs corpse loot-giving)
  • "lootTable": "default"
  • "minItems": 6
  • "maxItems": 6
  • "gunsWithAmmo": true/false
  • "noGuns": true/false
  • "MaxBps": 3
  • "WaterPreFillPercent": 20
  • "ClearContainerFirst": true/false

By default there is one data file : /data/CustomLoot/default.json
If you specify a unique lootTable name for any corpse or container type,
a new file will be created in the same folder, by name.

  • Eg /CustomLoot/JunkPileLootTable.json

Each data file contains:

  • Blacklist : [] - These items will never spawn, and are removed from loottable.
    Setting to [] will repopulate with default blacklist.
  • AlwaysSpawnList : [] - These items will always spawn, regardless of probabilities. 
  • allowChristmas = false
  • allowHalloween = false
  • allowKeycards = false
    By default all Christmas, Halloween and Keycard items are disabled.

Items, grouped by category.

*Each item has:*

  • "probability": 5
  • "minStack": 10
  • "maxStack": 50
  • "blueprintChancePerfect": 0 - where applicable
  • "skins": [] - where applicable
  • "IncludeAllApprovedSkins" - false
  • "MinConditionPercent": 90 - where applicable
  • "MaxConditionPercent": 100 - where applicable


  • Ammunition
  • Attire
  • Component
  • Construction
  • Electrical
  • Food
  • Fun
  • Items
  • Medical
  • Misc
  • Tool
  • Traps
  • Resources
  • Weapon

Options per category:

  • "probability": 5
  • "allowBlueprints": true



If the called config profile doesn't exist CustomLoot will create it under 'API'.

Example call.

private Plugin CustomLoot;

var lootcall = NPC?.Call("MakeLoot", "Npc_Config_Profile_Name";

if (lootcall is string)


Object hooks are provided to prevent this plugin giving loot to your spawned npcs, or containers.

Return non-null for the following.

  • OnCustomLootNPC(uint)
  • OnCustomLootContainer(uint)


*Probability, in both cases above, is relative; There is no scale.
If there were two categories with probabilities of 9 and 1,
the first would have a 9 out of 10 chance of being picked.
Probability of zero effectively means the item, or category is disabled.

Categories with no enabled items will never be chosen. Their probability is irrelevant.

Disabled categories will never be chosen. Their probability is irrelevant. 

Users should never have to manually add, or remove, items in the /data files.
New items in Rust should be added automatically.
The blacklist can be used to remove entries from the data file, if that's preferred.

Reloading is not required to catch up with profile changes made in BotSpawn.

  • Like 3
  • Love 4

Steenamaroo's Other Downloads

User Feedback

About Us

Codefling is a forward-thinking platform for developers to share and monetize their work from plugins to game assets and everything in-between.

7,128 files sold to 635 customers and $103,357 of payments processed this year!

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.