[2.0.69] Reactor entity with electric energy_source always working

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
powdergamefreak
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Nov 20, 2024 2:43 am
Contact:

[2.0.69] Reactor entity with electric energy_source always working

Post by powdergamefreak »

I am trying to create a mod that adds a reactor akin to the heating-tower, except it consumes energy instead of fuel.

I have textures in working_light_animations that always display, no matter the state of the reactor.

I expected that, when the reactor had no power, it would register as not working, and would not display the working_light_animations.

This always happens, without exception. There is no way for me to get this reactor to stop displaying its working_light_animations, even if i give it power and then let its power deplete.

I have attached the entity.lua of my mod to help with reproducing the issue.
Attachments
entity.lua
(3.2 KiB) Downloaded 19 times
factorio-current.log
(7.67 KiB) Downloaded 16 times
eugenekay
Filter Inserter
Filter Inserter
Posts: 872
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.69] Reactor entity with electric energy_source always working

Post by eugenekay »

You have set promethium_heater_entity.scale_energy_usage = false.

Other mods which provide an Electric Heating Tower set this property to true, which cause it to
stop consuming fuel/energy when the temperature has reached the maximum.
Good Luck!
powdergamefreak
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Nov 20, 2024 2:43 am
Contact:

Re: [2.0.69] Reactor entity with electric energy_source always working

Post by powdergamefreak »

eugenekay wrote: Sun Oct 19, 2025 12:31 am You have set promethium_heater_entity.scale_energy_usage = false.

Other mods which provide an Electric Heating Tower set this property to true, which cause it to
stop consuming fuel/energy when the temperature has reached the maximum.
Good Luck!
This problem doesnt have anything to do with the reactor stopping when its temperature has reached the maximum. I have just set that property to true, and it is still displaying working_light_animations when it has no power. This problem seems to be that reactors with electric energy sources dont know when they are not running, and so simply always display working_light_animations.
eugenekay
Filter Inserter
Filter Inserter
Posts: 872
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.69] Reactor entity with electric energy_source always working

Post by eugenekay »

powdergamefreak wrote: Sun Oct 19, 2025 1:04 am This problem doesnt have anything to do with the reactor stopping when its temperature has reached the maximum. I have just set that property to true, and it is still displaying working_light_animations when it has no power. This problem seems to be that reactors with electric energy sources dont know when they are not running, and so simply always display working_light_animations.
10-18-2025, 22-03-16.png
10-18-2025, 22-03-16.png (402.09 KiB) Viewed 618 times
You are correct - I mis-remembered the behaviour from the Electric Boiler portion of the linked Mod (which is what I use, and does work correctly since it uses a Boiler prototype, not a Reactor); and did not test the Electric Heater portion against the latest Stable/Experimental Version. Mea culpa! Interestingly: the Vanilla Heating Tower and Nuclear Reactor also start with the animation graphic active despite having no Fuel; it takes a few Ticks to fade out to the "idle" state.
10-18-2025, 22-06-49.png
10-18-2025, 22-06-49.png (425.14 KiB) Viewed 618 times
I would still expect that with scale_energy_usage = false the Electric Heating Tower should show the Animation while power is provided anyway - since that is the same behaviour as the Vanilla Reactor / Heating Tower, which will continuously burn a Fuel Cell / Burner Fuel if it is provided. Setting this value to true (and thereby, stopping them from consuming fuel despite being at max temperature) is the only case where it makes sense that the Animation does not display.
powdergamefreak
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Nov 20, 2024 2:43 am
Contact:

Re: [2.0.69] Reactor entity with electric energy_source always working

Post by powdergamefreak »

eugenekay wrote: Sun Oct 19, 2025 2:08 am
powdergamefreak wrote: Sun Oct 19, 2025 1:04 am This problem doesnt have anything to do with the reactor stopping when its temperature has reached the maximum. I have just set that property to true, and it is still displaying working_light_animations when it has no power. This problem seems to be that reactors with electric energy sources dont know when they are not running, and so simply always display working_light_animations.
10-18-2025, 22-03-16.png
You are correct - I mis-remembered the behaviour from the Electric Boiler portion of the linked Mod (which is what I use, and does work correctly since it uses a Boiler prototype, not a Reactor); and did not test the Electric Heater portion against the latest Stable/Experimental Version. Mea culpa! Interestingly: the Vanilla Heating Tower and Nuclear Reactor also start with the animation graphic active despite having no Fuel; it takes a few Ticks to fade out to the "idle" state.

10-18-2025, 22-06-49.png
I would still expect that with scale_energy_usage = false the Electric Heating Tower should show the Animation while power is provided anyway - since that is the same behaviour as the Vanilla Reactor / Heating Tower, which will continuously burn a Fuel Cell / Burner Fuel if it is provided. Setting this value to true (and thereby, stopping them from consuming fuel despite being at max temperature) is the only case where it makes sense that the Animation does not display.
I also noticed this behavior with the heating-tower showing its animation graphic for the first few ticks while in editor mode, something ive never noticed while playing a normal game, because it happens so fast. Its cool to see these little quirks while messing with mods :D

Ill check out the mod you are mentioning, since maybe its a workaround that I could use for now. Although i see that the boilerprototype doesnt seem to have a heat_radius, which is part of what i was trying to rely on.

Thanks for the help, friend!
powdergamefreak
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Nov 20, 2024 2:43 am
Contact:

Re: [2.0.69] Reactor entity with electric energy_source always working

Post by powdergamefreak »

As recommended by a helpful user on the factorio discord, I have created something that should hopefully streamline verification of the bug.

Simply place this code into a data.lua file, open the game, place down a heating-tower, and you will see that it displays its burning graphics (working_light_animations) even when it is not powered.

Code: Select all

/c
data.raw["reactor"]["heating-tower"].energy_source = {
    type = "electric",
    buffer_capacity = "1000MW",
    usage_priority = "secondary-input",
    input_flow_limit = "1000MW",
    output_flow_limit = "1000MW",
}
Here is the info.json I paired with this data.lua, if it helps

{
"name": "energyBug",
"version": "0.1.0",
"title": "Energy Bug",
"author": "theFALGSCmustgrow",
"factorio_version": "2.0",
"dependencies": ["base >= 2.0", "space-age >= 2.0"],
"description": "testing a bug"
}
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4303
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.69] Reactor entity with electric energy_source always working

Post by boskid »

I am considering this bug report to be actually a modding interface request, because it is not a "thing does not work", it is "thing was never defined how it should work and now the scope is being extended".

Reactor's working_light_animation's tint is based on a value of light intensity from the energy source, which so far is only well defined for burner and for fluid energy source. Electric energy source does not provide a "light intensity" and as such it defaults to a constant value of "1". I do not know if in this case it should be based on amount of energy in the electric buffer, or if it should be based on the amount of energy consumed last tick, or if there should be some type of fade-in when starting to provide energy and then fade out when not asked for energy, which means there are clearly a lot of decision making to be done. For sure what i do not want is to have electric energy source to become updatable just so the light intensity would be updated from tick to tick which burner and fluid source have to do, because of how many electric energy sources are in most save files and the performance impact of it.

Moving to modding interface request.
Post Reply

Return to “Modding interface requests”