How to get the number of active construction bots of a certain quality?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
mooklepticon
Filter Inserter
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?

Post by mooklepticon »

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.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3980
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: How to get the number of active construction bots of a certain quality?

Post by mmmPI »

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.
teatime11
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Dec 26, 2024 10:27 am
Contact:

Re: How to get the number of active construction bots of a certain quality?

Post by teatime11 »

How about something like this:

mooklepticon
Filter Inserter
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?

Post by mooklepticon »

teatime11 wrote: Thu Dec 26, 2024 9:48 pm How about something like this:

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.
robot256
Smart Inserter
Smart Inserter
Posts: 1063
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: How to get the number of active construction bots of a certain quality?

Post by robot256 »

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.
teatime11
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Dec 26, 2024 10:27 am
Contact:

Re: How to get the number of active construction bots of a certain quality?

Post by teatime11 »

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
mooklepticon
Filter Inserter
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?

Post by mooklepticon »

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.
Wait,how do you know it never will be?
robot256
Smart Inserter
Smart Inserter
Posts: 1063
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: How to get the number of active construction bots of a certain quality?

Post by robot256 »

mooklepticon wrote: Fri Dec 27, 2024 1:56 pm
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.
Wait,how do you know it never will be?
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
Filter Inserter
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?

Post by mooklepticon »

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*?
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?
Tertius
Smart Inserter
Smart Inserter
Posts: 1082
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: How to get the number of active construction bots of a certain quality?

Post by Tertius »

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.
mooklepticon
Filter Inserter
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?

Post by mooklepticon »

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.
  1. I have a port that stocks 10 of each bot, Epic and below.
  2. I pull out bots, if there are more than 500 available, on to a belt.
  3. 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.)
  4. I put them in a chest.
  5. Inserter A waits until there are 20 bots in the chest.
  6. Once >20, it grabs the lowest quality one (calculated by a series of decider combinators and set filters) into another chest, for manual review.
  7. Inserter B *also* waits until there are 20 bots in the chest.
  8. Once >20, it grabs the highest quality one and puts it back into the system.
  9. Once there are more than 200 bots in the manual review chest, an alarm flashes telling me to review.
  10. I manually put the normals into a recycler and the uncommon and above back into the system.
I think I can further optimize the setup so I don't have the manual recycling, but I want to make sure.

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.
Lighthouse
Inserter
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?

Post by Lighthouse »

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,
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).
Last edited by Lighthouse on Sun Dec 29, 2024 7:23 pm, edited 1 time in total.
mooklepticon
Filter Inserter
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?

Post by mooklepticon »

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).
How does that prioritize taking the lowest quality items first?
Lighthouse
Inserter
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?

Post by Lighthouse »

mooklepticon wrote: Sun Dec 29, 2024 6:59 pm
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).
How does that prioritize taking the lowest quality items first?
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.
Post Reply

Return to “Gameplay Help”