LootConfig

Allows you to adjust the server's loot list

Total Downloads: 14,928 - First Release: Mar 27, 2015 - Last Update: May 20, 2018

5/5, 21 likes
  1. "compiled again" won't work, you will need to start the server without a config file and latest plugin
     
  2. I suppose I may have worded that incorrectly.

    The server was updated to the newest server build, then newest oxide (2.0.1648), and then I pasted the newest LootConfig into the plugins folder. Prior to that no trace of LootConfig or its config existed with the server. I see that the new config has the "GiftContents" but they aren't revealing anything upon "unwrapping".
     
  3. Nogrod updated LootConfig with a new update entry:

    1.0.8

     
  4. hello friends, congratulations on this plugin

    ... I could not help as configured not have empty barrels/trash can, and increase the loot of the Signal Supply

    thank you!

    PD: sorry, my English is low
     
  5. What happens if I increase the amount of an unstackable item (for instance, Armor). Does anyone know if Rust or the plugin accounts for this and rolls it into multiple items?
     
  6. First of all sorry for my bad english.
    Could someone help me out with the config ? I`m not really able to understand it ^^
     
  7. Using this in conjunction with SpawnConfig isn't working correctly, I know SpawnConfig is setup. I'm not sure it's a direct result but all crates are empty. No loot found in them after the original crates are looted.

    Code:
    (14:31:37) | [Oxide] 2:32 PM [Info] [LootConfig] No SpawnConfig loaded, skipping SpawnGroups...
     
  8. Same for me, i really want to use this, but i have no clue
     
  9. Someone have a good config file?
     
  10. Also wondering this for a PvP low work server ;) How do you test \ enhance the amount of loot?
     
  11. - Items produced immediately : How the server settings?
    - Items lootconfig : How the server settings?


    Please let me know. Thx

    [DOUBLEPOST=1453326720][/DOUBLEPOST]ITEMS X100
     

    Attached Files:

  12. help me
     

    Attached Files:

  13. Nogrod updated LootConfig with a new update entry:

    1.0.9

     
  14. I just installed the file for the first time, and the LootConfig.json is blank. Is that an error or am I missing something?
     
  15. Guys save me please! Loaded config and it show me this error and failed to start. All i`ve done - its deleted blueprints from all items.

    Code:
    [Oxide] 2:07 PM [Error] Exception while calling NextTick callback (ArgumentNullException: Argument cannot be null.
    Parameter name: key)
    [Oxide] 2:07 PM [Debug]   at System.Collections.Generic.Dictionary`2[System.String,LootSpawn].TryGetValue (System.String key, .LootSpawn& value) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.GetLootSpawn (System.String lootSpawnName, System.Collections.Generic.Dictionary`2 lootSpawns) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.GetLootSpawn (System.String lootSpawnName, System.Collections.Generic.Dictionary`2 lootSpawns) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.GetLootSpawn (System.String lootSpawnName, System.Collections.Generic.Dictionary`2 lootSpawns) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.GetLootSpawn (System.String lootSpawnName, System.Collections.Generic.Dictionary`2 lootSpawns) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.GetLootSpawn (System.String lootSpawnName, System.Collections.Generic.Dictionary`2 lootSpawns) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.GetLootSpawn (System.String lootSpawnName, System.Collections.Generic.Dictionary`2 lootSpawns) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.GetLootSpawn (System.String lootSpawnName, System.Collections.Generic.Dictionary`2 lootSpawns) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.UpdateLootContainer (System.Collections.Generic.Dictionary`2 containerData, .LootContainer container, System.Collections.Generic.Dictionary`2 lootSpawns) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.UpdateLoot () [0x00000] in <filename unknown>:0
      at Oxide.Core.OxideMod.OnFrame (Single delta) [0x00000] in <filename unknown>:0 
    Help me please ASAP because players will learn all the BPs with default system very quickly =((.

    P.s.: It would be very useful if there were option to disable spawn of all the blueprints in the game. =(((

    P.s.s: Will the blueprint be disabled if I will set its value to -1? Or any other item where i will change its value for example from 1 to -1?
    [DOUBLEPOST=1454170461,1454156266][/DOUBLEPOST]And can anyone tell me exact step by step procedure of launching Loot Config?

    As i understood for now (correct me if I wrong):
    1) Paste plugin to "Plugin" folder
    2) Launch server
    3) Copy generated "LootConfig.json" for editing
    4) Edit all the code (very useful site JSON Editor Online - view, edit and format JSON online)
    5) Edit the way as you want (what value should be used to disable spawn of the selected item?)
    6) Paste edited code to your work file "LootConfig.json"
    7) Paste final file to "Config" folder with replacement of the old file
    8) Type in console "oxide.reload LootConfig"

    Am I wright?
     

    Attached Files:

  16. Hey guys, long time reader, first time poster. (lol)

    So I see a lot of people having problems with this, so I decided to post my settings, along with some explanation, and see if I could help. I use Loot Config along with AirdropExtended to configure my server so that guns and explosives drop almost never on ground loot, and very frequently from air drops. I included both files in case you want to use the same setup, but will only go in depth on the lootconfig settings. Send me an inbox if you want to know about airdrop. :)

    So let's dig into LootConfig! The best way I found was to open it in Notepad++, and close all of the parenthesis (- signs to + signs) except the first so you see some organization. Let's dig into each option.

    One of the Airfield Spawn Groups

    Code:
      "airfield_1_loot_spawner_x11y43z1172": {
          "assets/bundled/prefabs/radtown/crate_normal.prefab": {
            "DestroyOnEmpty": true,
            "LootDefinition": "LootSpawn.RadTown1",
            "MaxDefinitionsToSpawn": 1,
            "MinSecondsBetweenRefresh": 3600.0,
            "MaxSecondsBetweenRefresh": 7200.0,
            "DistributeFragments": true
          },
          "assets/bundled/prefabs/radtown/crate_normal_2.prefab": {
            "DestroyOnEmpty": true,
            "LootDefinition": "LootSpawn.RadTown2",
            "MaxDefinitionsToSpawn": 1,
            "MinSecondsBetweenRefresh": 3600.0,
            "MaxSecondsBetweenRefresh": 7200.0,
            "DistributeFragments": true
          }
        },
    So here, we want to make sure each spawn group has
    "DestroyOnEmpty": true, - if you want the box destroyed when it's looted
    "LootDefinition": "LootSpawn.RadTown1", - which item list should it choose an item from, more on this later.
    "MaxDefinitionsToSpawn": 1, - how many of that type of item you want to spawn in that location, ie, in airfield for this one
    "DistributeFragments": true - if you want it to be able to give blueprint fragments. No comma here because it ends the code block.

    Now let's look at the next type of config, Item Mod Reveals

    Code:
        "blueprint_book.item": {
          "NumForReveal": 1,
          "RevealedItemOverride": null,
          "RevealedItemAmount": 1,
          "AsBlueprint": false,
          "RevealList": "Blueprints.Rare"
    "NumForReveal": 1, - how many of the item you need to get a reveal option
    "RevealedItemOverride": null, - if you want it to reveal a specific item, and only a specific item, enter it here
    "RevealedItemAmount": 1, - if you have put in a specific item, how many should they get. no specific item means you can ignore this (leave it at 1)
    "AsBlueprint": false, - if you put a specific item, should it be a blueprint? no specific item, ignore it
    "RevealList": "Blueprints.Rare" - which list should it pick an item from (more on this later)

    The next type of config is Item Mod Unwraps, and has to do with presents.

    Code:
        "present.large.item": {
          "RevealList": "LargeGift-Contents"
        },
    "RevealList": "LargeGift-Contents" - pick which item list you want a large present to pick an item from, more on this next

    And finally, categories. This is where things can get confusing. There are two types of categories. Let's do this using our example, that Airfield Spawn Group. The first option had "LootDefinition": "LootSpawn.RadTown1", so let's find that loot definition in the code. If we've closed out our parenthesis, it shouldn't be hard to find.

    Code:
        "LootSpawn.RadTown1": {
          "Items": [],
          "Blueprints": [],
          "SubSpawn": [
            {
              "Category": "LootSpawn.BarrelBetter",
              "Weight": 10
            },
            {
              "Category": "Collection.Tools",
              "Weight": 20
            },
            {
              "Category": "Collection.Weapons",
              "Weight": 15
            }
          ]
        },
    In this code, we see that there are no direct spawns ( "Items": [],) No blueprint spawns ("Blueprints": [],) but we have 3 subspawns.
    "Category": "LootSpawn.BarrelBetter",
    "Category": "Collection.Tools",
    "Category": "Collection.Weapons",

    Before I paste what those have, let's look at the weight. We have 10 weight on BarrelBetter, 20 on Tools, and 15 on Weapons. So the total is 45. The RNG will pick a number 1-45, and if it falls between 1-10, it will open BarrelBetter. 11-30 is Tools, and 31-45 is Weapons. The numbers may fall in a different order, but that's the basics. So let's say it generates a 6 and chooses BarrelBetter. We find that in our config file, and here's what we see:

    Code:
      "LootSpawn.BarrelBetter": {
          "Items": [],
          "Blueprints": [],
          "SubSpawn": [
            {
              "Category": "Nothing",
              "Weight": 0
            },
            {
              "Category": "LootSpawn.BarrelCommon",
              "Weight": 60
            },
            {
              "Category": "Bow And Arrow",
              "Weight": 6
            },
            {
              "Category": "Items.Common.Tool",
              "Weight": 10
            },
            {
              "Category": "Items.Uncommon.Tool",
              "Weight": 5
            },
            {
              "Category": "Blueprints.Rare",
              "Weight": 3
            },
            {
              "Category": "Blueprints.VeryRare",
              "Weight": 1
            },
            {
              "Category": "Crossbow",
              "Weight": 3
            },
            {
              "Category": "HQMetal",
              "Weight": 5
            }
          ]
        },
    I wanted to point this out, because this is one of those loot spawns that by default can spawn with nothing. I have changed this in my config to have a weight of 0. This means it will not, cannot be picked. Loot will not be spawned with nothing in it.

    So again, let's add it up....BarrelCommon has 60, Bow and Arrow 6, Common Tool 10, Uncommon Tool 5, Blueprints Rare 3, Blueprints Very Rare 1, Crossbow 3, HQMetal 5. Let's say it goes to Bow and Arrow, so that we can look at the other type of category.

    So we find Bow and Arrow in the list, and get...

    Code:
        "Bow And Arrow": {
          "Items": [
            {
              "Shortname": "bow.hunting",
              "Amount": 1.0
            },
            {
              "Shortname": "arrow.wooden",
              "Amount": 5.0
            }
          ],
          "Blueprints": [],
          "SubSpawn": []
        },
    Here we can see what that category includes, and change how many. So this category includes a hunting bow, amount is one, and wooden arrows, amount is 5. You can see these are under Items, not Subspawn, which is why it's no longer a category picked.

    PHEW! I think I covered it all, but I most likely missed something. PLEASE ask questions if you have them. :)
    [DOUBLEPOST=1454572223,1454380980][/DOUBLEPOST]I found that Airdrop Extended is being overwritten by settings inside LootConfig, so I took another look at the config file, and I think I've fixed it so it's all customizable within LootConfig. Testing it, and I'll re-upload if it works. :)
     

    Attached Files:

  17. Bonsoir, j'ai lu l'explication du contenu que Raiannon à poster, mais j'ai encore une seul question à poser, pour bloquer certains objets en loot, comment les bloquer ? J'ai bloquer les crafts de certaines armes grâce au plugin "Crafting controller" mais je ne vois pas comment bloquer ces objets dans les caisse, barils et airdrop.

    Quelqu'un aurait il juin Réponse à m'apporter ? Merci d'avance ;)
     
  18. Hi guys! Finally off work.

    So someone asked how I made this work with Airdrop Extended, and as of that posting, while I thought I had, further testing showed, I hadn't. So I managed to fix it, and I'll post those files, but also specify how I fixed it, and another way I think may fix it, though I haven't tried that way.

    So, here's how I fixed it. There are categories referred to as "DM". What specifically this refers to, I haven't been able to figure out for sure, because only certain spawns have this loot, and some of the containers are really high quality stuff. This is loot I don't want dropping on the ground on my server, so I changed all spawns that referenced this category to another reference, such as LootSpawn.BetterBarrel. I balanced it out.

    Then I took the Categories describing the loot, and customized them for what I WOULD want to drop in an airdrop or helicopter drop. Since these are now completely separate loot tables, they can now be customized just like you can customize Airdrop Extended. Then, I found the LootSpawn.SupplyDrop, which is the LootSpawn for an airdrop, and customized what I wanted to appear there. Here's how it breaks down.

    Code:
        "LootSpawn.SupplyDrop": {
          "Items": [],
          "Blueprints": [],
          "SubSpawn": [
            {
              "Category": "DM.LootSpawn.AmmoCrate",
              "Weight": 200
            },
            {
              "Category": "DM.LootSpawn.T2",
              "Weight": 200
            },
            {
              "Category": "DM.LootSpawn.T3",
              "Weight": 200
            },
            {
              "Category": "ItemModsRare",
              "Weight": 100
            },
            {
              "Category": "ItemMods",
              "Weight": 100
            },
            {
              "Category": "Traps",
              "Weight": 50
            },
            {
              "Category": "targeting_computer",
              "Weight": 50
            },
            {
              "Category": "cctv_camera",
              "Weight": 75
            },
            {
              "Category": "DM.ConstructionResources",
              "Weight": 75
            },
            {
              "Category": "Explosives",
              "Weight": 25
            }
          ]
        },
    I then went and edited the HeliDrop the same way (which isn't included in Airdrop Extended, you'd need to use something like HeliControl for that)

    Code:
        "HeliLoot": {
          "Items": [],
          "Blueprints": [],
          "SubSpawn": [
            {
              "Category": "DM.LootSpawn.T3",
              "Weight": 50
            },
            {
              "Category": "AutoTurretBP",
              "Weight": 400
            },
            {
              "Category": "targeting_computer",
              "Weight": 30
            },
            {
              "Category": "cctv_camera",
              "Weight": 30
            },
            {
              "Category": "m249 with ammo",
              "Weight": 400
            },
          ]
        },

    When it comes to Airdrop Extended, I removed a line from the actual plugin file which tells it to create a basic list if you're not using custom loot. Here's what I removed, at line 2560:

    Code:
       var itemList = _context.Settings.CreateItemList();
       for (var index = 0; index < itemList.Count; index++)
       {
        var item = itemList[index];
        item.MoveToContainer(itemContainer, index);
       }
    Removing this line means that if you set this line in the AirdropExtended config to false, then AirdropExtended will clear the default loot from the supply drop, set the amount of loot spaces based on your config file, and do nothing else. At that point, LootConfig will fill in the blanks from your LootConfig file.

    Code:
      "CustomLootEnabled": false,
    So, I think I covered it all. OH, the other way to make them work together which I haven't tested would be to possibly remove the following line from LootConfig at 167:

    Code:
        "assets/prefabs/misc/supply drop/supply_drop.prefab": {
          "DestroyOnEmpty": true,
          "LootDefinition": "LootSpawn.SupplyDrop",
          "MaxDefinitionsToSpawn": 8,
          "MinSecondsBetweenRefresh": 3600.0,
          "MaxSecondsBetweenRefresh": 7200.0,
          "DistributeFragments": true
        },
    By removing LootConfig's control of the AirDrop spawn, you could give it back fully to AirdropExtended.
    [DOUBLEPOST=1455179365][/DOUBLEPOST]J/k, they just spawned empty. Give me just a minute.
    [DOUBLEPOST=1455180265][/DOUBLEPOST]AHA! AirdropExtended creates a new spawn for the cargo plane, instead of using the default one, which is why LootConfig cannot edit the contents. :) So we can possibly use the second work around, or, find the pesky spawn name. I'm looking for the spawn name now. :)


    Edit: Fixed, and files updated. I couldn't find the info I needed in AirdropExtended, it will take some more searching when I haven't spent a full day at work. At this point, I'm going to bed.

    If you use these configs, LootConfig will not control the airdrop spawn, instead, it's fully controlled within the Airdrop Extended Config. The Airdrop gives 10 slots, and is configured to drop properly with our server (Hapis Island Map), so if you use a procedural you'll want to increase the size, as well as make your own changes to the size of the drops, number of drops, etc.
     

    Attached Files:

    Last edited by a moderator: Feb 11, 2016
  19. Hello,
    I just installed "Loot Config" on my server, and I would like to very rare and c4 explosives. Is it possible to help me to set the file because I am lost. thank you.
     
  20. It uses rust's internal loot configuration. Trial and error will help you. The "loot.reload" command is your friend. Carefully edit the json and take your time. Only alter the weights of items within barrels and crates configuration towards the bottom of the json.

    The config will reset every update, so keep in mind with a lot of new items in rust being added, you will either have to add the new items manually to your old config or redo your newly generated config. This plugin is not user friendly to a fault but it is very good.
     
    Last edited by a moderator: Feb 15, 2016