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 [Fixed] Kras2 Spaced Out + AAI Industry Compatibility Error

4 months ago

An error occurs when used with the ​Krastorio 2 Spaced Out​ mod. This issue started after updating ​Krastorio 2 Spaced Out​ to version 1.0.4.

kry_stdlib/stdlib/data/technology.lua:177: attempt to index field 'unit' (a nil value)
stack traceback:
kry_stdlib/stdlib/data/technology.lua:177: in function 'multiply_cost'
reverse-factory/prototypes/reverse-factory-updates.lua:37: in main chunk
[C]: in function 'require'
reverse-factory/data-updates.lua:2: in main chunk

4 months ago
(updated 4 months ago)

Hm, I was unable to recreate the error with Kras2 Spaced Out v1.0.6 and Reverse Factory v9.0.23, using default settings for both mods, with Space Age v2.0.47

There must be another mod affecting things, or perhaps a non-default setting.

Specifically, line 37 of reverse-factory-updates is attempting to multiply the cost of the reverse factory 1 tech, immediately after having copied the science pack cost of the automation tech on line 36. If automation was changed to a trigger tech by another mod, it would no longer have a cost, and the multiply_cost function would fail. Not sure which mod would do this, but I can probably put some safety mechanisms in place so the function doesn't fail that way.

4 months ago
(updated 4 months ago)

While I still wasn't able to recreate the error myself, I've uploaded an attempt at a fix, as of v9.0.24 (note: this update will require the latest update of kry_stdlib, v2.0.4)

4 months ago
(updated 4 months ago)

First of all, thank you very much for the update.

I compared the differences between version 1.0.3 and 1.0.4 and found that version 1.0.4 removed the optional dependency on ​planet-muluna, causing the ​reverse-factory​ mod to throw an error. However, even after removing ​planet-muluna, the error persisted. Eventually, I used the process of elimination and found that the culprit was ​AAI Industry...

I'll continue reporting this issue to the author of the ​Krastorio2 Spaced Out​ mod to see if the optional dependency can be reinstated

4 months ago
(updated 4 months ago)

Wow, what a highly specific combination of mods that causes the issue.

  • Kras2 Spaced Out by itself, totally fine
  • AAI Industry + vanilla Space Age, totally fine
  • Kras2 Spaced Out + AAI Industry, causes the error.

For some reason, only with this specific combination, the automation tech is changed to a research trigger, as expected. I accidentally messed up a line with my previous attempt at a fix, but should now be fixed in v9.0.25 (with fixed v2.0.5 of kry_stdlib)

4 months ago

Appreciate the update! Everything's working perfectly now.

4 months ago
(updated 4 months ago)

Due to the delay, my reply got posted twice - seems even the internet is extra grateful about this issue lol

New response