True Free Energy deprecated

by Tename

Boosts UPS by removing energy consumption from all entities. Can also remove burnable fuel / liquid fuel / heat consumption as well. In addition, it can also make robots and trains not consume any power, removing the need for recharging / refueling.

Tweaks
1 year, 24 days ago
1.1
364
Power Cheats

g Adding SE compatibility

1 year, 2 months ago

Hi, want to use this mod in my Space Exploration gamepay for saving UPS. However, after adding this to my SE save, SE will throw the error, "attempt to index field 'electric energy source prototype'(a nil value) " directly in the background simulation.

1 year, 1 month ago

If I had to guess, one of SE entities uses energy in a weird way.

I'm not familiar with SE at all and it's a huge mod to check everything. For now I'll just mark it as incompatible, maybe in the future I'll have time to fix it. Or maybe someone else can find which entity causes problems, this would make it easier to update it.

1 year, 28 days ago
(updated 1 year, 25 days ago)

Hi, it seems that shield projectors are used in events. In those events, the code assumes that an electric energy source is present.

I excluded everything from the energy source removal that contains "shield-projector" in the name. It worked for the background simulation.
Edit: the meteor defense buildings as well as the signal transmission ones also need to be excluded.

Fix that works for me for file data-final-fixes.lua

function contains(s, word) return s:find(word, 1, true) ~= nil end

for _, type in pairs({ "assembling-machine", "beacon", "resource", "electric-turret", "inserter", "lab", "lamp", "loader", "loader-1x1", "mining-drill", "pump", "radar", "roboport", "rocket-silo", "boiler", "furnace", "programmable-speaker", "arithmetic-combinator", "decider-combinator", "construction-robot", "logistic-robot", "locomotive" }) do
  for k, v in pairs(data.raw[type]) do
    if contains(k, "shield-projector") or contains(k, "meteor") or contains(k, "aai-signal-") then

    else 
        if settings.startup["tfe-remove-electricity-cost"].value == true and v.energy_source ~= nil then
1 year, 24 days ago

Thanks for finding them, it gave me motivation to download SE to fix it.

Sadly, while simply excluding the problem entities will make the game load, it won't make them work w/o energy, so that wasn't really a solution.

I've pushed a tentative fix, it works with AAI signal transceivers and shield projectors and maybe works with meteor defense cannons (I didn't actually tested it during meteor showers, so it might still cause some problems). The fix is rather stupid, but hey, if it works...

The only problem is that all these buildings will permanently flash with "not connected to a power network" alert despite working perfectly fine. Unless of course, they are connected to any power producer.

1 year, 23 days ago
(updated 1 year, 23 days ago)

You're right my crude fix just allowed me to play, not to get rid of the electric energy requirement.

After some years of playing I prefer to reduce the solar park manager part of Factorio a little - and your mod really helps here. In large mod setup, I often run into too high UPS load from heat and electric network simulation. And building very large solar parks over and over gets repetitive. Here your mod really helps, thanks for your work :-)

New response