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
21 days ago
0.13 - 1.1
56.2K
Manufacturing

a Changelog

6 years ago
(updated 5 years ago)

Please visit the changelog here for any future versions of the mod

v4.0.7 - Fixed compatibility with fluid recipes using "icons" instead of "icon" (eg: AAI Industry)
v4.0.6 - Last update today, I promise. Implemented option to change delay timer (to a minimum of 30 ticks, or half a second). 300 ticks (5 seconds) by default.
Changed a few internal variables to use Factorio built-in global table, should persist between saves, maybe solves multiplayer issue? No logic was changed, so I wouldn't count on it. Please test at least once to verify though.
v4.0.5 - Fixed updating from previous version (crash on placing rf factory).
NOTE: The "automatic ingredient push" option is finnicky when applying to existing saves. The option is per map, and does not dynamically apply (for some reason) when changed mid-game. So to apply the option to existing saves, set the option to true from the main menu, then open the save in v4.0.5, set the option to true, save the file, exit to menu, then load up the new save. The "rf" table should probably be remade at that point, but if it's not working, try placing/removing a reverse factory. That will forcibly recreate the rf table and allow the option to work.
AGAIN: For single player only. Will most likely cause desyncs in multiplayer,
v4.0.4 - Reintroduced functionality (pre 4.0.2) as option for single player. Fixed recipes that attempt to be processed but fail and "clog"; simply disabled any recipes whose ingredient count exceed stack size. No more clogging!
v4.0.3 - Technology icon now fits into the tech screen. Apparently, despite Factorio's techs being 128x128, they don't need to define icon_size, when 32x32 is the default. Well fixed now.
v4.0.2 - Removed some functionality. No more script updates, and thus no desyncs. As a result, incomplete recipes no longer get pushed into the output slot at all, meaning you'll have to manually check. Less of an issue than desyncs tho.
v4.0.1 - Lengthened the update timer for pushing incomplete recipes (eg: 1 underground belt) from 5 seconds to 10 seconds. Unless you get unlucky with ticks, items should no longer unnecessarily shift slots. As long as one item has been uncrafted successfully (and is in the output slot), the input item should not get shifted over.
v4.0.0 - Factorio 0.15 update! Fixed recipe creation function to allow for normal and marathon recipes. Probably fixed minor issues from older versions. Added config options for dynamic uncrafting and difficulty override.
--NOTE: Due to Factorio recipe changes, dynamic uncrafting is disabled by default. Enabling it will allow uncrafting recipes to dynamically change from regular to marathon variants depending on the chosen difficulty on game creation, but adds an unsightly group to player's crafting menu. I hated this, as it's the entire reason I preferred this mod over the other recycling mod.
Instead, I decided to allow the player to choose their difficulty from the in-game mod settings page. This will set all uncrafting recipes to either their normal or marathon counterparts, regardless of actual chosen difficulty. One bonus side effect of this, is that if you play on marathon difficulty, but enable the vanilla uncrafting recipes, all uncrafting will give much smaller results, making it even harder on this mode. I wouldn't try it the other way around (vanilla difficulty + marathon uncrafting) unless you don't care at all about balance lol
--Roughly every 10 minutes (36000 ticks) world is rescanned, and rf table is recreated. Hopefully catches any bugged rf machines, although if it noticeably hampers performance, I can remove this change later. Wish there were an "on_load" event to rescan the world every time a world is loaded. removed feature in 4.0.2

v3.4.0 - Minor compatibility fix with my old mod. Forgot I added an option in that mod to remove bob's area mining drill, causing an "item not found" error in certain cases.
v3.3.9 - Minor compatibility fix with my new mod here, forcing it to load before reverse-factory
v3.3.8 - Minor bugfix, hopefully ensuring that rf table is properly created before every point where it is accessed.
v.3.3.7 - Second attempt at a compatibility fix for mods with tinted icons. Instead of ignoring the mod entirely, places check further into loop. Somehow, this avoids the previous error on loading issue, and fixes compatibility with mods that use this feature (Storage Cubes and latest version of Prospector). Inspired by Atraxi.
v3.3.6 - Minor compatibility fix with Angels Petrochem.
v3.3.5 -Rollback to v3.3.3, used to "downgrade" those who updated to v3.3.4
v3.3.4 - Compatibility patch with unlisted mod. Also future-proofs against any other mod that uses the recipe.icons method instead of the usual recipe.icon
--Something changed between Factorio Experimental v0.14.21 and Factorio Stable v0.14.21 that somehow broke this update, causing recyclers to not recycle at best, and a complete failure to startup at worst. v3.3.3 worked fine though.
v3.3.3 - Another minor bugfix. Definitely fixed issue
v3.3.2 - Minor compatibility fix. Fixes error on load when using Bob's Extended by MomoSundeass, in combination with angels infinite ores and refining mods.
v3.3.1 - Code optimizations (?) Instead of scanning and rescanning the same surface every 4 seconds, recyclers are instead kept inside a consistent table, which is updated when bots or players place or remove them, or when they are destroyed. Also added this function to be compatible with all surfaces (underground, space platform, factorissimo buildings, etc). Also fixed minor bug where unpowered recyclers would still push their inputs to the output slots, despite not being fractional recipes. Should all work properly now.

v3.3.0 - Reverse Factory will now push items through to its output slot if the input is lacking materials to uncraft (less than 2 underground belt, less than 10 concrete, etc) - Feature as requested by hyspeed
--Details: Every 4 seconds, recyclers will check if they are not crafting, and have a full input, then if they have enough room in their output, will eject said input items. As all reverse-factory recipes are completed in 0.5 seconds, the only time this should occur is when the recyclers cannot uncraft something due to lack of materials.

v3.2.1 - Minor fix to properly disable Bio Industries "Disassemble Burner Miner" recipe. Don't know when it was broken, but fixed now.

v3.2.0 - After learning that fluid smelting recipes were allowed (thanks to The_Evil_Pickle and his Auto Recycling Plant mod), updated to allow for the uncrafting of fluid recipes (so long as they have the same recipe name as the item they become) This allows for the uncrafting of nearly all vanilla fluid recipes, including electric engines, blue belt/splitters, plastic, and flamethrower ammo. One notable exception to the list is oil barrels.
--Minor visual bug when fluid output faces left, as electric furnace was not designed for fluid output

v3.1.0 - Code optimization/rewrite. Improved compatibility.
Things that can now be uncrafted (which actually couldn't before):
--Vanilla Rail
--Any items craftable in Bob's Electronics Assembling Machine
--Iron, Copper, and Steel Plate. Tin and Lead Plate (among others) as well, from Bob's Plates
--Any form of science pack
--Various other items, whose recipes have the same internal name as the item itself. Limited Angels compatibility, as the names of the recipes all have "sorting", "crushing", "processing" or something similar appended to them

v3.0.1 - Minor change to description so mod can be found when searching for "recycle" on the mod portal
v3.0.0 - Updated to Factorio 0.14 (older version still available)
v2.0.2 - Fixed compatibility with Creative Mode (and other mods that add recipes with no ingredients)
v2.0.1 - Bio Industries compatibility (removes its burner miner and steel furnace disassemble recipes, for obvious reasons)
v2.0.0 - Officially Unofficial 0.13 mod release

6 years ago
(updated 6 years ago)

v4.0.8 - Recipes with "normal" difficulty defined, but missing an "expensive" level recipe now output a more reasonable error. Should help both users and mod authors figure out where the problem is. Though I doubt this will come up very often (seemed like a copy-paste mistake). Showed error to NE Buildings author, they'll have to fix the compatibility on their end.

6 years ago
(updated 6 years ago)

v4.0.9 - Accidentally skipped this release, but it reset two settings and changed the logic of the "automatic item push". Hopefully it works in multiplayer, but if it doesn't, then please disable this option (defaults to true because I believe it works). Due to the logic change, there may also be reduced performance when using many. Hopefully it's either not noticeable, or unchanged.

6 years ago
(updated 6 years ago)

v4.0.10 - Fixed crushed stone duplication. Game should mention a removed crushed stone recipe if updated during an existing game; this is normal.

6 years ago
(updated 6 years ago)

v4.0.11 - Fixed compatibility with Omniwood, when used alongside full bobs + angels (ABZ)

6 years ago
(updated 6 years ago)

v4.0.12 - Improved compatibility with Bio Industries (AGAIN), as they changed the dashes to underscores in their "disassemble" recipes, sometime since my last check (back in v2.0.1!). Now properly removes all Bio Industries disassemble recipes.

6 years ago
(updated 6 years ago)

v4.0.13 - Fixed compatibility with Bio Industries. Those damn disassemble recipes will be the death of me. Hopefully fixed for the last time. I rendered them non-unlockable and hidden, instead of outright removing their data from the game. Should fix the issue of adding BI to an existing save.

6 years ago
(updated 6 years ago)

v5.0.0 - I thought I should probably update this mod before going off to play 0.16, so I did! It should feature the exact same functionality as in 0.15, just updated to 0.16

6 years ago
(updated 6 years ago)

v5.0.1 - Added 2 module slots, which now allows beacon effects to apply to recyclers (excluding productivity, for obvious reasons)

6 years ago

v5.1.0 - Recoded almost entirely from scratch, with minor exceptions.
-- Recyclers come in two tiers, a solid only recycler, and a solid/fluid recycler. Icons use the incredibly useful powerbars, edited from Zombiee's ShinyBobGFX
-- T1 recycler is even easier to research (only red science, only requires electronics and automation) but more expensive (requiring 2 assembling machine t1's and some green circuits), and marginally slower . Still has 2 module slots though, so it can be beaconed.
-- T2 recycler is slightly harder to research and craft (requiring steel, red circuits, and 2 assembling machine t2's), but is almost twice as fast as before, and has 4 module slots.
-- Recyclers now know whether players are in normal or expensive mode, and will change their uncrafting recipes accordingly.
-- Recyclers will require some alloy processing from bobs mods if detected (bronze for t1, invar for t2) and slightly changed recipes (for approx. same difficulty)
-- Recyclers output slots will stretch to fill the largest ingredient amount (only 5 and 7 for vanilla, roughly 10 and 12 for bobmods, up to however many slots as needed)
-- Added new Safety toggle, which prevents items whose ingredient counts exceed their stack sizes from being recycled. If toggled off, this restriction is lifted, though any ingredients above the stack limit will simply be lost. For those who really like to shovel random crap into these recyclers.
-- Removed 2 redundant settings which can now be implemented without issues
-- Did not mess with automatic ingredient push, hopefully just made it work with the new tier of recycler. May or may not migrate properly with existing games. Theoretically, all existing recyclers (on ground or in pocket) should be upgraded to the new t2's, though you will have to research the new tech to create more.

6 years ago
(updated 6 years ago)

v5.1.1 - Minor bugfix for angel's smelting. If angel's smelting is detected, uses advanced invar processing as a dependency instead of invar alloy processing (which is removed by angels smelting). This should retroactively apply to any save games in v5.1.0, but it might not.

The v5.1.x series may or may not break save games started in 5.0.x, so if things don't look right in-game, I suggest reverting to v5.0.1 and updating when you're ready to start a new playthrough.

Tech tree with angels smelting:
Reverse Factory 1
Reverse Factory 2

6 years ago
(updated 6 years ago)

v5.1.2 - Potential bugfix, added a few more checks to hopefully prevent bad rf recipes from being created. If there are rf-recipe related errors after this, I will eat.. something that is unappealing to be eaten.

Small fix to safety toggle so it now applies to normal/expensive recipes as well (it used to just affect simple recipes which didn't have normal/expensive variants).

6 years ago

v5.1.3 - Compatibility fix for angels refining and bio industries. Prevents crushed stone duplication in recyclers. Allows bio industries terraformer to be recycled.

5 years ago
(updated 5 years ago)

v5.1.4 - Compatibility fix for Homeworld Redux, and any other mod that has a zero-result count recipe. No longer available, broke most reverse recipes that did not specify a result count.

5 years ago

v5.1.5 - Fix for previous bug; set result count to only check if it's not zero. If there is no result count at all (which is the usual, as this value defaults to 1) then it will still pass through the reverse logic. Basically means it's fixed now.

5 years ago

v5.1.6 - Fixed bug with bobs plates Here, hopefully doesn't mess up compatibility with other mods. Also added toggle for recycling vehicles and power armors (off by default)

5 years ago

Why do you not use the changelog.txt that leads to this tab https://mods.factorio.com/mod/017-science/changelog ?

5 years ago

That's a good question. I don't have that tab. Might need to enable it from somewhere? Definitely looks a lot prettier than this mess. Wait... ahh, you have to include the file in the mod itself. Interesting. I'll upload that real quick, thanks!

5 years ago

Glad I could help you. I am on a mission to add that to as many mods as possible.

5 years ago
(updated 5 years ago)

Doing the lord's work there lmao. I'll be sure to lock this thread afterwards. Unfortunate that hyperlinks won't work the same as they do in the main page and in posts, so I can't link directly to the error thread in a bugfix, but oh well

Please visit the changelog here for any future versions of the mod

This thread has been locked.