Helmod: Assistant for planning your factory

by Helfima

Assistant for planning your factory. Can calculate required ingredients, products, machines, modules, and beacons. Can also calculate power production / consumption.

Utilities
10 days ago
0.14 - 2.1
549K

b Ignoring "ignored_by_productivity" with multiple identical results

7 days ago
(updated 7 days ago)

Hi! First of all, thank you for the brilliant and amazing mod. I cant get through a single gaming session without it.

Now to the issue: it seems that Helmod is not calculating recipes correctly when they contain several identical results with the ‘ignored_by_productivity’ param. As I understand it, in this case it simply ignores it altogether, merely adding up all the identical results without taking ‘ignored_by_productivity’ into account for each individual result.

An example of such a recipe:

local kovarexScaled = table.deepcopy(data.raw["recipe"]["kovarex-enrichment-process"])
kovarexScaled.energy_required = 300
kovarexScaled.ingredients = {
{type = "item", name = "uranium-235", amount = 200, ignored_by_stats = 200},
{type = "item", name = "uranium-238", amount = 25, ignored_by_stats = 10}
}
kovarexScaled.results = {
{type = "item", name = "uranium-235", amount = 20, ignored_by_stats = 20, ignored_by_productivity = 20},
{type = "item", name = "uranium-235", amount = 20, ignored_by_stats = 20, ignored_by_productivity = 20},
{type = "item", name = "uranium-235", amount = 20, ignored_by_stats = 20, ignored_by_productivity = 20},
{type = "item", name = "uranium-235", amount = 20, ignored_by_stats = 20, ignored_by_productivity = 20},
{type = "item", name = "uranium-235", amount = 20, ignored_by_stats = 20, ignored_by_productivity = 20},
{type = "item", name = "uranium-235", amount = 25, ignored_by_stats = 20, ignored_by_productivity = 20},
{type = "item", name = "uranium-235", amount = 40, ignored_by_stats = 40, ignored_by_productivity = 40},
{type = "item", name = "uranium-235", amount = 40, ignored_by_stats = 40, ignored_by_productivity = 40},
{type = "item", name = "uranium-238", amount = 10, ignored_by_stats = 10, ignored_by_productivity = 10}
}

In fact, this is the base ‘kovarex-enrichment-process’ recipe, but scaled up by a factor of 5 whilst retaining all relevant parameters. In other words, all the metadata remains the same, but the energy_required, ingredients and results have been multiplied by the same factor. This keeps productivity the same but reduces the number of recipes executed per second (for UPS optimisation).

For recipes like this, Helmod's calculations ignoring the “ignored_by_productivity” parameter (exactly for multiple identical results), unless Ive made a mistake somewhere.

If thats the case, I had be very grateful for a fix – thank you!

Factorio version 2.1.22, Helmod 2.3.6

New response