How to get the number of active construction bots of a certain quality?
-
- Filter Inserter
- Posts: 281
- Joined: Wed Mar 02, 2016 10:09 pm
- Contact:
How to get the number of active construction bots of a certain quality?
I know I can get the total number of bots available from a roboport. Signals W, X, Y, and Z.
How do I get how many rare construction bots I have? For example, let's say I want to recycle any bots over 100. I tried having the roboport ask for bots to station there and that worked. I can withdraw them with an inserter, but I want to logic that inserter. I want to leave a reserve of 100 bots, and then recycle the rest. I can't get how many bots I have active, only how many bots are passive in storage. Connecting via circuit doesn't give active bot stats.
How do I get how many rare construction bots I have? For example, let's say I want to recycle any bots over 100. I tried having the roboport ask for bots to station there and that worked. I can withdraw them with an inserter, but I want to logic that inserter. I want to leave a reserve of 100 bots, and then recycle the rest. I can't get how many bots I have active, only how many bots are passive in storage. Connecting via circuit doesn't give active bot stats.
Re: How to get the number of active construction bots of a certain quality?
I think this won't be possible ingame without seriously over-engineering the solution. The roboport signals you get from "reading" the available robots don't distinguish quality. You would need to remove them "all" and sort in the chest, and re-add 100 rare.
Re: How to get the number of active construction bots of a certain quality?
How about something like this:
-
- Filter Inserter
- Posts: 281
- Joined: Wed Mar 02, 2016 10:09 pm
- Contact:
Re: How to get the number of active construction bots of a certain quality?
Almost! It's not exactly what I'm after, but it's damn close. This will withdraw bots, qual < rare, if there are >100 bots in the network. I'd really like to be able to withdraw if there are >100 of a specific quality. Say there are 99 normal and 102 uncommon. I want to grab those 2 uncommons and recycle them (to possibly get rare materials). I want to leave the 100 normals alone until there's 100 of them.
This may not be the most ideal setup, but essentially it'll keep that reserve of each quality, upcycling any extras >100 of each quality in the system.
Re: How to get the number of active construction bots of a certain quality?
It's an interesting experiment, but what use does it have? If you have extra epic robots, why do you need a reserve of rare robots *in the network*? You can always keep them in storage if you want something to kickstart quality production again.
But your original post was correct, the information you want is simply not available in the circuit network and never will be. It could be extracted via a mod script and sent to a combinator that way.
But your original post was correct, the information you want is simply not available in the circuit network and never will be. It could be extracted via a mod script and sent to a combinator that way.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: How to get the number of active construction bots of a certain quality?
In that case, how about manually set up requested specific quality of bots in Robotport(Leave Normal Quality). And set for example Uncommoned and Rare Logictis bot on inserter to pull into box.
Personally I'll keep requesting lesser quality bot until it got 600 or so and put them onto upscaling Build. Then put desire quality bot into Roboport.
viewtopic.php?t=124099
Personally I'll keep requesting lesser quality bot until it got 600 or so and put them onto upscaling Build. Then put desire quality bot into Roboport.
viewtopic.php?t=124099
-
- Filter Inserter
- Posts: 281
- Joined: Wed Mar 02, 2016 10:09 pm
- Contact:
Re: How to get the number of active construction bots of a certain quality?
Wait,how do you know it never will be?robot256 wrote: Fri Dec 27, 2024 5:09 am But your original post was correct, the information you want is simply not available in the circuit network and never will be.
Re: How to get the number of active construction bots of a certain quality?
Sorry, that was an assumption on my part based on how the current behavior (number of bots + requesting certain qualities to a roboport for extraction) covers all the reasonable use cases. And the performance cost of counting up how many bots of each quality, and adding another option on the already crowded roboport GUI would seem to discourage its addition.mooklepticon wrote: Fri Dec 27, 2024 1:56 pmWait,how do you know it never will be?robot256 wrote: Fri Dec 27, 2024 5:09 am But your original post was correct, the information you want is simply not available in the circuit network and never will be.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
-
- Filter Inserter
- Posts: 281
- Joined: Wed Mar 02, 2016 10:09 pm
- Contact:
Re: How to get the number of active construction bots of a certain quality?
Thinking more on this, you're probably right. I was thinking that I needed to keep x of each type. Idk why I'm stuck on that. Why can't I recycle anything under leggo, as long as I have enough bots?robot256 wrote: Fri Dec 27, 2024 5:09 am It's an interesting experiment, but what use does it have? If you have extra epic robots, why do you need a reserve of rare robots *in the network*?
Re: How to get the number of active construction bots of a certain quality?
You probably want to gradually phase out old bots and replace them with higher quality bots as they become available.
I would do it like this:
- request 10 of the old quality bots into some roboport
- read robot statistics from that roboport. We're interested in Y and T.
- if Y >= 1000 (or whatever robot count you want), extract 1 logistics bot of the old quality from the roboport with a filtered inserter. (inserter activation condition: Y>=1000). This brings the number down to 999.
- request 10 of the new quality logistics bots into a requester chest
- move 1 bot from the requester chest into the roboport if Y < 1000 (inserter activation condition Y < 1000).
The same with T and construction bots.
This way 1 old bot is extracted, then immediately replaced with a new bot. The process pauses while a new bot is not yet available.
I would do it like this:
- request 10 of the old quality bots into some roboport
- read robot statistics from that roboport. We're interested in Y and T.
- if Y >= 1000 (or whatever robot count you want), extract 1 logistics bot of the old quality from the roboport with a filtered inserter. (inserter activation condition: Y>=1000). This brings the number down to 999.
- request 10 of the new quality logistics bots into a requester chest
- move 1 bot from the requester chest into the roboport if Y < 1000 (inserter activation condition Y < 1000).
The same with T and construction bots.
This way 1 old bot is extracted, then immediately replaced with a new bot. The process pauses while a new bot is not yet available.
-
- Filter Inserter
- Posts: 281
- Joined: Wed Mar 02, 2016 10:09 pm
- Contact:
Re: How to get the number of active construction bots of a certain quality?
Tertius wrote: Fri Dec 27, 2024 8:57 pm You probably want to gradually phase out old bots and replace them with higher quality bots as they become available.
I would do it like this:
- request 10 of the old quality bots into some roboport
- read robot statistics from that roboport. We're interested in Y and T.
- if Y >= 1000 (or whatever robot count you want), extract 1 logistics bot of the old quality from the roboport with a filtered inserter. (inserter activation condition: Y>=1000). This brings the number down to 999.
- request 10 of the new quality logistics bots into a requester chest
- move 1 bot from the requester chest into the roboport if Y < 1000 (inserter activation condition Y < 1000).
The same with T and construction bots.
This way 1 old bot is extracted, then immediately replaced with a new bot. The process pauses while a new bot is not yet available.
I did something similar to this.
- I have a port that stocks 10 of each bot, Epic and below.
- I pull out bots, if there are more than 500 available, on to a belt.
- Generally, because of belt mechanics, the lowest quality ones are prioritized in ascending order. (The normals are at the beginning of the belt and the epic at the end, so the epic has a tough time placing them.)
- I put them in a chest.
- Inserter A waits until there are 20 bots in the chest.
- Once >20, it grabs the lowest quality one (calculated by a series of decider combinators and set filters) into another chest, for manual review.
- Inserter B *also* waits until there are 20 bots in the chest.
- Once >20, it grabs the highest quality one and puts it back into the system.
- Once there are more than 200 bots in the manual review chest, an alarm flashes telling me to review.
- I manually put the normals into a recycler and the uncommon and above back into the system.
That limit of 20 for evaluation is still under consideration. I used to do 10, but it was getting a lot of uncommons in the review chest. I'm trying 20. The larger the pool, the less errors I'll have, but the more inventory I'll stock.
I created 2 of these systems, one for each type of bot.
-
- Inserter
- Posts: 37
- Joined: Wed Nov 20, 2024 3:09 am
- Contact:
Re: How to get the number of active construction bots of a certain quality?
mooklepticon wrote: Sun Dec 29, 2024 3:24 pm it grabs the lowest quality one (calculated by a series of decider combinators and set filters) into another chest,
Last edited by Lighthouse on Sun Dec 29, 2024 7:23 pm, edited 1 time in total.
-
- Filter Inserter
- Posts: 281
- Joined: Wed Mar 02, 2016 10:09 pm
- Contact:
Re: How to get the number of active construction bots of a certain quality?
How does that prioritize taking the lowest quality items first?Lighthouse wrote: Sun Dec 29, 2024 5:49 pm
This can be done with a single Selector Combinator (Quality Transfer) + connect 1 Constant Combinator (set with Signal of bot in scope, Q1, strengh 1).
-
- Inserter
- Posts: 37
- Joined: Wed Nov 20, 2024 3:09 am
- Contact:
Re: How to get the number of active construction bots of a certain quality?
Aww, should have tested before posting - sry, that one only gives the highest available quality, not the lowest. I stand corrected and proclaim the opposite.mooklepticon wrote: Sun Dec 29, 2024 6:59 pmHow does that prioritize taking the lowest quality items first?Lighthouse wrote: Sun Dec 29, 2024 5:49 pm
This can be done with a single Selector Combinator (Quality Transfer) + connect 1 Constant Combinator (set with Signal of bot in scope, Q1, strengh 1).