Jump to content

1 Screenshot

  • 838.4k
  • 7.4k
  • 52.51 kB

About Custom Loot

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 or container 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 ( no loot) and will require 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 first, 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.

Dec '23 1.2.2 update.

Customloot now supports treating specific skinned items as if they are unique items.

For example you could create skinned paper as ‘Money’,
and it will be treated as unique, with totally separate settings and options from regular paper.

The format for creating items is that you hold your skinned item and type

/CustomLoot ExistingLootTable Category CustomName

so, for example, if you want to skin paper with skin 012345 and use it 
as ‘Money’ in a loottable called ‘AirdropTable’, hold some paper with that money skin and type

/CustomLoot AirdropTable Resources Money

You can also specify “All” instead of a specific loottable
/CustomLoot All Resources Money

Optional dependencies -

Configuration.

Global.

  • corpseTypePerBotReSpawnProfile - true/false
  • allowDuplicates - true/false
  • Include_DM_Crates - true/false
  • AllowSkinsFor - { "add", "items", "like", this" }

NPC types.

  • OilRig
  • Excavator
  • CompoundScientist
  • BanditTown
  • MountedScientist
  • JunkPileScientist
  • DungeonScarecrow
  • ScareCrow
  • MilitaryTunnelScientist
  • CargoShip
  • HeavyScientist
  • TunnelDweller
  • UnderwaterDweller
  • Trainyard
  • Airfield
  • DesertScientist
  • ArcticResearchBase
  • LaunchSite
  • Gingerbread
  • ZombieHorde

 

*if Global option 1 is true, this entry is replaced with one entry per existing BotReSpawn 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
  • ...There may be more, as the plugin automatically adds new ones as they appear in-game.

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

Data:
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

Categories:

  • Ammunition
  • Attire
  • Component
  • Construction
  • Electrical
  • Food
  • Fun
  • Items
  • Medical
  • Misc
  • Tool
  • Traps
  • Resources
  • Weapon
  • ...There may be more, as the plugin automatically adds new ones as they appear in-game.

Options per category:

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

 

API.

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

Example call.

[PluginReference]
private Plugin CustomLoot;

List<Item> lootcall = CustomLoot?.Call("MakeLoot", "Profile_Name";

if (lootcall is string)
    PrintWarning(string)lootcall);

 

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)

Notes.

*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 BotReSpawn.

  • Like 3
  • Love 6

User Feedback

1.5m

Downloads

Total number of downloads.

7k

Customers

Total customers served.

105.2k

Files Sold

Total number of files sold.

2.1m

Payments Processed

Total payments processed.

×
×
  • 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.