Magic Loot

Simple components multiplier & loot system

Total Downloads: 13,494 - First Release: Nov 13, 2016 - Last Update: Nov 2, 2017

5/5, 44 likes
  1. It's not in your exclude at all, and stone doesn't exist. It's "stones".
     
  2. Yeah, i know that it's "stones" but how can i increase the chance of drop for other components such as rifle bodys and springs etc. ?
    i've changed it to "wood" & "stones" now
     
  3. Plugin doesn't work that way, it multiplies vanilla loot so the rarity is still the same only that if you find a rifle body etc. You'll get vanilla rate x components rate.

    So say you have it at x5 and they come across a rifle body. They'll get 5 (depending on what you have max set to)
     
  4. So which plugin makes rarity easier like servers have loot + as i saw ?..
     
  5. Hello,

    I don't know if the plugin is affected, but, sometime, we found some awesomes number of objects in box...

    Like binoculars, 7000 binoculars in one box, or like 2480 Metal embrazure, or like 450 homemade shells. Is it the fault of the plugin?

    Here is my configfile:

    Code:
    {
      "Components": {
        "list": [
          "bleach",
          "ducttape",
          "gears",
          "glue",
          "metalblade",
          "metalpipe",
          "propanetank",
          "riflebody",
          "roadsigns",
          "rope",
          "semibody",
          "sewingkit",
          "sheetmetal",
          "smgbody",
          "metalspring",
          "sticks",
          "tarp",
          "techparts",
          "scrap",
          "apple",
          "can.tuna",
          "chocholate",
          "granolabar",
          "smallwaterbottle",
          "cctv.camera",
          "targeting.computer",
          "metal.refined",
          "can.beans",
          "crude.oil",
          "lowgradefuel",
          "largemedkit",
          "syringe.medical",
          "bandage"
        ]
      },
      "Developer": {
        "AmountChange": false,
        "Debug": false,
        "ExtraItem": false,
        "Skins": false
      },
      "Exclude": {
        "list": [
          "supply.signal",
        ]
      },
      "ExcludeFromMultiplication": {
        "list": [
          "crude.oil"
        ]
      },
      "Loot": {
        "AmountMin": 1,
        "Enabled": true,
        "ItemsMax": 3,
        "ItemsMin": 1,
        "PreventDuplicates": false,
        "WorkshopSkins": false
      },
      "Settings": {
        "Multiplier": 1,
        "MultiplierComponents": 2,
        "MultiplyOnlyComponents": true
      }
    }
    Thank's.
     
  6. Hi.

    Can you explain to me the difference between :

    Multiplier 2
    Multipliercomponents 2

    Code:
    "Settings": {
        "Multiplier": 2,
        "MultiplierComponents": 2,
        "MultiplyOnlyComponents": false
    What happens if multiplier is set to 1 and multipliercomponsents is set to 2 ?

    Thx.
     
  7. Hello, I think the Components is just a list if you don't want to multiply all rust items.
     
  8. Code:
    {
      "Components": {
        "list": [
          "bleach",
          "ducttape",
          "gears",
          "glue",
          "metalblade",
          "metalpipe",
          "propanetank",
          "riflebody",
          "roadsigns",
          "rope",
          "semibody",
          "sewingkit",
          "sheetmetal",
          "smgbody",
          "metalspring",
          "sticks",
          "tarp",
          "scrap",
          "techparts",
          "wood",
          "apple",
          "chocholate",
          "granolabar",
          "cctv.camera",
          "targeting.computer",
          "metal.refined",
          "metal.fragments",
          "lowgradefuel",
          "largemedkit",
          "syringe.medical",
          "bandage"
        ]
      },
      "Developer": {
        "AmountChange": false,
        "Debug": false,
        "ExtraItem": false,
        "Skins": false
      },
      "Exclude": {
        "list": [
          "ammo.rocket.smoke"
        ]
      },
      "ExcludeFromMultiplication": {
        "list": [
          "supply.signal",
          "crude.oil"
        ]
      },
      "Loot": {
        "AmountMin": 1,
        "Enabled": false,
        "ItemsMax": 3,
        "ItemsMin": 2,
        "PreventDuplicates": false,
        "WorkshopSkins": false
      },
      "Settings": {
        "Multiplier": 1,
        "MultiplierComponents": 3,
        "MultiplyOnlyComponents": true
      }
    }
    Just started using this mod and really liking it so far, along with the rest of my server.

    I ran into a strange bug where various loot crates are not fully spawning their loot. This doesn't occur with every crate, but often enough to annoy my players. What happens is the component in the box won't get it's multiplied amount, and the slot where the scrap should be is completely empty. In my config, I have "scrap" listed in components so it gets multiplied. When I remove "scrap" from the list, I stop encountering this bug.

    ** Update **
    Kind of fixed the issue. I changed
    "ItemsMin": 2 -> "ItemsMin": 1
    and that seems to have fixed my issue, even though I had extra loot set to false.

    ** Update 2 **
    Turns out changing ItemsMin to 1 didn't fix anything. Tried removing "scrap" from component list to see if it fixes issue.
     
    Last edited by a moderator: May 14, 2017
  9. I have the same bug...

    Sometime, crates are not affected by MagicLoot (like purple crates) or loots are * 10-15 while I put * 2...
     
  10. No matter what settings I try, I can't seem to fix the issue. Still plenty of loot crates spawning that have items missing and doesn't apply the mutliplier. From what I can tell, it keeps the first item of the crate, but the others are gone. Here is a screenshot.

    [​IMG]
     
    Last edited by a moderator: May 16, 2017
  11. @Norn
    @Wulf

    With a lot of testing and debugging the mod, I've gotten closer to the answer but hit a roadblock. This mod updates the loot contents of all containers when the mod is loaded. Then it will update the container when it spawns in, triggering OnEntitySpawned(BaseNetworkable entity). The crates that are bugged are ones that haven't been looted for a while. Crates that just spawned will always have the loot multiplier applied, but if i check areas players haven't been through for a while, all of the crates are bugged. I ran some debug logs I wrote on the mod for several hours, the crates that are bugged never show up being spawned in, not triggering OnEntitySpawned(BaseNetworkable entity). My theory is that the containers are somehow being refreshed if they've been around a while, but not spawning in. Is it possible this refresh happens if a LootContainer tries to spawn in the same location, but OnEntitySpawned hook doesn't catch it, or it is a refresh and need a different hook to catch it?
     
  12. Thank you for your in depth analysis, really appreciated.

    As for refreshing, I could set a timer that would simply refresh every container but I honestly had no idea that containers even refreshed in vanilla. I assumed they existed until death. As for the hooks and stuff regarding refresh changes, you'd have to speak to @Wulf or someone with a bit more knowledge on the subject. I will definitely try and work your testing into new updates though.

    You need to set limits in /data/MagicLoot.json
     
  13. I need to set limits in /data/MagicLoot.json even with this config file?

    Code:
    {
      "Components": {
        "list": [
          "bleach",
          "ducttape",
          "gears",
          "glue",
          "metalblade",
          "metalpipe",
          "propanetank",
          "riflebody",
          "roadsigns",
          "rope",
          "semibody",
          "sewingkit",
          "sheetmetal",
          "smgbody",
          "metalspring",
          "sticks",
          "tarp",
          "techparts",
          "scrap",
          "apple",
          "can.tuna",
          "chocholate",
          "granolabar",
          "smallwaterbottle",
          "cctv.camera",
          "targeting.computer",
          "metal.refined",
          "can.beans",
          "crude.oil",
          "lowgradefuel",
          "largemedkit",
          "syringe.medical",
          "bandage"
        ]
      },
      "Developer": {
        "AmountChange": false,
        "Debug": false,
        "ExtraItem": false,
        "Skins": false
      },
      "Exclude": {
        "list": [
          "supply.signal",
        ]
      },
      "ExcludeFromMultiplication": {
        "list": [
        ]
      },
      "Loot": {
        "AmountMin": 2,
        "Enabled": true,
        "ItemsMax": 5,
        "ItemsMin": 2,
        "PreventDuplicates": true,
        "WorkshopSkins": false
      },
      "Settings": {
        "Multiplier": 1,
        "MultiplierComponents": 2,
        "MultiplyOnlyComponents": true
      }
    }
     
  14. Configuration has nothing to do with item limits
     
  15. Okay, but with my config files, it's not only the components in the top list which are multiplied?
     
  16. If you have multiply only components then it shouldn't be modifying binoculars etc yes, check the limits just in case though.
     
  17. Hey I've been trying to make the barrels balance with my 5x all server but for some reason the barrel loot still doesn't drop a 5x multiplier towards components however it drop random loot out of purple containers? I've been going through the config but nothing happened yet. any way to fix this?
     
  18. Thanks for the response. I agree, it seems strange that vanilla rust would refresh loot containers. The only logical explanation I can really think of is that when a LootContainer tries to spawn in the same location, it resets/refreshes the container and doesn't trigger OnEntitySpawn. Hopefully @Wulf will have some insight.
     
  19. @Norn
    @Wulf

    Did another experiment today. I reloaded the mod to refresh all loot, and marked 12 crates at power plant monument and wrote down what was in each crate. Each one had x3 loot and all seemed to be in order. I checked in on the crates about every 15 minutes, each time there being a new crate that was bugged. Also interestingly, I found that the original loot changed. For example, one of the crates originally had 6 springs and 24 scrap. When I checked it 30 minutes later, it only had 1 smg part and 8 scrap. I found this consistent with every other crate after some undetermined amount of time. So the crates are definitely refreshing their loot, but not sure what is causing it and the mod isn't catching it.

    ** Followup **
    Checked on crates an hour later, they refreshed again and have different loot, still not 3x
     
    Last edited by a moderator: May 18, 2017
  20. Appreciate the effort you're putting in man, this has been an issue that has been annoying me for a while. Hopefully get it sorted.