Magic Loot

Simple components multiplier & loot system

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

5/5, 44 likes
  1. Did you set the crate to false or did you remove the entry?
    [DOUBLEPOST=1508135975][/DOUBLEPOST]
    That is still not a thing, it is more complicated to have an efficient system to spawn vanilla loot that ignores items and blueprint drops. Unless of course you don't mind the system being terrible. Terrible being I would just skip over the piece of loot and not find a replacement. Finding a replacement could lag your server if not done correctly, which will take time.

    [DOUBLEPOST=1508136238][/DOUBLEPOST]
    If you remove a loot container entry where that loot container spawns on the map, you will get those messages unless you set ReportMissingConfigCrates to false. That feature is there in case any new loot containers are added to the game, it will let you know that you need to add the new container. If you want to leave ReportMissingConfigCrates set to true for the reporting feature, leave the heli_crate and bradley_crate entry in, but set them to enabled: false
     
    Last edited by a moderator: Oct 16, 2017
  2. I don't :O

    I will try to manually add this, I work for the moment ^^'
     
  3. hmmm the old config was much simpler and worked for me. Now i get invisible slots and small amount of items.
    [DOUBLEPOST=1508167138][/DOUBLEPOST]
    Code:
    | Unloaded plugin MagicLoot v0.1.19 by Norn / Kunazai
    (16:18:18) | [MagicLoot] Loaded 332 item limits from /data/MagicLoot.json
    (16:18:18) | [MagicLoot] Loaded 34 components from /config/MagicLoot.json
    (16:18:18) | [MagicLoot] Loaded at x2 vanilla rate | components rate x2  [Extra Loot: False | X Only Components: False]
    (16:18:18) | Failed to call hook 'OnServerInitialized' on plugin 'MagicLoot v0.1.19' (InvalidOperationException: Collection was modified; enumeration operation may not execute.)
    (16:18:18) | at System.Collections.Generic.List`1+Enumerator[Item].VerifyState () [0x00000] in <filename unknown>:0
      at System.Collections.Generic.List`1+Enumerator[Item].MoveNext () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.MagicLoot.ModifyContainerContents (.BaseNetworkable entity) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.MagicLoot.RepopulateContainer (.LootContainer container) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.MagicLoot.RefreshLootContainers () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.MagicLoot.OnServerInitialized () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.MagicLoot.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
    (16:18:18) | Loaded plugin MagicLoot v0.1.19 by Norn / Kunazai
    brand new config. Yes i deleted the old one. Ive literally only changed the min and maz numbers. Nothing else. Checked countless times.
     
  4. Getting this error.

    [SERVER v1.0.24] Console: MagicLoot.cs(23,13): warning CS0169: The private field `Oxide.Plugins.MagicLoot.lastMinute' is never used
    MagicLoot.cs(109,30): warning CS0414: The private field `Oxide.Plugins.MagicLoot.ItemList' is assigned but its value is never used
     
  5. Please share your config.
    [DOUBLEPOST=1508179494][/DOUBLEPOST]
    Thanks for reporting this.
     
  6. Code:
    {
      "_Settings": {
        "DisableBlueprintDropMultiplier": true,
        "ForceRefreshDisabledCratesOnLoad": false,
        "ItemListMultiplier": 2,
        "Multiplier": 2,
        "MultiplyOnlyItemList": false,
        "RandomWorkshopSkins": true,
        "ReportMissingConfigCrates": true
      },
      "DeveloperDebug": {
        "_EnableLogs": false,
        "AmountChange": true,
        "ExtraItem": true,
        "LootRefresh": false,
        "Skins": true
      },
      "Exclude": {
        "list": [
          "supply.signal",
          "ammo.rocket.smoke"
        ]
      },
      "ExcludeFromMultiplication": {
        "list": [
          "crude.oil"
        ]
      },
      "ExtraLoot": {
        "Enabled": true,
        "ExtraItemsMax": 3,
        "ExtraItemsMin": 1,
        "ItemStackSizeMin": 1,
        "PreventDuplicates": false,
        "VanillaLootTablesOnly": true
      },
      "ItemList": {
        "list": {
          "bleach": 1.0,
          "ducttape": 1.0,
          "gears": 1.0,
          "glue": 1.0,
          "metalblade": 1.0,
          "metalpipe": 1.0,
          "propanetank": 1.0,
          "riflebody": 1.0,
          "roadsigns": 1.0,
          "rope": 1.0,
          "semibody": 1.0,
          "sewingkit": 1.0,
          "sheetmetal": 1.0,
          "smgbody": 1.0,
          "metalspring": 1.0,
          "sticks": 1.0,
          "tarp": 1.0,
          "techparts": 1.0,
          "antiradpills": 1.0,
          "wood": 1.0,
          "apple": 1.0,
          "chocholate": 1.0,
          "granolabar": 1.0,
          "can.beans": 1.0,
          "can.tuna": 1.0,
          "metal.fragments": 1.0,
          "lowgradefuel": 1.0,
          "largemedkit": 1.0,
          "syringe.medical": 1.0,
          "black.raspberries": 1.0,
          "blueberries": 1.0,
          "bandage": 1.0,
          "metal.refined": 1.0,
          "scrap": 1.0
        }
      },
      "LootContainersEnabled": {
        "list": {
          "bradley_crate": {
            "enabled": true,
            "minExtraItems": 0,
            "maxExtraItems": 0,
            "lootMultiplier": 1.0
          },
          "crate_elite": {
            "enabled": true,
            "minExtraItems": 0,
            "maxExtraItems": 0,
            "lootMultiplier": 1.0
          },
          "crate_mine": {
            "enabled": true,
            "minExtraItems": 2,
            "maxExtraItems": 3,
            "lootMultiplier": 1.0
          },
          "crate_normal": {
            "enabled": true,
            "minExtraItems": 1,
            "maxExtraItems": 3,
            "lootMultiplier": 1.0
          },
          "crate_normal_2": {
            "enabled": true,
            "minExtraItems": 0,
            "maxExtraItems": 0,
            "lootMultiplier": 1.0
          },
          "crate_normal_2_food": {
            "enabled": true,
            "minExtraItems": 0,
            "maxExtraItems": 0,
            "lootMultiplier": 1.0
          },
          "crate_normal_2_medical": {
            "enabled": true,
            "minExtraItems": 0,
            "maxExtraItems": 0,
            "lootMultiplier": 1.0
          },
          "crate_tools": {
            "enabled": true,
            "minExtraItems": 0,
            "maxExtraItems": 0,
            "lootMultiplier": 1.0
          },
          "foodbox": {
            "enabled": true,
            "minExtraItems": 2,
            "maxExtraItems": 3,
            "lootMultiplier": 1.0
          },
          "loot_barrel_1": {
            "enabled": true,
            "minExtraItems": 2,
            "maxExtraItems": 3,
            "lootMultiplier": 1.0
          },
          "loot_barrel_2": {
            "enabled": true,
            "minExtraItems": 1,
            "maxExtraItems": 3,
            "lootMultiplier": 1.0
          },
          "loot-barrel-1": {
            "enabled": true,
            "minExtraItems": 0,
            "maxExtraItems": 0,
            "lootMultiplier": 1.0
          },
          "loot-barrel-2": {
            "enabled": true,
            "minExtraItems": 1,
            "maxExtraItems": 3,
            "lootMultiplier": 1.0
          },
          "oil_barrel": {
            "enabled": true,
            "minExtraItems": 1,
            "maxExtraItems": 3,
            "lootMultiplier": 1.0
          },
          "stocking_large_deployed": {
            "enabled": true,
            "minExtraItems": 1,
            "maxExtraItems": 3,
            "lootMultiplier": 1.0
          },
          "stocking_small_deployed": {
            "enabled": true,
            "minExtraItems": 0,
            "maxExtraItems": 5,
            "lootMultiplier": 1.0
          },
          "supply_drop": {
            "enabled": true,
            "minExtraItems": 2,
            "maxExtraItems": 4,
            "lootMultiplier": 1.0
          },
          "trash-pile-1": {
            "enabled": true,
            "minExtraItems": 2,
            "maxExtraItems": 5,
            "lootMultiplier": 1.0
          }
        }
      }
    }


    Ok so i did a fresh config . set all mins an maxes to 1 or 2 , changed vanilla only to false. (even set as true the error was produced) All I want is the functionality of the original plug in. Now its just chucking out scrap and components. Where as before just plugging in the plug in would make all containers spew out all manner of items from clothing to weapons. Im saddened.







    UPDATE: managed to sort the console errors by adjusting min and max amounts logically. However the issue now is blank loot spots in all containers. As if it isnt pulling from a loot table correctly. Thanks.
     
    Last edited by a moderator: Oct 16, 2017
  7. I never took out any original functionality, it is still there. All you need to change is to set VanillaLootTablesOnly to false and it'll start using your \data\MagicLoot.json again. There were quite a few people who didn't like using \data\MagicLoot.json and only wanted extra loot from vanilla tables.

    You can also completely ignore the values in loot containers and simply change the min/max count in ExtraLoot. Those are additive with loot container's min and max. You only need to change it for specific containers if you want extra control over each container.

    Lastly, your config looks fine and I get the same error, I'll investigate why this is happening.
     
  8. UPDATE 2: Ok SO If i enabled the Extra loot option in the config. That then causes the error:

    Code:
    (20:44:06) | Unloaded plugin MagicLoot v0.1.19 by Norn / Kunazai
    (20:44:06) | [MagicLoot] Loaded 332 item limits from /data/MagicLoot.json
    (20:44:06) | [MagicLoot] Loaded 34 components from /config/MagicLoot.json
    (20:44:06) | [MagicLoot] Loaded at x1 vanilla rate | components rate x3  [Extra Loot: True | X Only Components: False]
    (20:44:06) | [MagicLoot] Added 50 items to Common list.
    (20:44:06) | [MagicLoot] Added 72 items to Rare list.
    (20:44:06) | [MagicLoot] Added 86 items to Uncommon list.
    (20:44:06) | [MagicLoot] Added 22 items to Very Rare list.
    (20:44:06) | Creating item with less than 1 amount! (Concrete Barricade)
    (20:44:06) | Failed to call hook 'OnServerInitialized' on plugin 'MagicLoot v0.1.19' (NullReferenceException: Object reference not set to an instance of an object)
    (20:44:06) | at Oxide.Plugins.MagicLoot.ModifyContainerContents (.BaseNetworkable entity) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.MagicLoot.RepopulateContainer (.LootContainer container) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.MagicLoot.RefreshLootContainers () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.MagicLoot.OnServerInitialized () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.MagicLoot.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
    (20:44:06) | Loaded plugin MagicLoot v0.1.19 by Norn / Kunazai
    [DOUBLEPOST=1508183191][/DOUBLEPOST]btw i cleared my old data folder before installing this . So im not sure what itd pull the info from .
     
  9. Thanks for the reporting, I found a solution to your first problem. You don't have minecart in your config, but it was trying to run code as if you did. I'll see if your change in config just now still triggers with my code changes.
    [DOUBLEPOST=1508183594][/DOUBLEPOST]I see the problem, because of the new loot multiplier additions, there is new rounding, and there is a chance it could result in a 0. I'll put a check in for this.
    [DOUBLEPOST=1508183944][/DOUBLEPOST]Actually, rounding isn't the issue, I was doing it right. I found the issue, I'll push a fix soon.
     
  10. well im confused. Im getting empty boxes. The main issue :/
    [DOUBLEPOST=1508184021][/DOUBLEPOST]oh sorry posted before i saw your reply. :)
     

    Attached Files:

  11. Just fyi, it is likely not invisible items. The mod just changes the capacity of the loot container needlessly, something I'm also fixing. Also, if a container is spawning with less loot than expected, keep in mind that when extra items are spawned in, they will stack with other items already in container if it can.

    I also encountered a conflict issue with FancyDrop. FancyDrop overwrites any loot MagicLoot spawns in for supply_drop containers. I also don't see an option in FancyDrop to disable this.
     
  12. removed
     
    Last edited by a moderator: Oct 16, 2017
  13. removed
     
    Last edited by a moderator: Oct 16, 2017
  14. Kunazai updated Magic Loot with a new update entry:

    0.1.19.1

     
  15. hmm i am using fancy drop . It just has the "use custom loot table" option.
     
  16. Yeah, I have that set to false and it still overwrites it.
     
  17. ok so far so good. no more error spam in the console on reload.
    [DOUBLEPOST=1508190877][/DOUBLEPOST]Ok so i think im understanding this correct. The empty slots are kind of like reserved slots due to me choosing a max amount of items for the container. Its then RNG ow many items it spawns on each refresh , for said container. For example an elite crate has 4 items . I chose 8max but 4 min. So on this occassion although it has 4 empty slots , this is RNG. It has on this occasion only spawned the minimum set amount. I hope that makes sense.
     
    Last edited by a moderator: Oct 16, 2017
  18. Another thing about open loot slots in containers, in vanilla there are 6 slots available, but it only fills what it needs. I adopted this behavior and just increase the amount of slots available if it wants to put more loot int. I have the max capped out at 18 as that was what it was before I took over. There was a conflict between my code and old code that was always setting the capacity to 18.
     

  19. right ok . making sense now. Well above all else its starting to pop containers with decent loot now. Not every container , its very RNG . Id need to configure better my CFG file. Thanks for taking the time.
     
  20. If it helps, the min and and max in Extra loot applies to all containers, where the ones in the container list only apply to that container. And they're added together. So if you have it 1-3 on general and 1-5 on a specific container, it will be a random number between 2-8 extra slots added. It will have nothing to do with individual amounts of each item, just how many extra pulls from the loot table.