[2.0.17] Spoilage counts as not spoilable for inserter priority

This subforum contains all the issues which we already resolved.
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

[2.0.17] Spoilage counts as not spoilable for inserter priority

Post by sparr »

I would expect that if I set an inserter to prioritize spoiled items first, it would pull spoilage before anything else. However, it pulls spoilage last, because it's technically an unspoilable item.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3323
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by boskid »

Thanks for the report, however i am throwing this straight to Not a bug. Spoiled priority was implemented primarily for handling one item selection and in original shape it was not even considering items that were not spoilable (spoilage has no timeout to convert into something different so it is not spoilable). I am considering this to be more of "idea or suggestion" hidden behind a bug report because for you it appears as not working as intended when in fact it was never decided how this should behave when taking spoilage into consideration. It was barely defined for spoilables themselves because spoil priority compares ticks remaining until item becomes spoiled so items with different spoil time may appear as incorrectly comparing their spoil percentages. In theory i could add a flag to the ItemPrototype that an item should be considered as "the most spoiled" for the purpose of spoil priority causing the logic to be split into more pieces: "spoiled non spoilables, spoilables in order of spoil tick, non spoilables".

In short: Spoilage being an item that does not spoil anymore is not involved in the spoil priority logic and so this is Not a bug.

-- edit: Moved back to Bug reports because it is being decided by someone else
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3323
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by boskid »

Ok, decision was made and this issue is now fixed for 2.0.18.

Spoilage even if being non spoilable, will be considered as more spoiled than spoilable items. This will be achieved by means of ItemPrototype::spoil_level that was also added for 2.0.18.

With those changes there will be also a behavior change in inserter priorities: When inserter grabs freshest items first, it will consider non spoilables (different than spoilage) to be more fresh than items that are already spoiling.
Linnun
Inserter
Inserter
Posts: 48
Joined: Fri Dec 15, 2017 5:51 am
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by Linnun »

boskid wrote: Thu Nov 14, 2024 2:58 pm When inserter grabs freshest items first, it will consider non spoilables (different than spoilage) to be more fresh than items that are already spoiling
Doesn't that defeat the whole point of this setting? If I enable spoilage filter and set it to freshest first, I'd expect it to first grab spoilable items with the most freshness. Feels a bit unintuitive. Maybe a third spoilage filter mode would make more sense than changing this up? "Spoiled first" (behave like before), "Freshest first" (behave like before), "Non-spoilable first" (new behavior)
robot256
Smart Inserter
Smart Inserter
Posts: 1018
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by robot256 »

Linnun wrote: Thu Nov 14, 2024 3:26 pm
boskid wrote: Thu Nov 14, 2024 2:58 pm When inserter grabs freshest items first, it will consider non spoilables (different than spoilage) to be more fresh than items that are already spoiling
Doesn't that defeat the whole point of this setting? If I enable spoilage filter and set it to freshest first, I'd expect it to first grab spoilable items with the most freshness. Feels a bit unintuitive. Maybe a third spoilage filter mode would make more sense than changing this up? "Spoiled first" (behave like before), "Freshest first" (behave like before), "Non-spoilable first" (new behavior)
Shouldn't you be using item filters to fix that? Personally I agree setting a freshness priority should not prevent it from grabbing unspoilable items.
Linnun
Inserter
Inserter
Posts: 48
Joined: Fri Dec 15, 2017 5:51 am
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by Linnun »

robot256 wrote: Thu Nov 14, 2024 3:49 pm
Linnun wrote: Thu Nov 14, 2024 3:26 pm
boskid wrote: Thu Nov 14, 2024 2:58 pm When inserter grabs freshest items first, it will consider non spoilables (different than spoilage) to be more fresh than items that are already spoiling
Doesn't that defeat the whole point of this setting? If I enable spoilage filter and set it to freshest first, I'd expect it to first grab spoilable items with the most freshness. Feels a bit unintuitive. Maybe a third spoilage filter mode would make more sense than changing this up? "Spoiled first" (behave like before), "Freshest first" (behave like before), "Non-spoilable first" (new behavior)
Shouldn't you be using item filters to fix that? Personally I agree setting a freshness priority should not prevent it from grabbing unspoilable items.
Yes, everything on Gleba basically uses item filters already anyways, so it shouldn't matter too much. It's just that when reading the change, it feels unintuitive to me that "freshest first" generally prioritizes unspoilables.
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by sparr »

Linnun wrote: Thu Nov 14, 2024 3:26 pm
boskid wrote: Thu Nov 14, 2024 2:58 pm When inserter grabs freshest items first, it will consider non spoilables (different than spoilage) to be more fresh than items that are already spoiling
Doesn't that defeat the whole point of this setting? If I enable spoilage filter and set it to freshest first, I'd expect it to first grab spoilable items with the most freshness. Feels a bit unintuitive. Maybe a third spoilage filter mode would make more sense than changing this up? "Spoiled first" (behave like before), "Freshest first" (behave like before), "Non-spoilable first" (new behavior)
Quite the opposite for me. I expect un-spoilable items to be considered 100% fresh, and spoilage to be considered 100% spoiled, and spoilable items to come in between. I built a whole factory module around this for iron production on gleba and then was distraught to find that neither of these behaviors worked as I expected. I am delighted that the response here matches my initial expectations about how this mechanic would work.
DarkShadow44
Filter Inserter
Filter Inserter
Posts: 359
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by DarkShadow44 »

sparr wrote: Thu Nov 14, 2024 5:49 pm Quite the opposite for me. I expect un-spoilable items to be considered 100% fresh, and spoilage to be considered 100% spoiled, and spoilable items to come in between. I built a whole factory module around this for iron production on gleba and then was distraught to find that neither of these behaviors worked as I expected. I am delighted that the response here matches my initial expectations about how this mechanic would work.
How do you use this mechanic? I don't understand why you'd want to insert spoilage first, for example.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 581
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by Hares »

DarkShadow44 wrote: Thu Nov 14, 2024 6:53 pm How do you use this mechanic? I don't understand why you'd want to insert spoilage first, for example.
You want to remove it first
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by sparr »

I want to remove iron ore before iron bacteria to put on my smelting belt, but I'll start filling the belt with iron bacteria if that's all I have left.

I want to pull the least spoiled items to use in production, and the most spoiled to get rid of. But I need to pull 100% spoiled (i.e. converted to spoilage) first, and that took an extra inserter/filter prior to this.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 581
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by Hares »

sparr wrote: Sun Nov 17, 2024 2:04 am I want to remove iron ore before iron bacteria to put on my smelting belt, but I'll start filling the belt with iron bacteria if that's all I have left.

I want to pull the least spoiled items to use in production, and the most spoiled to get rid of. But I need to pull 100% spoiled (i.e. converted to spoilage) first, and that took an extra inserter/filter prior to this.
You can use filters on inserters
sparr
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by sparr »

Hares wrote: Mon Nov 18, 2024 4:07 pm
sparr wrote: Sun Nov 17, 2024 2:04 am I want to remove iron ore before iron bacteria to put on my smelting belt, but I'll start filling the belt with iron bacteria if that's all I have left.

I want to pull the least spoiled items to use in production, and the most spoiled to get rid of. But I need to pull 100% spoiled (i.e. converted to spoilage) first, and that took an extra inserter/filter prior to this.
You can use filters on inserters
What filter would you recommend that will pull iron ore then iron bacteria?

Or spoilage then the most spoiled nutrients?

(Before the change described in this thread)
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 581
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: [2.0.17] Spoilage counts as not spoilable for inserter priority

Post by Hares »

sparr wrote: Mon Nov 18, 2024 8:38 pm
Hares wrote: Mon Nov 18, 2024 4:07 pm
sparr wrote: Sun Nov 17, 2024 2:04 am I want to remove iron ore before iron bacteria to put on my smelting belt, but I'll start filling the belt with iron bacteria if that's all I have left.

I want to pull the least spoiled items to use in production, and the most spoiled to get rid of. But I need to pull 100% spoiled (i.e. converted to spoilage) first, and that took an extra inserter/filter prior to this.
You can use filters on inserters
What filter would you recommend that will pull iron ore then iron bacteria?

Or spoilage then the most spoiled nutrients?

(Before the change described in this thread)
Assembler -> Read contents -> Decider combinator -> Inserter -> Set filters
Or just use two inserters, each with its own condition.
Post Reply

Return to “Resolved Problems and Bugs”