[2.0.52] Roboport energy buffer never 100% full depending on entity placement order

Things that has been reported already before.
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 460
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

[2.0.52] Roboport energy buffer never 100% full depending on entity placement order

Post by Stringweasel »

What
The energy of a modded roboport is never 100% full when connected to multiple networks, where the closest network is unpowered. It's always off by the energy drain per tick.

We ran into this with AAI Signal Tranmission where the transceivers are roboports, and we periodically check if the buffer is full and only allow circuit connections if it is. This worked fine in 1.1 but the behaviour seem to have changed in 2.0. If you are part of the Earendel Discord you can find it here.
Reproduction
1. Change a regular roboport like this:

Code: Select all

local robo = data.raw["roboport"]["roboport"]
robo.energy_source =
{
    type = "electric",
    usage_priority = "secondary-input",
    input_flow_limit = "20MW",
    buffer_capacity = "5.5MJ"
}
robo.recharge_minimum = "5MJ"
robo.energy_usage = "10MW"
robo.charging_energy = "5MW"
2. Build this setup, placing the roboport last. Note how the left network is powered, and the right isn't.
05-27-2025, 11-50-58.png
05-27-2025, 11-50-58.png (1000.29 KiB) Viewed 220 times
3. If you check the energy with `/c game.print(game.player.selected.energy)` you see
05-27-2025, 11-55-00.png
05-27-2025, 11-55-00.png (61.24 KiB) Viewed 220 times

4. And now if you pickup the medium pole and place it back down. Now the energy will read 5500000 as expected.
Probably not a bug?
Expecting this not to be a bug, and just an engine update order quirk. But made the report because it is odd that it depends on whether the closest power pole is powered or not.
Alt-F4 Author | Factorio Modder
Probably known for: (Configurable) Valves | Better Victory Screen | Space Spidertron | Fluidic Power
Official Contributor to Space Exploration
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3941
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.52] Roboport energy buffer never 100% full depending on entity placement order

Post by boskid »

I am considering this a duplicate of 105074.
Post Reply

Return to “Duplicates”