Setting minimum amount to 0Not An Issue

One of the things I use Extra Loot for is to give a chance for a custom skinned item to appear in 2 of the loot crates. This item is a "VPN" that is part of the Drug Business plugin. It's a reskinned small battery. I had set the chances for it to spawn to 5% but it was still spawning way too much in the loot crates, so I set the minimum to 0 and maximum to 1, so even if it hit's the 5% chance, there's still a chance it won't spawn. I don't understand why it's spawning so often at 5% in the first place. Anyway, I get this error in my console when it picks the minimum:

Creating item with less than 1 amount! (Battery - Small)

I don't think this is really a concern, I don't believe it's causing any issues with the server, but I guess my real question is, does the % chance for an item spawn work correctly? This item spawns WAAAAAY too much for 5%. For reference, here's my config:

{
  "ShortName -> Items": {
    "crate_elite": [
      {
        "1. ShortName": "hat.gas.mask",
        "2. Chance": 5.0,
        "3. Minimal amount": 1,
        "4. Maximal Amount": 1,
        "5. Skin Id": 0,
        "6. Display Name": "Gas Mask",
        "7. Blueprint": false
      }
    ],
    "crate_normal": [
      {
        "1. ShortName": "battery.small",
        "2. Chance": 2.0,
        "3. Minimal amount": 0,
        "4. Maximal Amount": 1,
        "5. Skin Id": 2645299478,
        "6. Display Name": "VPN Flash Drive",
        "7. Blueprint": false
      }
    ],
    "crate_normal_2": [
      {
        "1. ShortName": "battery.small",
        "2. Chance": 2.0,
        "3. Minimal amount": 0,
        "4. Maximal Amount": 1,
        "5. Skin Id": 2645299478,
        "6. Display Name": "VPN Flash Drive",
        "7. Blueprint": false
      }
    ]
  }
}​

will investigate and get back to you.

Merged post

So the current method calculates a random number between 0 and 100 and if your setting is greater then this then it will get added..

you could really reduce that number down as if the random numbers are favoring low you will get more then 5%. I can inverstigate a different method to determine if it can be added or raise the max from 100 to say 1000.

You do not want to make an item value of 0 

I've been using minimal amount 0 for the last few months, when I posted this and I don't see any adverse effects.

Locked automatically