CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
9.95k stars 4.08k forks source link

List of: Understocked Building Spawns #21202

Closed pisskop closed 6 years ago

pisskop commented 7 years ago

I would like to have a list of buildings or structures that are genuinely affected beyond a reasonable level by the fixing of the item-spawn bug.

pisskop commented 7 years ago

Liquor Stores Grocery Stores Pawn Shops?

John-Candlebury commented 7 years ago

Garages The liquor/bar basement

1skandar commented 7 years ago

As far as I can tell, it is only the hard coded buildings that have problems, as I think JSONified buildings use a different loot function.

PR #21162 will fix garages when/if it is merged and I plan to go through a few more buildings when that happens.

ZenZen2 commented 7 years ago

Just for my own understanding: It wasnt an item-spawn bug. The calculation behind the spawnrate was changed to make it more accurate. But the hardcoded buildings are dependand on the old item-spawn code. Correct me if im wrong.

pisskop commented 7 years ago

itam is a bug, as it was in error and dramatically affected how json flags for item spawning worked.

AlecWhite commented 7 years ago

The locations commented here seems to be locations that hasn't been jsonified. As mentioned there https://github.com/CleverRaven/Cataclysm-DDA/issues/21207#issuecomment-307095631

pisskop commented 7 years ago

Im going to again reiterate that the error Im concerning myself with is the one wherein the JSON specified loot would keep spawning until it rolled below its loot drop chance with a d100.

pisskop commented 7 years ago

Plus, that list isnt even accurate.

For instance, LMOEs are jsoned.

1skandar commented 7 years ago

No, I'm fairly sure the bug is not in the JSONified buildings. See #21049 with problems with garages which aren't JSONified and I've seen stuff like apartments, bookstores, and schools which are JSONified are perfectly fine.

1skandar commented 7 years ago

And, in fact, you can see the pull request, #20773, you'll see the function he modified was map::place_items which the hardcoded buildings call to spawn loot. I don't know if JSONified buildings use it as well, but from my experience they don't.

Edit: Definitely don't. JSON mapgen functions are a seperate thing in another part of the source code.

Edit ti that edit: That list of hard coded buildings is drawn from source. It's true the basements of lmoe shelters are JSONified, the ground level isn't.

pisskop commented 7 years ago

im going to once more inform you that thos affects json mapgen as well.

you are welcome to test it on your own time; i have a whole mod of evidence of my own

1skandar commented 7 years ago

No, it doesn't. It literally can't. I don't care what evidence you may have, the very code contradicts you. The code that was changed is called only by hard coded buildings, the JSON spawning was not touched. And I have tested it. Walk into a bookstore, full of books. JSON building. Walk into a garage, empty, hard coded building. Restaurants and pizza parlors full of food? JSON. Empty pawn shops? Hardcoded.

You can spawn JSON buildings with the debug menu, I'd say if you're seeing differing things from me, check your mod, because it literally cannot be the other way around in vanilla.

John-Candlebury commented 7 years ago

Thats not completely true @1skandar.

I consciously used the reroll bug for spawning high amounts of canned food in abandoned01.json (see lines 595-598 ) now the building spawns with about a fifth of it once spawned. I used the same bug to spawn ridiculous amounts of trash in office_tower_2 (the spawns in these buildings are not the original), and books in house_library, probably in some other houses too.

1skandar commented 7 years ago

Ah. Hmm. Ok, took a look and god that hurts my head. I'm less and less sure how that crap works the more I puzzle it out.

I will say most JSON buildings are working correctly, whereas the hardcoded ones aren't. Again, bookstores are still full of books versus how empty garages have become. The why behind it all is...odd. Ah well. I now need an Aleve for the headache trying figure out wtf is going on here.

pisskop commented 7 years ago

okay, now that we are all aware that it does, can I get a list?

1skandar commented 7 years ago

All the hardcoded ones that were mentioned further up this thread plus whatever JSONs are effected. I'm afraid you're not going to get a list of those. That said, feel free to go in game and debug spawn them and look for yourself, you can do that with JSON buildings. Anything that doesn't look right, well. make a list.

kevingranade commented 7 years ago

As usual,if you want to make a list of understocked buildings and call it a bug, you need to define what understocked means. If you don't do that you're doomed to just tweaking things in circles.

Leland commented 6 years ago

Closing – doesn't look like this got very much traction. Happy to reopen if wanted, but I'd say that a new issue created with either a definition of "understocked," or that and an out-and-out list of understocked buildings fulfilling that definition would probably be a better recipe for engagement.