https://forums.factorio.com/forum/vie ... 99#p116199
Download that mod pack.
This is a very strange issue that seems to be a specific interaction between my electronics/library mods, and yuoki-engines 1.7.
You'll also need to include some of my other mods to make sure bobelectronics doesn't trigger a crash when it calls "bobmods.lib.remove_technology_recipe("advanced-electronics-2", "electronic-processing-board")"
My library function call does the following:
Code: Select all
function bobmods.lib.replace_item_all_recipes (old, new)
for i, recipe in pairs(data.raw.recipe) do
bobmods.lib.replace_recipe_item (recipe.name, old, new)
end
end
function bobmods.lib.replace_recipe_item (recipe, old, new)
local doit = false
local amount = 0
for i, ingredient in pairs(data.raw.recipe[recipe].ingredients) do
if ingredient[1] == old then
doit = true
amount = ingredient[2] + amount
end
if ingredient.name == old then
doit = true
amount = ingredient.amount + amount
end
end
if doit then
bobmods.lib.remove_recipe_item (recipe, old)
bobmods.lib.add_recipe_item (recipe, {new, amount})
end
end
The issue apears to be that the recipe it is indexing via the recipe name obtained in the bobmods.lib.replace_item_all_recipes function doesn't exist.
I do not understand why, because it is accessing every recipe in order, it was obtained from recipe.name, then passed to the other function.
Also, Can we have some kind of lua function stack trace in the error reporting? you have no idea how long it took me to track down this issue with the limited information that it was line 4 of recipe functions in the library mod... I call that function "over nine thousand" times.
Something like...
Line 4 of library recipe functions
called by line 50(guessed) of library recipe functions
called by line 1 of electronics data-updates.