Jump to content
francogp

SuburbsDistributions problems with zombies

Recommended Posts

Hello,

I have a problem with the distribution numbers.

I'm using distributions like:

table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.00001);

but I can get those items every 3 o 4 zombies... why?

Share this post


Link to post
Share on other sites

Hello,

I have a problem with the distribution numbers.

I'm using distributions like:

table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.00001);
but I can get those items every 3 o 4 zombies... why?

What item is it maybe its already defined in male zombies distribution. Btw i think the lowest value is 0.01 by program so unless you modify game file it will be at that minimum

Share this post


Link to post
Share on other sites

snipt

 

 

Nope... its an unique item (moded one, custom name) so no other definitions. Spiffo item (official item) has a value of "Base.Spiffo" = 0.0005, so its supported lower values than 0.01

Share this post


Link to post
Share on other sites

Well sometimes the programmer forgot that they set the limitation in their program Lol

snipt

Nope... its an unique item (moded one, custom name) so no other definitions. Spiffo item (official item) has a value of "Base.Spiffo" = 0.0005, so its supported lower values than 0.01
i am quite sure of this. That is why we find a lot of walkie talkies even if its spawn chance is set very2 rare

Share this post


Link to post
Share on other sites

Hello,

I have a problem with the distribution numbers.

I'm using distributions like:

table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.00001);

but I can get those items every 3 o 4 zombies... why?

 

 

Check out ItemPicker.rollItem in ItemPicker.lua, if you haven't already, I think that is the function that adds loot, and here is the roll for loot:

if ZombRand(10000) <= ((((itemNumber*100) * lootModifier) + (zombieDensity * 10))) then	-- make an item in the container of that type.

print those values and check out what's going wrong.

                    if unlucky then                        itemNumber = itemNumber - 1;                        if itemNumber<0.1 then                            itemNumber=0.1;                        end                    end

That line is pretty odd... Either 0.1 is the lowest possible value for some reason, or the unucky trait will actually INCREASE your chances of finding ultra-rare loot?

 

 

Anyway - if it just doesn't work out, you could also try to do it like mods like ORGM. They wrote their own functions for item distribution. 

Share this post


Link to post
Share on other sites

Hello,

I have a problem with the distribution numbers.

I'm using distributions like:

table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.00001);
but I can get those items every 3 o 4 zombies... why?

 

 

Check out ItemPicker.rollItem in ItemPicker.lua, if you haven't already, I think that is the function that adds loot, and here is the roll for loot:

if ZombRand(10000) <= ((((itemNumber*100) * lootModifier) + (zombieDensity * 10))) then	-- make an item in the container of that type.
print those values and check out what's going wrong.

if unlucky then                        itemNumber = itemNumber - 1;                        if itemNumber<0.1 then                            itemNumber=0.1;                        end                    end
That line is pretty odd... Either 0.1 is the lowest possible value for some reason, or the unucky trait will actually INCREASE your chances of finding ultra-rare loot?

 

 

Anyway - if it just doesn't work out, you could also try to do it like mods like ORGM. They wrote their own functions for item distribution.

Yea that line is what i see last time also i think it limits distribution to cap at 0.1 i thought i see 0.01 last time i forgot Lol

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...