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.

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
-
Kunazai updated Magic Loot with a new update entry:
0.1.15
-
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 -
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. -
But I see table loot changes with MagicLoot for airdrop, heli (maybe tank?)
Can we fix it ? -
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] -
Thank you very much -
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. -
-
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. -
I haven't used this feature myself yet. I will possibly do an overhaul to this part of the mod after I review it. -
Does the new version actually work and not crash the server ?
-
[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... -
-
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! -
-
-
-
-