Coder Social home page Coder Social logo

decaydev / loot Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 99 KB

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

Home Page: https://decay.dev/loot

License: GNU General Public License v3.0

C# 100.00%
oxide-plugins playrust csharp

loot's Introduction

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
          ]
        }
      ]
    }
  ]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.