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
  1. Use that file?
     
  2. Nogrod updated LootConfig with a new update entry:

    1.0.18

     
  3. you forgot to fix the maxAmount issue. check line 472.
    the way it its, your version only drops minimum value (itemAmountData.Amount).

    and thanks for this awesome plugin! :)
     
  4. The plugin you attached is updated?
     
  5. yes. it's the Nogrod's 1.0.18 version with the fix.
     
  6. Thats nice that you share your experience, but you are total wrong.
    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; }
            }
    That complete part is written back into the server config, there's no need to change anything.
    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;
    }
    Please delete your posted version again and let people trust what Nogrod does produce and publish!
    Thx for reading
     
  7. why amount property is changed on amount array at line 472, and maxAmount don't when that object is created and set to amounts array?
    Code:
    472    amounts[i] = new ItemAmountRanged(def, itemAmountData.Amount);
    
    before i included the maxAmount there, all loots where dropping only the minimal value set in 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.
     
  8. thanks for share this code.
    i don't know if it's intend to, but in that code, maxAmount will never be reached.
    Unity - Scripting API: Random.Range
     
  9. I've used your plugin which you attached and it's been working great with min and max amount of loot in barrels/boxes, whereas it didn't previously.
     
  10. The loot at the sphere is still plan old rope, sheetmetal, water and crap :(
     
  11. do you have any plugins other than LootConfig that affects loot?
    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.
     
  12. Betterloot file
     
  13. BetterLoot changes all loot table from what you set there.

    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.
     
  14. 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?
     
  15. 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]
    just delete the plugin and the json file, restart the server, and after that, put plugin again. that should fix. if not, verify if you have the lastest game and oxide version installed correctly.
     
  16. maxAmount does not work for me.I will use your corrections to the plugin and works.
     
  17. Nogrod updated LootConfig with a new update entry:

    1.0.19

     
  18. The requested attachment could not be found. when trying to download
     
  19. Wulf

    Wulf Community Admin

    Random versions posted in threads are always removed; it's not about you, just to prevent unnecessary moderation load and confusion/conflicts. Feel free to make suggestions and such though.

    Should be fixed now, the site can be a bit wonky.
     
  20. 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?