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

b [Fixed] load error: "attempt to perform arithmetic on field '?' (a nil value)"

4 years ago
(updated 4 years ago)

Just updated Factorio to 0.17.55 and your mod to 6.1.0. Mod gets disabled:

Failed to load mod "reverse-factory": __reverse-factory__/func.lua:283: attempt to perform arithmetic on field '?' (a nil value)
stack traceback:
    __reverse-factory__/func.lua:283: in function 'formatResults'
    __reverse-factory__/func.lua:109: in function 'makeRecipe'
    __reverse-factory__/func.lua:22: in function 'addRecipes'
    __reverse-factory__/data-final-fixes.lua:14: in main chunk
4 years ago

Same here, and I do have the Factorio Standard Library mod.

4 years ago

Yup. I think it was the updated version of this mod that came out like an hour ago. Going to see if I can roll it back a version.

4 years ago
(updated 4 years ago)

@Ambaire: Same here. Didn't mention the Factorio Standard Library because it has already been required by another mod I use for quite some time, so I didn't need to install it. :-)

4 years ago

OK, I downloaded 6.0.9 into my mod folder, and then in the mod manager made that version the active one, and now it seems to be working again.

4 years ago

OK, I downloaded 6.0.9 into my mod folder, and then in the mod manager made that version the active one,

Is that a new feature of Factorio? Works great, but I never noticed it before! I used to manually download an older version of a buggy mod and remove/rename the buggy version. That would restore a working version of the mod, but I'd always get reminded that there was an update (to the buggy version) available.

4 years ago

It's good to know that if something breaks, there will be near-instant feedback. It's really hard to test this mod with different mod configurations, there are just too many possible cases. I thought if I made sure it worked with vanilla, bobs, and bobs/angels, it would be enough, but I guess not.

Hmm... arithmetic on nil value.. that's weird. That would imply there's no ingredient defined in some recipe, but I definitely have a check for ingredients table before this point... But without knowing what recipe would cause this error...

Do you guys have any mods in common, aside from the ones I've tested?

4 years ago

Having the same errors. What mods are you using Snoman314 and Pi-C?

4 years ago

a recipe without ingredient? it could be water well pump

4 years ago
(updated 4 years ago)

A few mods hit the deck with the latest Factorio version - Cargo Ships, FARL, AAI Warden, LTN and Space Exploration. They patched up and then Reverse Factory started erroring.
Unloaded those, and Reverse Factory is fine... until Space Exploration is re-enabled. Likely candidate?

4 years ago

it's not water well I'm now disabling mods 1 by 1 to find the recipe

4 years ago

Big list of mods:

AbandonedRuins
alien-biomes
alien-biomes-hr-terrain
Armored-train
ArtilleryFlares
AsphaltRoads
attach-notes
auto-deploy-robots
Automatic_Train_Painter
Bio_Industries
Bottleneck
BurnerAssemblingMachine
BurnItAll
BurnysTSBC
CanalBuilder17
cargo-ships
CleanBatteryIcon
clock
Combat_by_Samuel
Concretexture
controllinator
dirty_power
Dirt_Path
DiscoScience
DragonIndustries
even-distribution
extinguisher
Fill4Me
fish_slurry
flamethrower-fluid
Flammable_Oils
Geothermal
GhostScanner
Gizmos_Car_Keys_Z_Patch
Hazard-Lights
Hazard-Lights-Selection-Tool
helmod
HermiosLibs
Honk
improved-medium-electric-pole
InlaidUVLamp
islands_world
JunkTrain2
laserlines
laser_fix
LJD_Vehicles_A16
Longer_Days_and_Nights
Maps
minime
multi-product-recipe-details
MultipleUnitTrainControl
MustardArtilleryShell
nicefill
Nightfall
Noxys_Deep_Core_Mining_Tweak
nuke-cliffs
OpteraLib
Orphan
PavementDriveAssist
power-grid-comb
QueueToFront
RealisticDecorationCleanup
RealisticReactors
Realistic_Electric_Trains
Reinforced-Walls
remote-switch
research_causes_evolution
ResourceLabelsContinued
reverse-factory
RoboTank
Rocket-Silo-Construction
RubberBelts
SantasNixieTubeDisplay
SchallAlienMutation
SchallLampContrast
SchallTransportGroup
SchallUncraft
SimpleCompress
SimpleSilicon
SmallRobots
SmartCannonShells
SolarWalls
Soundpack-alerts-and-sirens
stdlib
steinios_unlasting_oil
StoneWaterWell
Tapeline
textplates
Todo-List
ToxicForest
TrainOverhaul
TrainsSignalSender
Train_Alerts
VersepellesAquaFarm015
visual-signals
vtk-armor-plating
vtk-cannon-turret
vtk-deep-core-mining
vtk-ta-big-bertha-artillery-sounds
WagonColors
WaiTex_Full
Warehousing
what-is-it-really-used-for
Will-o-the-Wisps_updated
wood-to-landfill
WoodHarvester
Wood_Gasification
YARM

4 years ago

space exploration is a strong candidate reverse factory started to work again with it disabled

4 years ago

Sorry, didn't see this posting before:

A few mods hit the deck with the latest Factorio version - Cargo Ships, FARL, AAI Warden, LTN and Space Exploration. They patched up and then Reverse Factory started erroring.
Unloaded those, and Reverse Factory is fine... until Space Exploration is re-enabled. Likely candidate?

From these mods, I only have Cargo Ships installed. Deactivating it and using version 6.1.0 of Reverse Factory, crashed the game again on start.

4 years ago

Hello,

I had the same error and have the following MOD's active.

5Dim's mod - Core
5Dim's mod - Ores
AAI Industry
Afraid of the dark
Aircraft
Angel's Addons - Ore Silos
Angel's Addons - Petrochem Train
Angel's Addons - Pressure Tanks
Angel's Addons - Warehouses
Angel's Bio Processing
Angel's Petro Chemical Processing
Angel's Refining
Angel's Smelting
Avoid Struggle with integration Library (Alpha)
Base mod
Better Axes
Big Brother
Bio Industries
Bob's Adjustable Inserters
Bob's Assembling machines
Bob's Enemies
Bob's Functions Library
Bob's Greenhouse
Bob's Logistics
Bob's Metals, Chemicals and intermediates
Bob's Mining
Bob's Modules
Bob's Ores
Bob's Power
Bob's Revamp
Bob's Technology
Bob's Warfare
Bullet trails
Crafting Speed Research
Deadlock's Crafting Machine
Deadlock's Research Notifications
Deadlock's Stacking Beltboxes & compact loaders
Dragon Industries - Nauvis Division
Electric Vehicles Lib : Reborn
Electric Vehicles: Reborn
Endgame combat
EvoGUI
Factorio Standard Library
Flare Stack
FNEI
Fully Automated Rail Layer
Inserter Fuel Leech
Krastorio
LTN - Logistic Train Network
LTN Tracker
More Exoskeletons
More Fusion Reactors
Noxys Extra Settings Info
Optera's Library
Personal Roboport MK3
Pyanodons Coal Processing
Pyanodons Fusion Energy
Pyanodons HighTech
Pyanodons Industry
Pyanodons Petroleum Handling
Pyanodons Raw Ores
Reinforced Walls
Resource Spawner Overhaul
Robot Attrition
ShinyIcons
Side Inserters
Squeak Through
Steinios Unlasting oil
VehicleSnap
Walls Block Spitters
Youki Industries

and Reverse Factory that is now disabled

Hope this list will help you a bit further.

4 years ago
(updated 4 years ago)

Woah Davidbest, that is a crazy modlist. Bobs, angels, 5dims, krastorio, AND pyanodons? And Pi-C that's a lot of combat mods lol.

Alright, I have a few leads now; the two modlists you shared both have Bio Industries and a few Reika mods in common. Then there's pyanondons, krastorio, aai/space exploration, and yuoki industries, as some of the big mods that might need compatibility checking. Apart from that, deep core mining may have some recipes without ingredients, depending on how their machines work.

I've previously had a similar issue with attach notes and bob mods, which should still be fixed, but attach notes may still cause similar errors when used with other mods.

Gonna be a long day of testing when I get back. But thanks all for help! It might not be just one single mod causing the error, but different mods that define recipes in similar ways (that differ from the way recipes are defined in vanilla/bobs/angels).

4 years ago
(updated 4 years ago)

I don't have bio industries but I do have factor-IO from Reika. I am trying to think of what recipes would have an empty table, but I'm not finding one. I will keep thinking.

Oh, you know what, I'll bet it's flare stack. Those recipes only produce pollution. Testing now. Nope, disabling only that didn't do it. Trying some other things.

4 years ago
(updated 4 years ago)

Edited back to the original comment. Can't delete this one for some reason. :-/

4 years ago
(updated 4 years ago)

Yeah, flare stack probably wouldn't be the problem; I think their recipes have different names when compared to the items/fluids. This would get filtered out near the beginning of my reverse recipe function, which would be unable to match an item to that recipe.

Also, those recipes should still have ingredients (the items being burned/gased), they would just produce 0 results (which is also filtered out by my reverse recipe logic). This type of recipe is either one that is formatted... "improperly", or at least unusually, or one that creates an item out of no ingredients. Though I think the latter case is also being filtered out...

I can imagine a few cases, but if a mod had both a [recipe].normal/expensive.ingredients defined, AND a [recipe].ingredients defined, then something might break there.

Or if a mod defined one of its recipes using the simple {"itemname", amount} alongside the more complex {type="item/fluid", item="itemname", amount=amount}, that would definitely break something. Neither of these cases happens in vanilla/bobs/angels, so I didn't code any checks for them.

4 years ago

I got somewhat the same error, but a little different:

Mods to disable:Fout bij het laden van volgende mods: reverse-factory/func.lua:223: bad argument #1 of 2 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
reverse-factory/func.lua:223: in function 'checkResults'
reverse-factory/func.lua:58: in function 'makeRecipe'
reverse-factory/func.lua:22: in function 'addRecipes'
reverse-factory/data-final-fixes.lua:14: in main chunk

Uit te schakelen mods:
• reverse-factory

4 years ago

Woah Davidbest, that is a crazy modlist. Bobs, angels, 5dims, krastorio, AND pyanodons? And Pi-C that's a lot of combat mods lol.

Well, kind of. Real combat mods are not that many, only two (as far as I can see) that modify enemies (Schall Alien Mutation and Will-o'-the-Wisps), some providing new weapons, and some with additional defenses. Actually, I always was of the impression that I'd have more train-related mods than anything else. The funny/sad thing is, I didn't even get to use most of the stuff yet, and I haven't even found the time to really play for more than a month. All I've got around to lately was just loading up Factorio to keep game and mods updated, sometimes looking at my save game and imagining what I should do next -- or filing bug reports if the game crashes. Too much work at the moment to really get into the mood for serious playing, figuring out in detail what to build how and where … But it's better this way, the game is so addictive I'd get into serious trouble if I'd start playing now because I would miss all of my deadlines. :-)

4 years ago

Im getting the same problem...here is my mods list:
AbandonedRuins_0.2.5.zip
Actual_Craft_Time_0.3.9.zip
adrenaline_1.3.3.zip
Armor_upgradable_1.0.0.zip
assembler-pipe-passthrough_0.0.3.zip
aswil_0.4.5.zip
AtomicArtillery_0.1.11.zip
auto_manual_mode_0.0.3.zip
AutoDeconstruct_0.1.12.zip
auto-research_5.0.2.zip
beautiful_bridge_railway_0.17.3.zip
Better-TrainHorn_0.2.0.zip
bobinserters_0.17.6.zip
Bottleneck_0.10.4.zip
bullet-trails_0.4.1.zip
clock_0.17.6.zip
Clockwork_0.17.2.zip
Clowns-Nuclear_1.3.4.zip
CoverupFIX_1.0.1.zip
creative-mod_1.2.0.zip
Cursed-ELB_0.0.4.zip
custom_power_armor_fix_3.0.4.zip
CW-hydrogen-power_0.2.7.zip
DeathMarkers_0.2.0.zip
dirtybarrels_0.1.62.zip
DiscoScience_0.1.12.zip
DoubleSpeedBelts_0.2.2.zip
DragonIndustries_1.17.15.zip
early_construction_0.6.0.zip
Epic-Artillery-Sounds_1.0.1.zip
even-distribution_0.3.9.zip
event-listener_0.8.7.zip
EvoGUI_0.4.401.zip
expanded-rocket-payloads_0.17.1.zip
FastRemoveTiles_0.0.8.zip
Fill4Me_0.6.0.zip
Flammable_Oils_fix_0.2.2.zip
floating-damage-text_0.17.3.zip
Flow Control_3.0.4.zip
FluidMustFlow_1.0.2.zip
FuelTrainStop_0.17.3.zip
Full_Power_Coverage_0.3.0.zip
GDIW_0.17.5.zip
Hazard-Lights_17.0.3.zip
HeavyTank_0.17.1.zip
Helicopters_0.3.14.zip
helmod_0.8.11.zip
Hiladdar_Research_0.17.3.zip
Honk_3.0.1.zip
InserterFuelLeech_0.2.2.zip
LandMover_0.2.6.zip
laser_fix_0.17.10.zip
LD_AutoCircuit_0.2.2.zip
LightedPolesPlus_1.3.5.zip
LoaderRedux_1.4.10.zip
Longer_Days_and_Nights_0.0.2.zip
long-reach_0.0.13.zip
LootMilitaryScience_0.0.7.zip
MakeTheShotgunGreatAgain_1.0.0.zip
MaxRateCalculator_3.1.24.zip
Mining-Space-Industries_0.17.70.zip
MiningTools_1.0.37.zip
mod-list.json
mod-settings.dat
multi-product-recipe-details_0.17.2.zip
MushroomCloud_1.0.8.zip
nicefill_0.1.16.zip
nomes.txt
no-wall-repair_0.0.2.zip
Noxys_Extra_Settings_Info_0.1.0.zip
Noxys_Multidirectional_Trains_0.1.1.zip
Noxys_Swimming_0.1.2.zip
nuke-cliffs_0.17.2.zip
OmegaDrill_0.1.9.zip
OpteraLib_0.1.7.zip
Orbital Ion Cannon_1.7.2.zip
OverloadedTrains_0.17.1.zip
platforms_19.18.3.zip
Powered_Entities_0.3.25.zip
pyindustry_1.2.8.zip
qol_research_2.3.1.zip
Rampant_0.17.26.zip
RampantArsenal_0.17.18.zip
Realistic_Electric_Trains_0.4.3.zip
RealisticDecorationCleanup_0.17.4.zip
RealisticPower_1.0.15.zip
RealisticReactors_2.17.6.zip
RealisticReactors-utilities_0.17.2.zip
reverse-factory_6.1.0.zip
Rocket-Silo-Construction_0.17.7.zip
RPGsystem_0.17.25.zip
rso-mod_5.0.13.zip
scattergun_turret_4.2.0.zip
SchallRemainsPickup_0.17.1.zip
SchallTransportGroup_0.17.0.zip
Shortcuts_0.7.4.zip
SimpleSilicon_1.2.1.zip
Soundpack-alerts-and-sirens_1.0.2.zip
SpaceMod_0.4.4.zip
specialized-oil-processing_1.1.2.zip
Squeak Through_1.3.0.zip
stdlib_1.2.0.zip
steinios_unlasting_oil_0.17.2.zip
SupplyDrop_0.3.1.zip
Tapeline_0.5.0.zip
timed_technology_17_0.0.1.zip
timesaver-for-crafting_0.5.3.zip
TrainOverhaul_0.2.7.zip
tree_collision_0.5.1.zip
TurnOnResearchQueue_0.0.1.zip
unlushed_trees_0.17.3.zip
VoidChestPlus_2.2.2.zip
WagonColors_0.1.1.zip
walls-block-spitters_0.4.4.zip
weaponSoundsRedone_1.3.0.zip
what-is-it-really-used-for_1.4.3.zip
WideChests_2.2.2.zip
Wind_Turbine V16_4.0.6.zip
WireShortcuts_0.2.178.zip
YARM_0.8.18.zip
yemtositemcount_0.1.4.zip
YouDied_1.1.0.zip
ZAdv_ruins_1.1.0.zip
ZAdventure_2.17.2.zip

4 years ago

The game works fine with the previous version of this mod, i will keep using it until the error get fixed. There is the error log:
561.307 Mods to disable:Falha ao carregar mods: reverse-factory/func.lua:283: attempt to perform arithmetic on field '?' (a nil value)
stack traceback:
reverse-factory/func.lua:283: in function 'formatResults'
reverse-factory/func.lua:109: in function 'makeRecipe'
reverse-factory/func.lua:22: in function 'addRecipes'
reverse-factory/data-final-fixes.lua:14: in main chunk

Mods para serem desativados:
• reverse-factory

4 years ago

Im having this problem too. Here is my mod list:
AAI Crafting Tab
AAI Industry
AAI Programmable Structures
AAI Signal Transmission
AAI Signals
AAI Vehicles: Chaingunner, Hauler, Laser Tank, Miner, Warden
AAI Zones
Advanced Modules
Aircraft
Alien Biomes
Alien Biones H-Res
Avoid Struggle with Integration Library
Base Mod
Big Brother
Big Brother Bob's Plugin
Bobs Adjustable Inserters
Bobs Assembling Machines
Bobs Funcctions
Bobs Greenhouse
Bobs Logistics
Bobs Mining
Bobs Power
Bottleneck
Bullet Trails
Crafting Speed Research
Death Markers
Dectorio
Disco Science
EvoGui
Evolution Reduction via Destruction
Factorio Standard Library
Factorissimo2
Flow COntrol
Fluid must flow
FNEI
Full Power Coverage
Fully Automated Rail Layer
Grappling Gun
Helicopters
Infinite Inventory Research
Krastorio
Longer Days and Nights
Nanobots: Early Bots
Nanostart
Nixie Tubes
Noxys Waterfill
Rampant Arsenal
Robot Attrition
ShinyBobsGFX
Skip FIrst Hour
Space Expoloration
Space Exploration Graphics
Space Exploration HR Graphics
Space Exploration Postprocess
Squeak Through
SubTerra
Texugo TA Miners
Texugo Wind Generator
Todo List
Unlimited Productivity
WaiTex
Warehousing

Hope this helps narrow down the problem

4 years ago

Found one for sure causes crash:
- Amator Phasma's Nuclear 0.17.37

4 years ago

This mod causes the above error when installed:

Tarawind Beacons RELOAD

Mods that do not cause the error:

Air Filtering Advanced
Angel's Addons - Ore Silos
Angel's Addons - Pressure Tanks
Angel's Addons - Warehouses
Angel's Bio Processing [BETA]
Angel's Industries
Angel's Infinite Ores
Angel's Petro Chemical Processing
Angel's Refining
Angel's Smelting
Avoid Struggle with Integration Library (Alpha)
Bob's Adjustable Inserters
Bob's Assembling machines
Bob's Electronics
Bob's Enemies
Bob's Functions Library mod
Bob's Greenhouse mod
Bob's Logistics mod
Bob's Metals, Chemicals and Intermediates
Bob's Mining
Bob's Modules
Bob's Ores
Bob's Personal Equipment mod
Bob's Power
Bob's Tech
Bob's Vehicle Equipment
Bob's Warfare
Bottleneck
Bulk Rail Loader
Charcoal Burner
Even Distribution
Factorio Standard Library
Factorissimo2
Flow Control
Loader Redux
Long Reach
LTN - Logistic Train Network
Merging Chests
Nanobots: Early Bots
Napalm Artillery
Optera's Library
Rampant
Robot Replacer
Schall Alien Loot
Schall Pickup Tower
Squeak Through
Toggle Peaceful Mode
VehicleSnap
Water Well (pump free water from the ground)
What is it really used for?

4 years ago

I've confirmed that Simple Silicon causes this error.

4 years ago
(updated 4 years ago)

Oh, I think I see what's going on... actually, no, I thought I did, but this case didn't apply to Simple Silicon's recipes, so I'm still looking.

4 years ago
(updated 4 years ago)

Adding as new post so you get the notification.

Oh, I think I know. I think this might be erroring when someone makes an ingredient that looks like {name = "item-name", amount=3}, without including the type value. Then, calling for the amount by ingredient[2] will return nil, and so should calling the name by ingredient[1]. So, unfortunately, I think you need to account for that possibility. Maybe you can just use "ingred[1] or ingred.name" and "ingred[2] or ingred.amount".

4 years ago
(updated 4 years ago)

You hit the nail on the head, ElAdamo. Sorry that I haven't responded in a while, I got back home about 2 hours ago, and have just been ironing all those bugs out. Multiple, small, but semi-related issues.

Reverse factory v6.1.1 should fix most of the issues in this and the in the other bug thread. For sure, I've fixed compatibility with Krastorio, Space Exploration, Tarawind Beacons RELOAD, and Amator Phasma's Nuclear. Hopefully the rest of the incompatibilities should be fixed as well.

EDIT: Moving the thread; this one has gotten way chunky, and I would like to keep the old errors and the new errors separate. Sorry for the inconvenience, but thanks for contributing! I used every post here to help narrow down the issues in record time!

This thread has been locked.