Hello,
I've been fixing this for a few minutes and I'm not sure if I am correct or not. There isn't any available documentation or detailed explanation on the percentage of the loot drop because whatever I try to set is always a lot still. I'm trying to adjust the rarity of the drops in zombies as an experiment and get into modding PZ.
This is what I've written so far and for a total of 20 zombies I kill I get about 5-7 items that I've set. Is the game ignoring the values I've input or is there a limit? Also I've set it to only drop on male zombies because putting the items on both male and female zombies drops a lot.
Distributions = Distributions or {};
-- custom distributions table
local nDistTable = {
all = {
inventorymale = {
rolls = 1,
items = {
"Crisps", 0.007,
"Crisps2", 0.002,
"Chocolate", 0.002,
"SunflowerSeeds", 0.002,
"Peanuts", 0.002,
"MintCandy", 0.002,
"Lollipop", 0.002,
}
},
},
}
-- insert
table.insert(Distributions, 1, nDistTable);
-- for mod compat:
SuburbsDistributions = nDistTable;
Above is the first code I've written, the second one below still drops the same amount of items.
require "Items/SuburbsDistributions"
local i;
local nDistTable = {
"Crisps", 0.007,
"Crisps2", 0.002,
"Chocolate", 0.002,
"SunflowerSeeds", 0.002,
"Peanuts", 0.002,
"MintCandy", 0.002,
"Lollipop", 0.002,
}
for i = 1, #nDistTable, 2 do
table.insert(SuburbsDistributions["all"]["inventorymale"].items, nDistTable[i]);
table.insert(SuburbsDistributions["all"]["inventorymale"].items, nDistTable[i+1]);
end
myDistTable = nil;
Any feedback or suggestions is appreciated and I'd like to improve it more.