Crate maximum quantity setting not workingSolved
Hi there! So I have been editing my config file and adding new crates to the loot whilst also making the maximum quantity to 4 and minimum to 2. However for some reason crates are still spawning 6 items. I have made sure to add the correct Crate name too. Please help! 

CONFIG

{
  "Barrel": {
    "barrelTypes": "loot-barrel|loot_barrel|loot_trash",
    "enableBarrels": true,
    "maxItemsPerBarrel": 3,
    "minItemsPerBarrel": 1,
    "refreshBarrels": true
  },
  "Crate": {
    "crateTypes": "crate_normal|crate_normal_2|crate_tools",
    "enableCrates": true,
    "maxItemsPerCrate": 4,
    "minItemsPerCrate": 1,
    "refreshCrates": true
  },
  "Generic": {
    "blueprintProbability": 0.11,
    "listUpdatesOnLoaded": true,
    "refreshMinutes": 30,
    "removeStackedContainers": true,
    "WatchedPrefabs": [
      "assets/bundled/prefabs/radtown/crate_basic.prefab",
      "assets/bundled/prefabs/radtown/crate_elite.prefab",
      "assets/bundled/prefabs/radtown/crate_mine.prefab",
      "assets/bundled/prefabs/radtown/crate_normal.prefab",
      "assets/bundled/prefabs/radtown/crate_normal_2.prefab",
      "assets/bundled/prefabs/radtown/crate_normal_2_food.prefab",
      "assets/bundled/prefabs/radtown/crate_normal_2_medical.prefab",
      "assets/bundled/prefabs/radtown/crate_tools.prefab",
      "assets/bundled/prefabs/radtown/crate_underwater_advanced.prefab",
      "assets/bundled/prefabs/radtown/crate_underwater_basic.prefab",
      "assets/bundled/prefabs/radtown/foodbox.prefab",
      "assets/bundled/prefabs/radtown/loot_barrel_1.prefab",
      "assets/bundled/prefabs/radtown/loot_barrel_2.prefab",
      "assets/bundled/prefabs/autospawn/resource/loot/loot-barrel-1.prefab",
      "assets/bundled/prefabs/autospawn/resource/loot/loot-barrel-2.prefab",
      "assets/bundled/prefabs/autospawn/resource/loot/trash-pile-1.prefab",
      "assets/bundled/prefabs/radtown/loot_trash.prefab",
      "assets/bundled/prefabs/radtown/minecart.prefab",
      "assets/bundled/prefabs/radtown/oil_barrel.prefab",
      "assets/prefabs/npc/m2bradley/bradley_crate.prefab",
      "assets/prefabs/npc/patrol helicopter/heli_crate.prefab",
      "assets/prefabs/deployable/chinooklockedcrate/codelockedhackablecrate.prefab",
      "assets/prefabs/misc/supply drop/supply_drop.prefab"
    ]
  },
  "Rarity": {
    "Override": {
      "autoturret": 4,
      "lmg.m249": 4,
      "targeting.computer": 3
    }
  }
}​
Did you make a change in the actual loot table file as well?
Wait what do I change in that sorry. I'm still new to the plugin
1d703380154f86e1bbfd332f9170780e.jpg RocketManKian
Wait what do I change in that sorry. I'm still new to the plugin

Loot tables

1d703380154f86e1bbfd332f9170780e.jpg RocketManKian
Wait what do I change in that sorry. I'm still new to the plugin

Any changes you make to the DATA loottable json file must be done with the plugin unloaded (or server off) save settings then reload plugin (start server) any (data)  changes you make will not save if plugin is running.
Make sure you check any changes you make with a json validator, https://jsonlint.com/
The CONFIG file deals mostly with prefabs being watched by the plugin and the rarity of items you want restricted (max is 4 = very rare)
The DATA LootTable allows you to configure how many of any items (that are listed in the NamesList) If you find that an item is not in any of the containers in the data LootTable you can add them from the Nameslist just make sure you follow the same format (check you dont miss any comma's etc) You can also remove items you dont want in the containers (i usually replace with ones i want) .
Remember that plugin must be unloaded when you make any changes to the data file.
*To reduce downtime on the server (and also my server will log me out after approx 8 minutes) I usually copy the entire data json file to a text (new text file) on my desktop , I can then edit it, save and  *check it with json editor then replace the existing data file with the edited one (again with plugin unloaded) save and reload plugin,

I apologise for the repeated *unload instruction but there have been many posts that are created when that procedure is not followed.
You will also read a few posts that involve the use of third party editors (i dont use) but you will also read that the dev for this plugin does not support them,  its up to you.

Locked automatically