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
20 hours ago
0.13 - 2.0
61.7K
Manufacturing

a [Announcement] Preparing for Space Age/2.0

23 days ago
(updated 21 days ago)

So the biggest question on the menu is: Factorio Space Age now has a vanilla recycler, is Reverse Factory still needed?

After playing around with the beta for a while, I'm going to say yes, for a few reasons. One of the more important being that the scrap recycler cannot produce fluids. Any fluid parts of recipes are simply destroyed when recycled, which I would like to keep for my Reverse Factory. Secondly, the efficiency of the scrap recycler is hard-coded to be 25%. This could be overriden via mod, but it would require rewriting every single recycling recipe, in a similar manner to what Reverse Factory already does (there's no easier way to do this)

The third important reason, is that (with Space Age enabled) the scrap recycler is not unlocked until Fulgora, which could be reached fairly early on, gated only behind blue science and the space platform. I would personally prefer to unlock recycling machines on Nauvis instead. In addition, the scrap recycler cannot be crafted outside of Fulgora, though is more of a minor issue, and that limitation could also easily be removed with a mod, so doubly less important.

The even least important reason... although I love the aesthetic of the new scrap recycler... I will admit that I have become quite attached to the green furnace graphics. Oh, and probably more important than any of those, is that.. it's locked behind a purchase of the Space Age dlc. A free option is always better than a paid one (although the dlc is still a huge value add imo)

Next question on the agenda: Will the Reverse Factory mod be changing in any significant ways?

Yes, but there will be options to keep things feeling nearly identical to how the mod functions right now. Most important change would be the default balance, which will attempt to be more in line with how the scrap recycler functions, without completely overshadowing or nullifying the use of the scrap recycler.

The first notable change is that default recycling efficiency for the Reverse Factory will be set to 25% (down from current 100%), same as the vanilla scrap recycler.

I've always thought the Reverse Factory was a little overpowered, but my solution for balancing was janky at best, and made little to no difference at worst, so I just left it at 100%, which at least worked exactly as expected.

This efficiency setting can be overriden by the user, same as it is now, using any value from 1-100% efficiency. The only difference is that the setting works properly, using a similar logic to the scrap recycler, so that after recycling 4 objects at 25% efficiency, the Reverse Factory should produce a number of ingredients needed for a single craft of that item (though the exact amount varies, same as the scrap recycler). I will post a more detailed breakdown over how the logic works at a later date (it's actually quite interesting!)

The second notable change is fluid ingredient handling.

As hinted above, the Reverse Factory will retain the ability to produce fluid ingredients through recycling. As noted by several users, the issue of random fluid outputs blocking the output pipes is a longstanding one, and my attempt to resolve the issue involved a beta setting of recycling fluids into items that can be processed back into fluids in another machine. There were a few issues with this solution, which I have finally been able to resolve, with some help from Space Age.

Moving forward, any fluid ingredients (like sulfuric acid from blue circuits) will be converted into "solid" versions, that can be processed in chemical plants back into their fluid form (similar to the way ice cubes are handled in Space Age). This also allows for the Reverse Factory to recycle items that would produce more than 3 fluids (since the previous version only had 2 output pipes). Current ratio is 10 units of fluid for 1 unit of "solid", since most recipes use multiples of 10 fluid in their recipes. I should be able to add exceptions to this default, in case other mods use unusual numbers.

One unfortunate change is that the Reverse Factory will no longer be able to recycle input fluids.

I'm not sure how many people even knew this was possible, since it was locked behind a higher tier machine, but I have removed all fluid pipes from the entity (also because they looked a bit jank), so no more fluid inputs. It likely wasn't a heavily used feature, but if there's demand for it, I can re-add it later, but it probably won't be necessary.

One minor change, is that the Recyclable power armor/vehicle toggle will be removed (now enabled by default)

I only ever created this setting due to a potential fear of recycling an armor or vehicle with an equipment grid full of equipments, but honestly... how often is that going to happen? When a player upgrades their armor, they're going to want to remove the equipment from the existing grid to place into the new armor, and then attempt to recycle the (now empty) old armor. It's more likely that a player will be unable to recycle that item without equipment inside due to this setting, rather than protect someone from accidentally recycling an item with equipment inside.

Alternatively, it's more than possible for a player to have an vehicle equipment grid mod (I just happen to have one myself) and accidentally craft too many cars or trains, and then be unable to recycle those equipment-less items because of this setting. So it ends up being more of an annoyance than anything else. There might be a way to prevent recycling of these items at runtime (without false positives), but it seems like a lot of work, for a relatively minor possibility. Not necessary at this time.

And the final notable change is how the prod loop setting will be handled.

For those who don't know (at 100% efficiency) recycling an intermediate product (like a green circuit), and then crafting it again (with prod modules), you could generate additional "free" green circuits, without losing any ingredients, at the cost of power. I never really cared for exploiting this loop, but I also didn't like the idea of shutting it down entirely, so eventually I ended up locking it behind the tier 3 machine, with the only other option being to disable the loop entirely (which meant no recycling intermediates, only finished products, which can't accept productivity modules, and can't be exploited).

The default setting would still be keeping the prod loop gated behind tier 3 machines (though the tech placement of that machine might change, haven't looked at techs yet, and as always, subject to change). The "always disabled" setting would function the same way it does now, preventing the prod loop for all machines (so none can recycle intermediates). The new "always enabled" setting would allow the prod loop at all levels (so every tier could recycle intermediates), so people can exploit to their heart's desire (or just allow earlier recycling of intermediates if they wish, without using the exploit). Honestly, I'm not even sure if the prod loop can even be exploited at 25% efficiency, so maybe intermediate recycling doesn't even need to be gated anymore...

One thing I'm a bit worried about, is the Quality part of the new Space Age dlc. Apart from being the selling feature of Fulgora with Space Age enabled, the scrap recycler was also an easy way to scrap low-quality versions of a product, returning some of the material cost, in order to re-craft them at a potentially higher quality. The Reverse Factory is technically able to perform this exact feat, with a much lower barrier to entry than the scrap recycler. I haven't been able to test quality recycling just yet, but so far, I'm honestly not sure how to prevent the two machines from competing over the same functionality.

And lastly, don't expect this mod to play well with any other mods on release.

I've only rewritten the parts of the code that needed to be modified to function under the new Factorio rules, and to adhere to my new specifications. The bulk of external mod handling has not been tested (since I don't have access to their beta versions, and I don't really want to ask).

Mods that are likely to be incompatible at launch include, but are not limited to:

  • bobassembly: Might not crash, but tech and recipes for Reverse Factory may be incorrect
  • bobplates: Might not crash, but tech and recipes for Reverse Factory may be incorrect
  • IndustrialRevolution3: Might not crash, but tech and recipes for Reverse Factory may be incorrect
  • nullius: Might crash, due to complete rewrite of tech and recipes that may no longer apply
  • Fantario: Might crash, due to changes copied from modified assembling machines
  • FTweaks: Might crash, due to changes that may or may not apply (related to cheap cliff explosives setting)
  • Warptorio, Blueprint Sandboxes, Space Exploration, or any other mods involving alternative surface clearing or deletion

Oh, and one last thing to mention, the automatic ingredient push setting is still around, though I've trimmed it down significantly, cutting out a lot of unnecessary code. Hopefully, it should still work without errors, though I haven't been able to test extensively just yet.

16 days ago
(updated 16 days ago)

I was hoping that Factorio Standard Library would have updated by now, but all you have to do to make it work with this mod is to unzip the stdlib mod, then edit the info.json and change "factorio_version" to 2.0

15 days ago

I was hoping to use this to take a bit of time off the late-game quality grind. A 0.01% chance at a legendary is going to be rough in single player with how much time it will take to get anything worthy. Please don't nerf or remove this feature. Recycling a quality item (even at 100%) should return that quality of parts. Balance the default settings how you wish, but please leave the ability to use this for those of us who don't have 300 hours to grind a legendary set of goodies to use.

15 days ago
(updated 15 days ago)

I haven't actually done any testing with quality item recycling actually, I never got that far into Space Age in my beta test playthrough. I assume that quality recycling through the Reverse Factory should function the same way the scrap recycler does? If it doesn't, then I'll have to take a look at that; I didn't really have access to any creative mods while updating this one.

Just to be clear, I haven't purposefully nerfed anything regarding quality recycling yet, and after thinking about planet balancing for so long, I've decided not to nerf quality recycling either. Ideally, the Reverse Factory should recycle a quality item into the same quality ingredients. If that's not how the scrap recycler already works, then I'll have to look into making Reverse Factory work that way. Possibly make it a toggle, if it seems too broken; but you're right in that it would definitely eliminate a lot of (what could be considered unnecessary) grinding

15 days ago

Yes, as far as I know, in SA, if you scrap an Epic you get Epic parts (25% of the time...) There's even an achievement for eating a Legendary fish, speed runners will have fun with that one.

What some (not I, surely) might consider OP with this mod is adding quality modules to these recyclers to try to get even better things out.

9 days ago

Balancing Ideas:
- It looks like the Recycler produces quality items. If the Quality mod is enabled, then maybe Reverse Factory (RF) will be normal quality at 25% return. You'd be able to get the RF sooner and start on recycling normal items sooner and anywhere (except Fulgora, maybe with research?), and then move the operation to Fulgora to get higher quality items. Optionally, have a toggle on the machine that returns quality items at a MUCH lower rate than the SR would on Fulgora.
- If Quality isn't enabled, then RF could mimic more of what the what the SR would do, by default.
- Also, it looks like the Recycler doesn't return fluids, so that would be something additional to play/balance with.

9 days ago
(updated 9 days ago)

Thanks for the feedback! I'm still playing around a bit with the vanilla balancing (just changed some stuff with v9.0.5)

I've decided to stick close to what the scrap recycler can do, while adding a bit more functionality, with or without quality or space age. I don't think there's any good way to balance this around the vanilla recycler, apart from not allowing Reverse Factory on Fulgora (thus requiring the player to still use the scrap recycler there).

Current commonalities between the two:

  • Both set to 25% efficiency by default
  • Both return the same quality products when quality inputs are received (without quality modules)
  • Both allow the use of quality modules by default

Current differences between the two:

  • Scrap recycler can only be built on Fulgora, but can be placed anywhere (including space platform); by default, the Reverse Factory can only be crafted on Nauvis, and can only be placed on Nauvis, Gleba, and Aquila (still unsure about Vulcanus). Obviously won't be allowed on Fulgora by default.
  • The scrap from Fulgora is technically not an allowed input for the Reverse Factory (though it probably wouldn't be difficult to add/copy)
  • Crafting speed of scrap recycler is 0.5 vs Reverse Factory 1,2,3 (respective to tier) (this might seem too powerful, but it depends more on the recipe, since the scrap recycler sets the recycling recipe to a fraction of the original recipe; mine works in a similar way with different numbers)
  • Pollution of scrap recycler is 2/m vs Reverse Factory 5,3,1/m (this feels backwards, I might have messed up the math; the pollution should probably not be getting more efficient at higher tiers)
  • Power consumption of scrap recycler is 186kW (6.0kW idle) vs Reverse Factory 155kW (5.0kW idle), 233kW (7.5kW idle), 310kW (10.0 kW idle) (this seems balanced, since the reverse factory is better than the scrap recycler, so should use more power)
  • The t1 and t2 Reverse Factory cannot recycle intermediate products, and the t1 also cannot recycle items that had fluid ingredients (I think concrete is the only item affected by this in vanilla anyways).
  • The t3 Reverse Factory returns fluid ingredients as solid items which must be re-processed back into actual fluids in a chemical lab (similar to how ice/water is handled in Space Age); the vanilla scrap recycler does not allow this.
  • The scrap recycler automatically pushes its output to the tile in front of it, while the Reverse Factory requires manual emptying via inserter. This makes recycling with quality modules a bit slower if the output slots cannot emptied quickly enough (since different quality results attempt to occupy the same output slot in the machine)

In terms of quality recycling.. I couldn't actually find a way to change how that works. Quality doesn't appear to be a property inherent to an individual recipe, so it can't be modified during the loading phase (neither the rate of production nor the ability to strip quality from the input). Quality as an item property might only exist and be modifiable during runtime, which is a bit outside of my area of expertise (it took me long enough just to get the auto ingredient push thing working properly)

New response