Project Zomboid

Project Zomboid

♥Kina♥ Jan 17, 2022 @ 12:44am
How -specifically- does item spawning work?
Let me start by saying right off the bat. I'm not looking for your 50 hour game playtime "This is how it works, because I just know, because I know" guesses. I've got 800+ hours in this game and have been playing it here and there over the time span of years, ever since kate and baldspot were even a thing which most of you now won't even know who they were since they haven't existed a long time. My guess is just as good as yours, if not better.. but I'm looking for facts here.

I'm not here to explore personal ideas or hypothesis. I literally want someone familiar with the games code itself or even someone backed by developers like EnigmaGrey who I believe is community manager, if not one of the developers themselves to answer else I'm just going to disregard posts entirely.

I know this all might sound harsh and straight forward, but I really want to get across that I'm not looking for "Muh big brain" guesses, I want to know from an actual coding standpoint here and I just don't want to be given false information is all.. I'm not trying to say I wouldn't appreciate the help, but it's not helping if what you're telling me is wrong.

Now... the reason why I ask is because over the years as I've added and used mods, I've always been under the impression that if you have things with high spawn rates, it will force things of lower spawn rate chance such as some necessary vanilla items to not spawn because the loot table will obviously call to and spawn things with higher rates first, starving out things of lower rate. My question is, how true is this? Do containers get limited by a set number of spawns for that specific container, or is every single item that is set for distribution to that container rolled as it's own separate chance?

What I mean by that is..

1. When a container rolls for loot spawn, will it first roll to establish a set number of spawns?;

This container will have 6 items.

And then

Roll for 6 items based on their chance.
(Possibly the same item rolled multiple times, since more than 1 of the same thing can be found)

Or

2. When a container rolls loot spawn, it just rolls EVERY single item that is set to spawn in that container;

Roll items
(Possibly the same item rolled multiple times, since more than 1 of the same thing can be found)

If it passes the check then item is spawned in that container... regardless what other items are spawned too.

--

Also, up to how many times can the same exact item be rerolled again?


See, what brought this question about is the fact that I recently attempted adding the true music mod to my SP mod list for an upcoming playthrough, along with a pretty extensive song addon mod for it which has some over 100+ songs in it (in both cassette and vinyl forms) and I'm really torn on whether to keep it or not because given the fact there is 100+ songs in it (technically 200+ items) I am finding them all over the place obviously, and I AM under the impression that it's starving out more necessary loot because it is limited, rather than every single item (for their respective containers) rolled as it's own chance... But I'm tired of guessing, and I would love to finally have an actual credible source answer to this.
< >
Showing 1-10 of 10 comments
Quineloe Jan 17, 2022 @ 12:57am 
I'd be surprised if anyone here actually knew this. In-depth information is hard to find on this game, most players only know the superficial basics and there are a lot of players / sites that peddle desinformation or outdated information. And reddit is even worse, if you asked this there the first ten responses would be "just loot another container if what you're looking for isn't in the first one!" completely unhelpful and barely is related to the topic in the first place.
♥Kina♥ Jan 17, 2022 @ 1:09am 
@Quineloe

Yes, that is why I am finally trying to get a factual answer to this question. To be completely honest I'm hoping more than anything Enigma will be able to provide the answer because I believe that's our best chance to get a concrete answer, and when I say "our" I do mean that this isn't even just something beneficial for me to know alone, this is something that would be nice for everyone to know who inquiries this sort of information because it honestly sucks to think that your 200-300+ item mod is causing the rest of the game to be harder on you.

And I mean, I get the redditors "Move on to the next container" attitude, given the size of the game world and life expectancy of the average player... but you also have to think about this in the context of MP servers where especially if everything is on "extremely rare" loot settings, loot can become pretty limited as it is let alone having to worry about a mod starving your loot spawns.
VANGUARD Jan 17, 2022 @ 1:30am 
If a dev gave an answer to that it would save alot of time.
If not then you'd have to test it yourself by looting the same container type maybe a houndred times with both vanilla and modded settings and compare the results.
pgames-food Mar 4, 2023 @ 8:41pm 
Originally posted by Sceadugengan:
If a dev gave an answer to that it would save alot of time.
If not then you'd have to test it yourself by looting the same container type maybe a houndred times with both vanilla and modded settings and compare the results.

hi, the devs are indeed the best people to answer this. (or a modder with the factual knowledge).

(ive been trying to edit a Pomps Food items mod, to try and increase spawn rates of its items, and most of them were set to 0.001 or 0.0001 so i set some to 0.1 but still didnt see any items maybe i found 1 out of a hundred zombies. (from zombie drops).

in some vanilla data i saw a min to max 99 (and an adjustment factor), so it could be that 1.1 = 1.1 % chance of rolling for that item
(but if you can only find a max amount of items somewhere, what determines which of the potentially many types of items that could be found there, are actually found? :)
Last edited by pgames-food; Mar 4, 2023 @ 8:41pm
VANGUARD Mar 5, 2023 @ 12:01am 
Dang, that's an old discussion you dragged out of the grave here.
If after such a long time no dev answered then there's little choice but to test it ourselves.
Last edited by VANGUARD; Mar 5, 2023 @ 12:02am
pgames-food Mar 5, 2023 @ 4:47pm 
oh sorry, i was searching and saw jan22 and thought it was 22nd this year, not 2022 :)

but actually, if it hasnt been officially answered, maybe the devs missed it, in which case it can hopefully serve as a reminder of a pending question :)
william_es Mar 6, 2023 @ 1:39am 
Why would anyone even read that giant rambling wall of text, which starts with three whole paragraphs of what the OP does NOT want.

When you go to a restaurant, you don't tell the waiter all the things you DON'T want.

Sceadugengan hit it on the nail, by telling them it's a "That's a you" kind of thing.
VANGUARD Mar 6, 2023 @ 2:12am 
I'm not sure how to take your comment.
Could you elaborate on that?
Quineloe Mar 6, 2023 @ 7:27am 
Originally posted by william_es:
When you go to a restaurant, you don't tell the waiter all the things you DON'T want.

"I'd like the pizza but without olives"

q.e.d.
Retro Mar 6, 2023 @ 7:42am 
Originally posted by Quineloe:
Originally posted by william_es:
When you go to a restaurant, you don't tell the waiter all the things you DON'T want.

"I'd like the pizza but without olives"

q.e.d.

Wrong, the context is this:

"I'd like the pizza but without olives, banana peppers, bell peppers, cookies, coke, pepsi, french fries, bubble gum, anger, rage, laughter, ETC."

Last edited by Retro; Mar 6, 2023 @ 7:44am
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Jan 17, 2022 @ 12:44am
Posts: 10