Mining drill prototype storage_slots

Place to post guides, observations, things related to modding that are not mods themselves.
User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 531
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Mining drill prototype storage_slots

Post by Silari »

Moderator note: Discussion split from viewtopic.php?p=549679#p549679, see quote
Honktown wrote: Mon Jul 19, 2021 5:11 am https://wiki.factorio.com/Prototype/Min ... age_slots
Does this still do anything?

https://wiki.factorio.com/Version_histo ... .0#0.11.21
Storage slots of mining drill is moddable now. This affects the internal inventory size, so when resource with more different results is mined, no items are lost (as long as the size is big enough). Default value is 1.
Description makes it sound like it's for resources that have more than one item in their minable results, and that without enough slots the remaining results are lost.
Honktown
Smart Inserter
Smart Inserter
Posts: 1041
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Small documentation improvement requests

Post by Honktown »

Silari wrote: Mon Jul 19, 2021 7:15 am Description makes it sound like it's for resources that have more than one item in their minable results, and that without enough slots the remaining results are lost.
From the quoted version, and other forum posts (some of bob's, google factorio "storage_slots"), that was indeed the case. Now though, that doesn't seem to apply. I wouldn't be surprised if a rather non-descript / very seldom used property became "vestigial" (it was added in 2015).
I have mods! I guess!
Link
User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 531
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Small documentation improvement requests

Post by Silari »

Honktown wrote: Mon Jul 19, 2021 7:36 am From the quoted version, and other forum posts (some of bob's, google factorio "storage_slots"), that was indeed the case. Now though, that doesn't seem to apply. I wouldn't be surprised if a rather non-descript / very seldom used property became "vestigial" (it was added in 2015).
I totally overlooked the part of your code that changed iron ore minable and thought they were just mining two types of ore. It's weird that they didn't just change their output slots dynamically like assemblers do. Far as I know that was already a thing in .11. Furnace output slots can be set though, not sure what happens there if there's not enough for a recipe.
Bilka
Factorio Staff
Factorio Staff
Posts: 3309
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Mining drill prototype storage_slots

Post by Bilka »

So, this was an interesting one. It looks like the property did indeed do what the 0.11.21 changelog says it does. That is, until 0.15, when another "handle extra item output of mining drills" feature was added, basically a "stuck item queue". It was needed to make the newly introduced mining productivity work smoothly.

So, as noticed, the property doesn't really look like it is doing anything, since the new mitigation is taking care of the original issue. It however still does one thing:
[With storage_slots = 1] if a resource does produce > 1 stack at a time it would cause the drill to take 2 ticks to output all of the items because the inventory size would fill with 1 stack, the other stack gets stuck in the "stuck items" and then the next tick the stuck items get moved to the output inventory.
Well, that is rather complicated and the only usecase of the property (no items lost, just some delay). So, we decided to remove the storage_slots property from the mining drill prototype with 1.1.37, instead the inventory size is calculated automatically based on the minable resources. Basically, the game does it all automatically now. Hurray, less work for modders :)
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Modding discussion”