Solar Productivity

by RedRafe

Increase the efficiency of Solar panels and Accumulators by progressing through technology!

Content
6 days ago
1.1 - 2.0
18.7K
Power

g [Closed] Change method of applying productivity

1 year, 5 months ago

It seems that the way the mod implements the increased productivity is to loop through and replace every single accumulator and solar panel in the game and replace it with a new more efficient version. This causes a huge lag-spike on research completion, it adds 50 * number of accumulator and solar panel prototypes to the game (which with other mods installed can be quite a lot), and it makes it impossible to disable the mod later because it removes every solar panel and accumulator entirely.

1 year, 5 months ago

I'm open to suggestions on how to do it better

1 year, 5 months ago

There is no way to change the entities' properties at runtime. Each prototype is build durind data stage, while loading factorio. The reseach is capped at level 50 to limit the impact of prototype generation, although even while playing heavili modded factorio, if there are 10 types of solar panel, they generate 50x10=500 prototypes, when the limit is over 65.000, so still less than 1% of the game. In addition, solar panels don't have moving animations, so the RAM usage is really irrelevant.

There might be lag spikes when replacing the entities, true, but that wont happen more than once per technology, which is a really rare event overall.

This thread has been locked.