6.092 Error ModManager.cpp:1765: Failed to load mod "aai-loaders-stacking-filtering": __aai-loaders-stacking-filtering__/prototypes/stacking.lua:45: attempt to index local 'orig_tech' (a nil value)
stack traceback:
__aai-loaders-stacking-filtering__/prototypes/stacking.lua:45: in function 'generate_tech'
__aai-loaders-stacking-filtering__/prototypes/stacking.lua:71: in function 'make_stacking'
__aai-loaders-stacking-filtering__/data.lua:24: in main chunk
In make_stacking
when it crashes I notice that item.name
is aai-extreme-loader-stacking
and orig_item.name
is aai-extreme-loader
. aai-extreme-loader
is added by the AdvancedBeltsSA mod, which adds 3 more tiers of belts/loaders/etc above AAI Loaders and Vanilla belts. It does have a technology and that technology is named extreme-logistics
, which includes the extreme belt, extreme underground belt, extreme balancer, extreme loader, and extreme lane balancer. It does not have a technology for 'just' the loader as it is part of the Logistics 5 group, just as all loaders are grouped with their relevant tier group (Logistics 1 include the normal loader, Logistics 2 includes the fast loader, etc..., though these vanilla ones are fixed up in the post data stage by another mod). It doesn't seem reasonable to expect a technology to be the same name as an item that the technology unlocks as a technology can unlock many items, so which one should it be named for if that were the case? So this seems like a bug on this side.
A more correct operation would probably be to iterate the data.raw["loader-1x1"]
table once to generate your matching items, then iterate the data.raw.technology
table and any entry with an unlock-recipe
effect that matches that items name (it is expected to assume the 'main' recipe of an item to be the same name as that item, though not all mods hold to that, all of these specific ones do though) and add your recipes to that same technology I would think?