Magic Loot

Simple components multiplier & loot system

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

5/5, 44 likes
  1. Sorry guys, revert to old version of mod for now. I deleted the newest update. Norn only partially implemented an update of mine, which resulted in some massive problems.
    [DOUBLEPOST=1508002472][/DOUBLEPOST]Converting mod to use vanilla refresh system instead of custom one, the faulty version was using both at the same time.
     
  2. Kunazai updated Magic Loot with a new update entry:

    0.1.15

     
  3. Hi,

    Thanks for update.

    I did update but config file doesn't change, maybe I don't understand but you said config files has changed?

    I'm FR so sorry if I don't understand
     
  4. Your old version should work as is without any problems. There aren't any new settings, just deleted some deprecated ones and added more to the default component list.

    However, if you still want to force load the new default config, you can delete your current config and reload the mod to have it generate you a new one.
     
  5. Oh sorry I understood config file change my bad

    But I see table loot changes with MagicLoot for airdrop, heli (maybe tank?)

    Can we fix it ?
     
  6. Also, I apologize for all the errors with the previous update (that is now removed). I gave only a fraction of code to Norn for the update and even that had a major bug in it. This new version should be clean and working well.
    [DOUBLEPOST=1508008494][/DOUBLEPOST]
    How about this, my next release I will add to the config a list of loot containers in game and you can mark which ones MagicLoot affects?
     
  7. Nice !

    WONDERFUL if you can

    Thank you very much
     
  8. I figured out the problem with the loot tables being insane.

    "Loot": {
    "AmountMin": 1,
    "Enabled": false, <------------- If you set this to true it adds EXTRA LOOT
    "ItemsMax": 3,
    "ItemsMin": 1,
    "PreventDuplicates": false,
    "WorkshopSkins": true

    turning it off only spawns 2 items per crate but I dont have millions of rugs and planters popping up.
    The extra loot table must be messed up.
     
  9. I have not messed with the code regarding the extra loot tables yet. I noticed some strange behavior myself with extra loot enabled. I don't use it on my main server so I have not looked into it yet, but since I'm taking over on the mod, I'll be sure to educate myself on the inner workings of it and try to improve it.
     
  10. Hey, I semi fixed it just now. Has to do with stackability of items.

    if (Convert.ToBoolean(Config["Loot", "Enabled"])) // Extra Loot Items
    {
    if (RarityList.Count == 0) { GenerateRarityList(); }
    if (RaritiesUsed.Count >= 1 && RaritiesUsed != null)
    {
    Rarity rarity = RaritiesUsed.GetRandom();
    ItemDefinition item;
    int itemstogive = UnityEngine.Random.Range(Convert.ToInt16(Config["Loot", "ItemsMin"]), Convert.ToInt16(Config["Loot", "ItemsMax"]));
    e.inventory.capacity = MAX_LOOT_CONTAINER_SLOTS;
    e.inventorySlots = MAX_LOOT_CONTAINER_SLOTS;
    for (int i = 1; i <= itemstogive; i++)
    {
    item = RarityList[rarity].GetRandom();
    if (e.inventory.FindItemsByItemID(item.itemid).Count >= 1 && item.stackable == 1 && Convert.ToBoolean(Config["Loot", "PreventDuplicates"]))
    { break; }
    if (item != null)
    {
    if (Exclude.list.Contains(item.shortname)) { break; }
    int limit = 0; int amounttogive = 0;
    if (LootData.ItemList.TryGetValue(item.shortname, out limit) && item.stackable > 1) { amounttogive = UnityEngine.Random.Range(Convert.ToInt16(Config["Loot", "AmountMin"]), 100); } else { amounttogive = 100; } <----------------- I added 100

    Changing this stopped the problem. Think it was using the max value as item stackability max. but I have the stack size controller setup so everything can stack to 9 mill. Not sure why the latest wipe made this happen now but ya it fixed it! Im sure theres a better way but this will work for now.
     
  11. You should be able to set the max amount of items that can be dropped for each specific item in /data/MagicLoot.json and disable it by setting max limit to 0.

    I haven't used this feature myself yet. I will possibly do an overhaul to this part of the mod after I review it.
     
  12. Does the new version actually work and not crash the server ? :)
     
  13. Workin for me
    [DOUBLEPOST=1508019808][/DOUBLEPOST]

    LMFAO, I'm not sure when that was changed but ya... the Data file has items set to 9999999 for almost all items... Didn't even think to check that...
     
  14. Its working on my server
     
  15. Failed to call hook 'OnServerInitialized' on plugin 'MagicLoot v0.1.15' (NullReferenceException: Object reference not set to an instance of an object)

    (17:47:03) | 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

    THIS IS LITERALLY SPAMMING MY CONSOLE? HELP!
     
  16. Try renaming the config from \config\MagicLoot.json to MagicLoot_BACKUP.json then reload the mod so it can generate a new config. If that doesn't work, trying doing the same thing with \data\MagicLoot.json. Then report if problem persists and post your config.
     
  17. I Believe its in the Data Folder, but all i changed in it was all items other then components to 0 ( i changed components to 50) as i only want components to come out of barrels. also the new updates makes things like explosives and apples come out as like 800,000
     
  18. Chance are you accidentally deleted a comma or something when you were modifying the json. You can try using an online json verifier in the future to catch the mistake.
     
  19. I have its a valid json. and how can i only have components coming out of barrels
     
  20. For now you can disable extra loot and just use the component multiplier. I plan a new feature for the mod to have extra loot only use vanilla loot tables, but you'll have to wait for that.