Locker include boxes option wrong loot table & players turret not shoot npcsSolved

Dear Nivex! 
I bought your nice plugin what use more than a year! I have some bases with boxes and lockers.

If i set these options :
1.  "Move Items Into Lockers": true,
2.  "Additional Containers To Include As Boxes": ["locker"],

than need to be loot the lockers too to finish the raid. It working fine, but the loot table isn't good. 
On same base without 2. option spawns 60 items to the base for boxes and lockers, with 2. option only get 28 items. Why? it's a bug?  

My another problem is from 2.0.1 version if the player place an autoturret to the "front of raid base", it not shooting the spawned npc, only when the turret take damage from NPC. If only one NPC take damage to player turret, the turret only shooting one of NPC who shooted it. Any option to resolve this problem ? Before update it working fine.
Thanks your reply

hi !

count the amount of items by opening each box and locker to see. items also go into the cupboard, in ovens, and other containers if configured. it is probably just a display bug

i've fixed the turret issue in the next update

we will wait the turret issue fix. thx
The locker setting problem :  What do you mean under display bug? In the console, it say the base generated with 30 item in case of Locker config and without it, the usual amount of ~60 item spawned on the same base what we tried. It looks like, that when the plugin try to distinguish the loot, when the locker config set, then it break at some point and not continue the box filling with the rest of the loot. For example, the top of the base containers remain empty with the config, without it, every configured item is there.

yea i'm not sure I will check it out soon. go count the containers and instead of the displayed amount

The test base have
18x Large box
54x small box
10x locker
10x furnace

Here is my base loot for nivex4.json https://pastebin.com/u0ptjEM4

On load plugin shown the problem. :  On same server, same loot tables the log with locker option

Loaded 45 items from RaidableBases/Base_Loot/nivex1
Loaded 59 items from RaidableBases/Base_Loot/nivex2
Loaded 52 items from RaidableBases/Base_Loot/nivex3
Loaded 52 items from RaidableBases/Base_Loot/nivex4
Loaded 52 items from RaidableBases/Base_Loot/nivex5
Loaded plugin Raidable Bases v2.0.1 by nivex
.
.
.
[Raidable Bases] night15 @ G0 : 32 items

I don't use nivex5 profile (file is "empty") only use 1 to 4. but it shown on plugin load.

Without locker as container
Loaded 48 items from RaidableBases/Base_Loot/nivex1
Loaded 58 items from RaidableBases/Base_Loot/nivex2
Loaded 60 items from RaidableBases/Base_Loot/nivex3
Loaded 65 items from RaidableBases/Base_Loot/nivex4
Loaded plugin Raidable Bases v2.0.1 by nivex
.
.
.
[Raidable Bases] night15 @ G0 : 60 items

zip your oxide/config and oxide/data/RaidableBases folder and send to me via DM

i send a dm to you nivex. Please check. thanks

"amountMin": 0

this is why you're having issues. almost every single item you are using has amountMin set to 0 and if it picks 0 between the amountMin and amount then it will not spawn the item.

this is by design. you need to have a lot of items to do something like this and it should be selectively set to 0 rather than nearly everything set to 0.

you can create an entire loot table list by looking in the documentation and searching for rb.populate

on nightmare base type (nivex4) on my server , when set the locker to include as boxes cannot spawn for example C4 (timed.explosive).
On nivex4.json we set: 
"shortname": "explosive.timed",
"amount": 130,
"skin": 0,
"amountMin": 55

The problem isn't with items where amountMin 0 , and amount 1 like SupplySignal.

Other loots where amountMin != 0 thats not spawning with "locker include as boxes" option.

ok hold on

Merged post

amountMin set as 0 is definitely a problem

again, you do not have enough loot to spawn the required amount because so many items are using amountMin set to 0

i will look at the c4 problem

Merged post

(09:44:49) | RaidableBases was compiled successfully in 2688ms
(09:44:51) | -
Loaded 47 items from RaidableBases/Base_Loot/nivex1
Loaded 59 items from RaidableBases/Base_Loot/nivex2
Loaded 60 items from RaidableBases/Base_Loot/nivex3
Loaded 65 items from RaidableBases/Base_Loot/nivex4
(09:44:51) | Calling 'OnServerInitialized' on 'RaidableBases v2.0.2' took 367ms
(09:44:51) | Loaded plugin Raidable Bases v2.0.2 by nivex
(09:45:18) | Unloaded plugin Raidable Bases v2.0.2 by nivex
(09:45:18) | -
Loaded 47 items from RaidableBases/Base_Loot/nivex1
Loaded 59 items from RaidableBases/Base_Loot/nivex2
Loaded 60 items from RaidableBases/Base_Loot/nivex3
Loaded 65 items from RaidableBases/Base_Loot/nivex4
(09:45:18) | Loaded plugin Raidable Bases v2.0.2 by nivex

this is before and after adding locker to Additional Containers To Include As Boxes i am using the files you've sent me and not having this issue, however, I did notice a problem with your post above

your above post shows you using two different loot table configurations which is why their amounts differ. one has nivex5, and the other does not

try and figure out that situation and let me know your findings

we tried sometimes with same base. If the base have more than one of locker, the loottable spawns bad...~32 items...
If i remove the lockers and only leave 1 of it, copy the base, and spawn it with rbe command the loot spawns correct ~50 items.
This problem is only when i add this option : "Additional Containers To Include As Boxes": ["locker"],

Merged post

Here is 2 base what i tested with my nivex4.json config file. I have more bases with same problem.

The first is have only one locker and spawns the loot correct. ~50 items with my config.
https://www.dropbox.com/s/y4s53c25p8wt5ru/baseonelocker.json?dl=0

And here is SAME base with more locker, the loot spawns bad. ~30 items with my config.
https://www.dropbox.com/s/1l9ivzc3wd11un5/basemorelocker.json?dl=0

fixed the locker issue

you will need to add more variety to your loot in order to have less variance

ok thanks you, my problem 2.0.2 update is solved by your fixed the locker issue. Thanks man! 

no problem

Locked automatically