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. 1. the weights of all categories in one array are added to total sum, which reflects the 100%
    2. a random number between zero and that sum is taken
    3. go through the list and check if random number is larger or equal than sum minus weight of the current category
    4. take the category which matches and redo the first steps until there are no subSpawn entries
    5. add all items & blueprints of the category to inventory (amount of each is the quantity that will be added to inventory)

    Code:
    "LootSpawn.RadTown2": {
      "items": [],
      "blueprints": [],
      "subSpawn": [ // Sum = 133, CurSum = 0, RandNum = Random.Range(0, 133) = 25
        {
          "category": "LootSpawn.GenericLessNothing",
          "weight": 50 // CurSum += 50; percent = CurSum/(Sum/100f) = 50 / (133/100f) = 37.59%
        }, // RandNum >= (Sum - CurSum) // 25 >= 83 ? no, check next
        {
          "category": "Blueprints.Common",
          "weight": 20 // CurSum += 20; percent = CurSum/(Sum/100f) = 70 / (133/100f) = 52.63%
        }, // RandNum >= (Sum - CurSum) // 25 >= 63 ? no, check next
        {
          "category": "Blueprints.Uncommon",
          "weight": 10 // CurSum += 10; percent = CurSum/(Sum/100f) = 80 / (133/100f) = 60.15%
        }, // RandNum >= (Sum - CurSum) // 25 >= 53 ? no, check next
        {
          "category": "Blueprints.Rare",
          "weight": 5 // CurSum += 5; percent = CurSum/(Sum/100f) = 85 / (133/100f) = 63.91%
        }, // RandNum >= (Sum - CurSum) // 25 >= 48 ? no, check next
        {
          "category": "Blueprints.VeryRare",
          "weight": 3 // CurSum += 3; percent = CurSum/(Sum/100f) = 88 / (133/100f) = 66.17%
        }, // RandNum >= (Sum - CurSum) // 25 >= 45 ? no, check next
        {
          "category": "Collection.Attire",
          "weight": 30 // CurSum += 30; percent = CurSum/(Sum/100f) = 118 / (133/100f) = 88.72%
        }, // RandNum >= (Sum - CurSum) // 25 >= 15 ? yes, take this
        {
          "category": "HQMetal",
          "weight": 15 // CurSum += 15; percent = CurSum/(Sum/100f) = 133 / (133/100f) = 100.00%
        } // skipped
      ]
    }
     
  2. Ok Nogrod but can you explain to me how to increase the number of guns people can find in boxes, trash beans for exemple ? not that they find 4 guns in one box but could find one gun in one box in a rad, then another one a gun in another box at the airfield... To get multiple guns in multiple boxes on the map ?
     
    Last edited by a moderator: Sep 21, 2015
  3. And what means radtown1-2 ? Crates on radtown? Or rad barrels
     
  4. So what you want to do is increase the liklihood of AK's spawning in radtowns?
     
  5. @Matt10 Yeah I would like to know and understand how to increase the likelihood of items spawning affirm ( like guns, ammunitions, ... ) Just to be sure I use the plugin correctly. Thx
     
  6. Nogrod updated LootConfig with a new update entry:

    1.0.5

     
  7. Will this require a server restart in order to update, like the last one? Thank you!
    [DOUBLEPOST=1443237580,1443225297][/DOUBLEPOST]
    Its a bit hard to explain, frankly. If you'd like, I'd be willing to modify the json file for you, if you can describe for me how you would like the tables to be. Or, I can share with you the json file I use for the server I administrate, which in my opinion is well-balanced and fine-tuned.
     
  8. matt 10 yeah if you agree to give me your file I will compare it to mine and will try to understand the differences with weight and so on.
    You can send it to me in private ? or here ( maybe it will help other people as well ? ) Thx.
     
  9. So first off, I'd recommend using JSON Editor Online - view, edit and format JSON online or another online editor to manage the file. To use the site, you paste the code on the left-hand side and hit the arrow pointing to the right, then make your edits on the right-hand side and update the code by pushing the arrow pointing left.

    I'll paste my config file here: notable changes from default are that I've replaced the spawning of Explosives and of Timed Explosives Charges (C4) BP's with the non-BP versions (I want players to have to research those with BP fragments), reduced the overall spawn chance of Explosives/C4, modified the RadTown Crates to drop slightly rarer loot, given regular barrels a low% chance to spawn better barrel loot, and some other small adjustments that I decided would be best for the server.

    The file is too large to post, so I attach it in its .json from to this post.
     

    Attached Files:

  10. On first load and config file generation does this give vanilla loot or is it enhanced to begin with?
     
  11. It's pretty hard to tell really. Seems quite vanilla to me, but it's been so long since I've played vanilla that I'm not even sure.
     
  12. It will export the default rust loot when a new config is created. Without changes.
     
  13. Thank you both. Good to know.
     
  14. Nogrod updated LootConfig with a new update entry:

    1.0.6

     
  15. Nogrod updated LootConfig with a new update entry:

    1.0.6

     
  16. Immediately I apologize for the poor translation. It is very difficult to deal with the plug-in, who can throw off please tune in heavy loot to difficult recipes for C4 and so on mined.
     
  17. so does anyone have a config similar to what betterloot was? I'm trying to achieve that again without using betterloot. I've tried to understand the config but its sort of confusing to me.
     
  18. It is very difficult to set up - so useless.
    Config file pervert...
     
  19. BetterLoot uses a different drop system, so i would not assume anyone has done similiar drops for LootConfig...it is meant to adjust the default rust drops...

    there is a lot to loot in rust :p also rust server hosting is not meant to be easy...but with tools and knowledge of json you can handle the config ;)
     
  20. bogdanwebs

    Get something like Notepad++ and use the Plugin manager to get some plugins like:

    • JSON Viewer
    • CS-Script
    • GMOD LUA Lexer
    • NppFTP
    • JSLint
    • JSTool
    And enjoy the journey of learning and researching admin duties. If it's worth doing,
    it's worth putting the time in.