I have reproduced your problem.
My initial finding is that Krastorio 2 have modified the (vanilla) recipes into a weird way.
Here is what I observe in dump of definition of the steel plate recipe (with/without mods), by using serpent.block()
.
(I have merged some lines to make the text more compact, without changing contents.)
Note that my mod is NOT modifying the below original recipes.
Vanilla steel plate recipe
{
category = "smelting",
expensive = {
enabled = false,
energy_required = 32,
ingredients = {
{ "iron-plate", 10 }
},
result = "steel-plate"
},
name = "steel-plate",
normal = {
enabled = false,
energy_required = 16,
ingredients = {
{ "iron-plate", 5 }
},
result = "steel-plate"
},
type = "recipe"
}
Krastorio 2 steel plate recipe
{
category = "smelting",
energy_required = 16,
expensive = {
enabled = false,
energy_required = 16,
ingredients = {
{ "iron-plate", 10 },
{ "coke", 2 }
},
results = {
{ "steel-plate", 5 }
}
},
name = "steel-plate",
normal = {
enabled = false,
energy_required = 16,
ingredients = {
{ "iron-plate", 10 },
{ "coke", 2 }
},
results = 0
},
type = "recipe"
}
Can you identify a problem here?
The K2 normal recipe has the results = 0
line!
I am not sure how the game can still run without complaining this. (Maybe the game can auto-correct this?)
This does not cause a problem to the game run, but is causing a problem to my mod. For unknown reasons (my code already has error checking, but this time seems to be passed by K2 steel plate recipe...), this has led my code to erroneously multiply results of expensive
part for a second time, when it is dealing with normal
part.
So my initial summary is: this bug is caused by K2 side.
I am not yet sure what can be done on my side, as any other mods may also introduce such strange recipe definitions.