Use that file?

LootConfig
Allows you to adjust the server's loot list
Total Downloads: 14,988 - First Release: Mar 27, 2015 - Last Update: May 20, 2018
- 5/5, 21 likes
-
Nogrod updated LootConfig with a new update entry:
1.0.18
-
the way it its, your version only drops minimum value (itemAmountData.Amount).
and thanks for this awesome plugin! -
-
-
Your change is based on the hypothesis that this plugin does spawn the loot into containers.
But it does'nt.
The part you changed does already contain all information which was exported and and which is needed to import again.
The data there is based on the class ItemAmountRangedData, which contains also MaxAmount:Code:public class ItemAmountRangedData { public string Shortname { get; set; } public float Amount { get; set; } public float MaxAmount { get; set; } }
The server does use for item spawn calculation a server function, which the plugin does not inlcude and also not needs to include, because it changes only the data, nothing else.
The server uses this function to get the amounts, from both values:Code:// ItemAmountRanged public override float GetAmount() { if (this.maxAmount > 0f && this.maxAmount > this.amount) { return UnityEngine.Random.Range(this.amount, this.maxAmount); } return this.amount; }
Thx for reading -
Code:472 amounts[i] = new ItemAmountRanged(def, itemAmountData.Amount);
the plugin was dropping only the Amount value in barrels and crates, not randomizing between Amount and MaxAmount, at least in my server.
i'm really sorry if i misunderstand something, and was not my intent to undermine Nogrod's excellent work.
if something i said looks like that, it's because of my poor english, and i really apologize for that. -
i don't know if it's intend to, but in that code, maxAmount will never be reached.
Unity - Scripting API: Random.Range -
-
The loot at the sphere is still plan old rope, sheetmetal, water and crap
-
if you have, remove all but LootConfig.cs, remove LootConfig.json, restart the server, edit new generated LootConfig.json to make the changes you want, and type on console: loot.reload. -
-
what do you want to do? if you want to change all loots to drop a lot of stuff everywhere, ignoring default drops, you can use BetterLoot.
if you want just change amounts and keep vanilla drop types, use LootConfig only. with LootConfig you can actually change the drops, but it's will be a bit more complicated.
i think you can use both, but i don't know how to set up in this case. -
After todays update LootConfig dosen`t work for me anymore.
The conifg file it generates is just "{}".
Anyone having the same issue or is that just on my side? -
i just saw the file i posted with (in Fujikura's words) "total wrong" fix was deleted.
so i tried to use original file from Nogrod in my linux rust server to see if that problem still persists, and it keeps dropping only the minimum value.
imho it's easy to see that have a bug on that code just looking at wood drop in barrels. in any vanilla server it drops between 100 and 150 wood, but after using LootConfig the way it is, only drops 100. All components from barrels and crates have same behavior, only dropping the minimum amount.
i would like to know if anyone using this original plugin get random drops, instead of only the min, because when i use my "total wrong" fix, it drops exactly as it should. am i doing something wrong and there is another way to fix this instead of changing original code? could the moderator that deleted that file explains to me what i did wrong?
because Fujikura's post, with my 15 years experience as c# developer, don't tell me why a new instance of that object can "magically" get the maxAmount value from another place, even looking in the decompiled code of that game class (that have another bug, btw, and i already reported to facepunch).
[DOUBLEPOST=1485645261][/DOUBLEPOST] -
maxAmount does not work for me.I will use your corrections to the plugin and works.
-
Nogrod updated LootConfig with a new update entry:
1.0.19
-
The requested attachment could not be found. when trying to download
-
Wulf Community Admin
-
I recently configured Loot Config for a primitive server, and have found the same problem as others. The loot only ever rolls the minimum value. Could you please advise Nogrod?