Automated Crushers


Adds three new Crusher variants which can select their recipes automatically. No more need to filter asteroid chunk belts.

Tweaks
18 days ago
2.0
178
Manufacturing

i Mod Compatibility

a month ago

https://mods.factorio.com/mod/More-Asteroids adds some extra asteroids and processing recipes.
https://mods.factorio.com/mod/Age-of-Production adds some additional functions for crushers and removes surface restrictions

requested/expected behavior is for added machines to not have restriction on Age of Production, and compatibility with the asteroids in More Asteroids

a month ago

Hmm...

Surface restrictions should be simple enough. I'm deep-copying the Crusher entity (which is where surface_conditions lives). I presume simply adding a soft dependency for Age of Production, to ensure that mod can apply its changes to the base prototype before I copy it. That's assuming it alters the vanilla prototype directly. If not, a more esoteric solution may be needed.

As for the extra recipes... That's a lot less straightforward. I'm distributing the recipes for each machine manually since the Vanilla ones aren't likely to change. Do you know of any common factors of the More Asteroids recipes that I can procedurally check for? Naming convention, tech or something else? In theory, I can read the full list of technologies and distribute the recipes from specific ones to the three Crushers, but I'd need a bit more information.

Should be possible, though, at least in theory.

a month ago

OK, from the looks of it:

Age of Production compatibility should be dirt simple. That mod changes Crusher surface conditions during the data stage, which is when I define my own crushers. Adding a soft compatibility will ensure that my mod runs after Age of Production, so it clones the Crusher after it's been changed.

More Asteroids compatibility might be a bit tricker. That mod doesn't define its own technologies, and instead attaches recipes to whole host of existing technologies. I don't see a way to future-proof this, so I might have to manually add all of the mod-specific recipes to the new Crushers. They're all Crushing and Advanced Crushing, though, with no Reprocessing at all - which is going to be weird, but it is what it is.

What concerns me more is that More Asteroids also adds a fluid box to the Crusher, as some of the recipes require fluids. That should copy over with the entity prototype, but I'm not sure what effect - if any - it would have on normal Advanced Crusher operation.

I'll try to get this done in the next few days, but no promises.

18 days ago

Well, this turned out to be a bit less simple than I thought, and I managed to get sick in the process, but I have... something to show for it in 1.0.2.

Age of Production compatibility was as simple as I thought. That's done.

More Asteroids compatibility, not so much. I ended up procedurally assigning recipes based on name, but not all new Asteroid recipes are compatible. The Automated Crushers are "furnaces" internally. Those are limited to recipes with at most one item ingredient and at most one fluid ingredient. Many of the More Asteroids recipes have multiple item ingredients, and those just don't work in the Automated crushers. So you have partial compatibility - some recipes will work, some won't.

Additionally, fluid inputs are an absolute mess. I don't know what the More Asteroids author did with fluid boxes, but it doesn't seem to agree with Furnaces. All inputs and outputs are available all of the time and no pipe labels are shown. Again - furnaces only expect single inputs and outputs. Means you'll have to guess at which pipe connection is for which fluid. There really isn't anything I can do about that, given my implementation.

As a bonus, the procedural recipe assignment means that some other asteroid mods are also supported, such as More Asteroid Reprocessing. Others, however, not so much. More Asteroid Resources adds multiple crushing recipes with the same ingredients, which I can't really assign to any of the crushers. Again - they're furnaces, so each recipe needs to have unique inputs and outputs.

So better than nothing, but not by much. Unless you have better implementation ideas, that's the best I can do.

New response