Electric Priority


Twerk electric priority. Tired of your mining drill slowing down making you running out of coal in a spiral of death ?

Tweaks
8 days ago
1.1 - 2.0
102
Power
Owner:
Stargateur
Source:
https://github.com/Stargateur/Electri...
Homepage:
https://mods.factorio.com/mod/Electri...
License:
zlib
Created:
3 months ago
Latest Version:
0.5.0 (8 days ago)
Factorio version:
1.1 - 2.0
Downloaded by:
102 users

This mod twerk electric priority of some base entities. The purpose is to avoid full power shortage by setting priority on some critical machine that need to work to keep the core of the factory working aka the power production itself. This is safe to install or uninstall at anytime and have no performance impact on the game.

You can now fully customize it using a list of entity group split by comma. The list of factorio entity can be found here that list doesn't include any mod.

Twerks (Default)

Primary Input

  • Mining Drill (This include Pump-jack)
  • Inserter (all of them)
  • Combinator and Speaker
  • Loader

Secondary Input

  • Electric Turret (laser turret)

Tertiary Input

  • No change

Primary Output

  • No change

Secondary Output

  • No change

Tertiary Output

  • Generator

Primary Input/Output

  • No change

Secondary Input/Output

  • Accumulator

Tertiary Input/Output

  • No change

Why

When there is electric shortage we want to run what is needed to fix this electric shortage. It's opinionated toward my gameplay, but for me when I run out of electricity it's because my mining drill are working too slow in a spiral of less electricity so less coal so less electricity so less coal... To fix this, I put all mining drill at the highest priority for electricity consumption (this work great). Then, I need my inserter to work so I also put them to the top. Just in case you are using loader, I also add them, then I add combinator and speaker cause they consume low power and could be critical. I don't need my roboport to drain ALL my electricity production when I struggle to heat my coffee !

Also, one thing I hate is laser turret be the highest priority by default, this is BAD, I need to keep my factory running to get more coal ! not run my laser tower for 5 more seconds. Specially they have very high constant drain power ! I put them into the secondary priority.

Bonus, now generator will not try to recharge accumulator, so you can keep your generator for emergency.

There is some difficulty to put entity to tertiary priority, indeed, accumulator doesn't give electricity to entities with tertiary priority. I wish I could have put roboport, laser turret, radar, lab. But if your setup doesn't have accumulator you could try to put them to tertiary. Anyway, this mod is more about your own setting and twerking, I let you play with game rule about electricity priority.

Considering

  • A way to add specific entity and not a whole group

Technical

  • This mod use data-updates.lua so it should override additional entity from other mods.
  • Other mod can override my override using data-final-fixes.lua file if need.
  • Using tertiary make all entities in tertiary work as accumulator, so I set input and output flow limit to "0W" when you use priority for input or output. This mean if you put your roboport in the tertiary output priority they should not act like accumulator.
  • There is a small problem with accumulator they don't listen to priority at all. They have hard coded logic. This mean even put accumulator into secondary doesn't change anything. I can't really do anything about it. The downside is that generator (turbine and stuff) will compete with accumulator to provide energy when other source of energy doesn't provide enough. That still better than before where generator was running at 100%. Also the more you put accumulator the less the generator will be used (since it's % of entity, 2000 accumulator is way more than 100 generators). All in all I feel the trade off is good.