Page 1 of 2
Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Thu Oct 31, 2024 3:53 pm
by adisander
TL;DR
Add a checkbox to have chest output items with the spoilage level (0 to 100, or amount of seconds left, or similar) of the most spoiled item/stack of each item type on that belt or in that chest in place of the item count.
Why?
Spoilage progress of ingredients affects spoilage progress of products. However, there is no automated way of determining the spoilage level of an ingredient outside of if it already has spoiled (and thus, no longer exists) or not.
As a result, there's no elegant way to deal with unfresh ingredients that one doesn't want degrading products or to handle items getting close to spoilage, such as pentapod eggs.
Why I think this fits: inserters already have the option for selecting most/least spoiled items when grabbing, so some means of reading spoilage exists.
Why this might not fit: it may not be intended to have a relatively easy way to filter out items close to but not yet past spoilage or to start up processes before a spoilage event takes place.
Bonus: Add the same for reading the spoilage levels of a biochamber's nutrients.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Sun Nov 03, 2024 11:41 am
by danbopes
+1 for this. Not having ANY way circuit condition wise to read spoilage is kinda lame, and IMO goes against what circuit conditions open up and allow for in game.
Since inserters have a priority level for spoilage, I think adding a utility to the advanced selector to read the circuit values and output a "lowest" spoilage amount. This would make ensuring that we're not sending soon-to-be spoilage to Nauvis.
Here's the ideal setup:
1. Chest gets dumped with all gleb science packs.
2. Chest => Advanced Selector to read spoilage level (Output S for spoilage level from 1 to 100)
3. Selector => Inserter with enable signal S <= 8, and "Spoiled first" priority
4. Spoiled packs with <= 9.6 minutes (Gleba science packs last 2 hours, so 8% is 9.6 minutes) are removed from the chest (And maybe a few more if inserter size is > 1)
Alternatively, spoilage output can be in seconds instead, outputting the lowest (Or highest) spoilage in seconds.
Upon further thought, I feel like spoilage level in a combinator isn't the best idea, since the signals aren't actually correlated to entities *per-say*. From a scripting API, to try to reverse the signals to find the entities linked might be a bit of a task. A simple solution, would be to add on the entities themselves (Belt/Chest) a "Read Spoilage Level", and output that as a signal.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Sun Nov 03, 2024 11:56 am
by WeirdConstructor
+1 - I also searched for a way to read the spoilage level. This would be amazing for controlling circuits on Gleba.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Sun Nov 03, 2024 12:37 pm
by Barthoze
+1 Definitely agree, it would help a lot with items with a finite shelf life.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Sun Nov 03, 2024 8:17 pm
by Ranec1
Like the idea.
To add another related idea this makes me think about, add an inserter choice to pick up anything with specific spoil settings. For example, remove anything with less then a few minutes or percent left. Kind of like the spoil first/last but numeric which makes more since because stacks in chests average spoilage anyways.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Mon Nov 04, 2024 10:37 pm
by Rykuta
It would be helpful if I could see the spoilage status of an item while also knowing what item it is.
Two things that might accomplish that:
* Spoilable items output a new signal that represents the spoilage level, this is separate from the quantity of the item which is still the original signal.
OR
* You can specify which (red or green wires) will output the spoilage as the main signal rather than the quantity.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Tue Nov 05, 2024 1:19 pm
by DarkShadow44
Yes, some way to read spoilage for the circuit network would be awesome.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Thu Nov 07, 2024 7:27 pm
by koutoftimer
+1 for spoilage measurement via selector combinator.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Mon Nov 11, 2024 12:30 pm
by Brathahn
+1
the selector combinator would be perfect for this. as it stated in the FFF it woud be a catch-all solution for niche applications like this
https://factorio.com/blog/post/fff-384
Since the scope of the Selector combinator is quite broad, there is also room for further functions we could give it, if you have some ideas, we would welcome them.
as an example how this could be implemented:
- 2024-11-11 13_48_26-Window.png (75.61 KiB) Viewed 3791 times
the selector combinator would read the freshness of the item signal it is passed and output it maybe as signal "F". if there is a belt with the "hold" functionality attached, it would read the combined freshness of all the items.
so if you have a setup like the upper combinator, you easily could add an inserter to the belt wich would pick out any freshness value you would like.
the lower combinator would give you only a "this belt section is this% fresh" reading
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Mon Nov 11, 2024 12:50 pm
by BlueTemplar
Yeah, while I understand that giving too much capabilities to the player might be avoided because it would make some puzzles trivial,
generally that wasn't the case with the circuit network, where you could go nuts.
So it's really weird that spoilage % cannot be read...
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Mon Nov 11, 2024 2:25 pm
by Tinyboss
Brathahn wrote: Mon Nov 11, 2024 12:30 pm
the selector combinator would read the freshness of the item signal it is passed
The selector combinator cannot do it, because there is no freshness of an item signal. Just an item and a quantity.
However, an entity with inventory could have a mode where it reads the lowest or highest (or both) freshness among all the items inside it, and you would select channels for the outputs, like you can for roboports reporting bot numbers.
Or it could output a signal for each item type, with the highest or lowest freshness for items of that type. In this case it could not do both, because each item type can only report one number. So you'd have to choose in the entity UI which one you want it to read.
It would be a good fit for chests, I think.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Wed Nov 13, 2024 5:13 pm
by Corn y Queso
I would also love to see this with an output per item type on a belt or in a container. Either seconds, or maybe percent/some other fixed point fraction like basis points (i.e. 0 to 9999). Makes sense to be able to select between highest/lowest.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Wed Nov 13, 2024 6:55 pm
by dav245
Cross referencing (thank you Koub for pointing me here) since it is basically same idea, just the solution is proposed differently.
viewtopic.php?p=637248
read spoil timer with circuit condition
Posted: Wed Nov 20, 2024 7:07 pm
by Juliangta
idea
- just having the possibility to read the spoil timer of various spoilable items
how?
- this would prefarably be done possible in a inserter
why?
- it is to be able to send fresh bioflux and science packs instead of sending half spoiled bio flux for the captive biter spawners
i didn't see any other posts mentioning this specific issue
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Thu Nov 21, 2024 4:02 pm
by gandak
+1 Would really appreciate this so i can fill a rocket with only the freshest produce to ship to other planets.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Thu Nov 21, 2024 9:51 pm
by Vasya228
+1 to this.
Also I feel like there should be not a value but a few buckets similar to quality, eg fresh (100%..75%), mildly fresh (75%..50%), not so fresh(50%..25%) and nearly spoiled (25%..0%). It should also allow insertes to pick more spoiled or more fresh from each bucket.
My usecase: I want to burn nearly spoiled pentapod eggs and leave fresh ones on a belt. So I wnat to filter out "nearly spoiled" eggs with a belt splitter and then throw ones which are most spoiled in a heating tower.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Thu Nov 21, 2024 10:11 pm
by danbopes
Vasya228 wrote: Thu Nov 21, 2024 9:51 pm
+1 to this.
Also I feel like there should be not a value but a few buckets similar to quality, eg fresh (100%..75%), mildly fresh (75%..50%), not so fresh(50%..25%) and nearly spoiled (25%..0%). It should also allow insertes to pick more spoiled or more fresh from each bucket.
Why would you ever "bucket" it when you can just get the value in percent, and then make a decision like `S < 25`? Buckets will just reduce functionality for no good reason.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Fri Nov 22, 2024 1:28 am
by Linsanga
I have definitely found myself wanting this a few times.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Fri Nov 22, 2024 5:18 pm
by Vasya228
danbopes wrote: Thu Nov 21, 2024 10:11 pm
Buckets will just reduce functionality for no good reason.
I think that spoiled value should be kept, and buckets added just to simplify products management, and maybe UI, eg specifying a filter for a belt splitter.
Re: Allow belt/chest circuit readers to read spoilage level of most spoiled item
Posted: Fri Nov 22, 2024 9:52 pm
by Koub
[Koub] Merged into an older thread with the same suggestion.