Skip to content

decaydev/loot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DecayLoot

Plugin Attributes

  • unique loot in crates without intense looping/retrying
    • arrays where sensible/possible
      • int over float
      • min/max range types
    • no duplicate items
    • no empty slots in crates (less calculations)
  • guaranteed scrap ranges
  • stacked loot
  • blueprints support for individual items
  • fixed scrap amounts
  • random versus probable
    • random number of loot items within range
    • random min/max stacking within range
      • min/max respected (if min is 5 and max is 5, put 5 pieces of loot in the crate)
  • does not attempt to generate any base config code
  • does not account for prefabs (crates), but we provide a nice generator tool that does https://decay.dev/loot.
  • does not rely on or use Unity/Rust/Facepunch DLL's outside of what oxide uses
  using Newtonsoft.Json;
  using System;
  using System.Collections.Generic;
  using System.Linq;

Caveats

  • If you use scrap_range, and a max items of 1, scrap will always take precedence as the single item regardless of the items you added to the table.
  • If you choose a guaranteed scrap range, and also choose to add an additional scrap resource to the crate as an item, scrap will be stacked.
  • We don't account for rarity of items

Install/Requirements

  • rust/oxide server
  • generate your DecayLoot.json config FIRST and move it to the oxide/config/ directory in oxide
  • move DecayLoot.cs into oxide/plugins/ directory
  • reload plugin

DecayLoot Table Generator

You can run this yourself or use the latest version here https://decay.dev/loot

DecayLoot JSON Schema

{
  "prefabs": [
    {
      "id": "assets/bundled/prefabs/autospawn/resource/loot/loot-barrel-1.prefab",
      "scrap_range": [
        0,
        0
      ],
      "item_range": [
        0,
        0
      ],
      "items": [
        {
          "shortname": "riflebody",
          "range": [
            0,
            0
          ]
        },
        {
          "shortname": "ammo.shotgun",
          "range": [
            0,
            1
          ]
        }
      ]
    }
  ]
}

About

The decay.dev loot plugin for oxide. Control loot tables in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages