Bob's Logistics mod


Adds logistic related things.

Content
2 months ago
0.13 - 1.1
268K
Logistics

i Simplify upgrading bots

3 years ago

Hi Bob,

As your mod introduces multiple tier of bots, what would be the process you'd recommend for upgrading bots? I currently sit on a factory with over 500 roboports and I don't feel like doing this manually...

Have you ever considered introducing a way to automate or simplify the upgrade process of bots? I know there's a mod that seem to be doing this, but I think it could be nice if something like that was native with your logistics series. Thoughts?

3 years ago

I have but some thought into it over the years. There's no easy way to program it.

I mean, Bob's mods has always been script minimal, not wanting any scripts that are constantly running. There are a few exceptions like the clock, but then they don't do much at all, because they just update a GUI.

to do something like replacing all robots would require monitoring entities (Either roboports to see if they contain the wrong robots, or checking the robots themselves), which would likely end up becoming a lag inducing script.

Considering performing a "Find all of X on the map" can cause the game to lock up for several seconds, the bigger the map, the longer it locks up, anything I come up with would need to be running from the start of the game, monitoring when you place roboports and keeping track of them.

And we haven't even looked at what the script would actually do with the robots yet.

So, while the idea might be simple, the solution is not.

Having said that, there may actually be a non-bob's mod out there that does it.
Most people recommend using filter inserters to pull the "wrong" robots out of a roboport.

3 years ago

I totally get it. I never coded anything for factorio myself, so I don't know what the possibilities are really, but if it was possible to make Roboports content available to logistic requests, it would then be possible to make a request for any type of robots (even those stored in roboports). Although I'm pretty sure that's simply not feasible :P

Anyway, thanks for the response. I might just have to rely on a separate mod to do the job.

3 years ago
(updated 3 years ago)

It would then be possible to make a request for any type of robots (even those stored in roboports).

Yeah, it's not that simple. For starters, the inventory of the roboport functions differently than that of a logistic chest.
On top of that, the game only differentiates between Construction and Logistic robots, and assigns jobs based solely on that.

In theory, if you did want to replace a robot type with another, the only real way to do it (that I can think of(Without cheating and simply upgrading them magically)) would be to have a virtual requester and virtual active provider chest for each roboport. as the script detects what's in a roboport, it deletes the old robots from the roboport and recreates them in the virtual active provider chest, while making a request for the new robot in the virtual requester chest. then a script does the reverse and adds a new robot to the roboport and deletes it from the requester chest as it is delivered.
And while doing this, you need to NOT do it all at once, because the moment you turn it on, well, all your robots are deleted and there's nothing left to deliver anything, so you'd need to do it in steps, or have a threshold, like, no more than 10% of the robots in a roboport at a time.

That's an idea on how to do it, but just because I have one, doesn't mean I actually want to do it >.>

New response