MagmaMcFry / Factorissimo2

Factorissimo2, a Factorio mod that adds factory buildings to the game
https://mods.factorio.com/mod/Factorissimo2
MIT License
64 stars 38 forks source link

What would it take for robots to be able to enter/exit factories? #36

Open cozos opened 6 years ago

cozos commented 6 years ago

Sorry if this is inappropriate; Github seemed to be a better place to raise this question than the Mod discussion forum.

Is it a technical limitation/impossible for Factories to be part of the robot network (i.e. Robots being able to enter/exit)? What would it take to implement this feature?

MagmaMcFry commented 6 years ago

If you want to have the real thing happen (Factorio engine sending robots inside factories) then that would require the Factorio devs to implement manually linking logistic networks, over surfaces, with robot pathfinding, and manual teleport points or something, and I'd just have to manage these teleport points. Of course those changes to Factorio would be utterly ridiculous: massive amounts of effort to implement harshly performance-degrading changes with no benefits except to Factorissimo. Yeah, no way Wube is going to do that.

If you want to fake it (just make it appear as if robots enter factories), it is theoretically possible to fake basically anything. Want trains to go into factory buildings? Just replace real Factorio trains with your own Lua-based fake trains, then send them off to do their thing, at the cost of manually controlling literally every aspect of their existence. Want logistics bots to pathfind? Check logistics requests manually, and either replace the bots with fake bots that you move around yourself, or make factory buildings fake logistic requests so bots will come to them, then teleport the bots in and let them continue. The issue is just that any such faking method involvs tons of things that need to be done via scripting, so everything will perform orders of magnitude slower than Factorio's own implementation. Let's not even get started on the amount of script code this would probably require.

So yeah, that's not going to happen. Instead, you can just go ahead and use logistic chests in chest connections. That's already a feature of Factorissimo, and it has basically the same effect (move items into and out of factory buildings using bots), except the mechanics are much simpler and literally millions of times better for your UPS. (Hint: Balance mode is helpful with requester/provider chest combos, so you don't overfill the provider chest).

cozos commented 6 years ago

Thanks for the answer! That was really in-depth and and interesting.

cozos commented 6 years ago

One of my most favourite things about Factorio is the feeling of having an omnipresent robo network. Putting down blueprints and walking away, knowing that your construction bots are going to take care of it for you, so I'm trying to think of ways to accomplish this while still being able to modularize with those dope-ass factory buildings.

What if there was a slot for a "Factory Roboport" similar to the Factory Power Monitor and the Factory Overlay Controllers, with a button that says "Request blueprint/ghost objects Factory requester chest". The "Factory Roboport" would be a Factory Upgrade, and I guess you'd have to supply your own robots into it. Would that degrade performance? I guess you'd have to compare the blueprint/ghosted objects to what's already available in the existing provider network (if it's even possible to get information about blueprinted objects).