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
14 days ago
0.13 - 2.0
66.9K
Manufacturing

b [Pending] Error when loading with Scrappy Industry

2 months ago

When loaded together with th Scrappy Industry mod, the game shows the following error:

3.660 Error ModManager.cpp:1758: Failed to load mod "reverse-factory": reverse-factory/data-final-fixes.lua:35: attempt to index field 'rf-barrel' (a nil value)
stack traceback:
reverse-factory/data-final-fixes.lua:35: in function 'final_fixes'
reverse-factory/data-final-fixes.lua:58: in main chunk
3.696 Loading mod core 0.0.0 (data.lua)
3.762 Checksum for core: 2220362065
3.804 Error ModManager.cpp:1758: Error in assignID: recipe-category with name 'recycling' does not exist.

I recall playing with the two mods together sometime in the past (a month or two, maybe?) and it used to work fine, but that doesn't seem to be the case anymore (which jeopardizes one of my old saves..).
I tried disabling the "Solid Recycled Fluids" option but that didn't really do anything. Neither did disabling Scrappy Industry's "Handcraft-friendly" option (which "Creates hidden duplicates of recipes to allow seamless handcrafting").

2 months ago

Hmm, while I can technically fix the startup error between the two mods, it won't fix the underlying incompatibility between the two.

I think there might have been a passive load order change, since both mods run during data-final-fixes; their mod modifies almost all of the recipes in the game and adds a percent chance to produce scrap, while my mod ignores all recipes that have percentage (which prevents the rf-barrel recipe from being created, which I modify later)

I can update it to only modify the rf-barrel recipe if it exists in the game, which will prevent the startup error and allow the game to load, but basically nothing is recyclable because all the recipes are now percentage-based instead, and I'm not entirely sure how or if I should handle those.

Implemented the fix as of v9.0.32, but I wouldn't say they are entirely compatible.

2 months ago

I see, thank you. Would it be worth approaching the Scrappy Industry mod about compatibility or is this just fundamentally unsolvable?

2 months ago

It mainly depends on what the solution should be; if the goal is to make the items recycle back into the recipes, regardless of the percentage-type recipes, then technically I could make it work, by just removing the restriction for those kinds of recipes.

The only problem with that solution is that it might not apply globally to all mods that use percentage-type recipes. Maybe.. maybe I could just lift the restriction for this specific mod, that could be a more viable solution (though it pushes the main argument further down the road, but hopefully it just won't come up again with another mod lol)

New response