Reverse Factory

by Kryzeth

Reverse Factory machine will recycle (uncraft) nearly any item placed inside. Supports the recycling of most, if not all, modded items. Fully featured integration with Bobs Mods, Industrial Revolution, and Fantario (independently, not simultaneously)

Content
10 hours ago
0.13 - 2.0
62.6K
Manufacturing

g [Implemented] Seablock charcoal recycles into coal

5 months ago

Hi. Love your mod.
Playing Sea Block and I made a mistake, which I do often, which is why I love your mod, and I recycled charcoal, and it turned into coal, which does not exist in Sea Block.

I would guess it should recycle into an enabled recipe?
Also, why can I not recycle stone into slag?

5 months ago
(updated 5 months ago)

Hm, I haven't specifically tested the SeaBlock modpack in a long while, but it seems like there are multiple issues at play here. If the "intended" recipe was coal -> charcoal, and that recipe was not removed from the database, then it still appears as valid (it would take too much effort to check if each recipe can be enabled by technology). I could add that specific recipe to the blacklist, so that it does not appear under SeaBlock conditions.

As for the second issue, that would probably be because there are multiple recipes that create slag, and the stone -> slag recipe does not appear to be the "intended" recipe.

The way this mod works, it's not like the upcoming Factorio 2.0 recycler, it doesn't "decompose" items into what they are made of, it simply inverts existing recipes, specifically if the recipe name and item name are identical. If they don't match (like the recipe is specifically called "stone_to_slag_processing", or something), then it's not added to the list. There are too many mods, and too many items, and too many different combinations, for this mod to make a "best guess" if the names don't match.

I can add some specific reverse recipes, when necessary (like the mod developer made the item and recipe names different for no/some unknown reason, but there is only one recipe for that item in the mod, so I just make it work on my end), but for something like SeaBlock, which can be added to and removed from, I can't exactly force any items to have just one specific recipe, since another mod (like SeaBlock Py, or whatever else) might change it to something else.

5 months ago

Can you 'ban' reversing into recipes that are hidden or otherwise not accessible? Sorry I know nothing about factorio mods.

In Sea Block, the only crushed stone recipe is slag -> crushed stone, named 'Crushed stone', buuuut, there are a tonne that create crushed stone as a side effect of other processes.

If the name matches, should it not work?

5 months ago
(updated 5 months ago)

I could, but that would affect many more recipes, I think.

Specifically, furnace recipes can be marked as "hidden" from all crafting menus (because they are only processed in furnaces, which have no menu, thus no need to clutter the crafting menu) but are still technically usable in-game. Similarly, recipes generally begin as "disabled", and become "enabled" during the game via the tech tree. It would add so many more checks and balloon the start-up time, having to cross-reference each and every possible item against every single tech in the tech tree, just to make sure it's a valid match.

It's much simpler to just blacklist specific exceptions instead, based on the mod. I have a few of those exceptions in place already. But even then, it's also possible that the player could add another mod on top of SeaBlock that would re-enable the acquisition of coal in some way, like via Omnimatter or maybe Angels? I don't know enough about SeaBlock to make that decision.

Yeah, that explains the issue. If the names matched, then it should work. The fact that it doesn't work, implies that the internal names of the recipe and the item don't match. Usually, the only reason for this, is because there are multiple valid recipes for an item, not just one single, specific recipe. Logically, it doesn't exactly make sense that an item you get as a byproduct of crafting, can be "recycled" into a completely different item.

And again, other mods placed on top of SeaBlock could add more recipes that create crushed stone directly, just like the slag -> crushed stone recipe. It would just be awkward, and really not my place to define such things.

5 months ago

Thank you for taking the time to explain.

For Sea Block, I think it is fair for you to ban charcoal -> coal. If something enables it, it is not really Sea Block.
How do you feel about specifically enabling slag -> crushed stone for Sea Block specifically?
Or, how could i do it myself?

5 months ago
(updated 5 months ago)

I think technically speaking, a mod could easily add a process for crafting coal (as an item), from a recipe, without it drastically affecting how SeaBlock is played. Like I said, the Omnimatter mods specifically should be compatible (along with some other compatibility mods), forcing the main process to use Omnite (the singular ore from Omnimatter, from which all other ores are crafted in the game, including coal).

But hmmm, having it as a separate mod would be totally possible. It would be much cleaner than making it a setting in this mod, or forcing it upon everyone who happens to have any version of SeaBlock. That being said, I'm not entirely sure which recipe needs to be blacklisted.

I downloaded this mod, and tried recycling the charcoal (looks like a bundle of tiny black spheres) and got the item "crushed coal" (not "coal", specifically). Then recycling the crushed coal, I got "coal". Was charcoal -> crushed coal the recipe that needed to be blacklisted from recycling?

For slag -> crushed stone, I found it, the internal recipe was called "slag-processing-stone", turning slag into crushed stone. I was also able to confirm that adding Omnimatter to the pack adds a second crushed stone recipe (one made directly from stone, in the Ore Crusher from Angel's). 2 equally valid recipes creating the same product, and something that could happen with any number of mods.

I'm actually having a lot of trouble finding whichever mod is adding the charcoal -> crushed coal recipe. Without SeaBlock, but still having all of the other requirements, charcoal recycles into wood pellets, the same way it's crafted. But as soon as Sea Block is enabled, the recipe breaks. Sea Block is quite a mess of a mod, and I can't seem to find the name of the recipe that is causing this. I can't even find it with Factory Planner, which should be able to see "hidden" and "disabled" recipes.

5 months ago

I wrote up a little compatibility patch mod, shared it here. It doesn't have any thumbnail (I have no clue what it should be), but it should work as expected: creating the slag -> crushed slag reverse recipe, as well as overriding the existing charcoal reverse recipe, so it recycles into -> wood bricks (since that was the only recipe I could find for it in the first place).

You should be able to upload it to the mod portal without any changes, if you wanted to share it, and in theory, it should just work as is.

5 months ago

Thank you.
"I downloaded this mod, and tried recycling the charcoal (looks like a bundle of tiny black spheres) and got the item "crushed coal" (not "coal", specifically). Then recycling the crushed coal, I got "coal". Was charcoal -> crushed coal the recipe that needed to be blacklisted from recycling?"

This is correct. My apologies.

I was wondering if the recipes could be selected in the recycler might avoid issues?

5 months ago
(updated 5 months ago)

Ah, yes, it would solve the issue, by allowing every single recipe to reversed into its original ingredients, regardless of how it was made in the first place. There's actually already a mod with this philosophy: Recycling Machines.

The key difference here, is that their machine is an "assembling machine" type entity (which applies to anything with a selectable recipe, like oil refineries and chemical plants). The downside of this, is that you must select the recipe before being able to do anything with the machine. And then, you can only recycle that specific item, until you change the recipe (unless you have a mod that can dynamically change the recipe using circuit network)

I'm sure there are some uses for this, but my version is a "furnace" type entity, which means it acts like a furnace at all times. You can put any item in at any time, and you always get the same item out. No having to mess with crafting menus or anything, meaning that people who want to mass-recycle a bunch of trash can just send it all on the same belt, no issues. The downside of this, of course, is that there can only ever be one reverse recipe for each item.

That's why I have the implementation of "item name must equal recipe name" (which again, is true for almost all items, both vanilla and modded, when there is only one recipe for that item). For me, the downsides of the other recycling mod outweigh the downsides of my mod (though their mod is still expertly crafted)

2 months ago
(updated 2 months ago)

Hi!

I'm the dev for Sea Block (plus other mods).

I believe it should be fine to skip creating recycling recipes for recipes marked as hidden. If mods just want to prevent recipes from showing in the crafting menu, they can set hide_from_player_crafting.

I also noticed that the recipes and "fluid items" that your mod creates doesn't always have proper localisation set. For example the liquid plastic item shows as Unknown key: "item-name.liquid-plastic". The recipe for green circuits show as Unknown key: "recipe-name.rf-electronic-circuit".

It should be straight forward to solve these localisation issues using localised strings using a parameter for the item name. https://wiki.factorio.com/Tutorial:Localisation

I came here from someone reporting to me as a Sea Block bug. If you have any follow up questions, please do ask!

Regards,
KiwiHawk

2 months ago

Thank you again for all the advice; I've implemented the change to disable fully hidden recipes from being recycled, and all of the "unknown key" related issues should be fixed as of v8.2.16

New response