[1.1.25] Modded accumulator sometimes not charging all of the way

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 451
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

[1.1.25] Modded accumulator sometimes not charging all of the way

Post by raiguard »

Code: Select all

local test = table.deepcopy(data.raw["accumulator"]["accumulator"])

test.name = "test-accumulator"
test.energy_source.input_flow_limit = "40MW"
test.energy_source.buffer_capacity = "200MJ"

data:extend{test}
Put this code into a mod and load a new save. Place some power generation (EEI works fine) then place the accumulator (make sure to disable "fill electric buffers" first). Let the accumulator charge. Nine times out of ten, it will switch to "normal" when done charging instead of "fully charged".

I've found that I need to do those two specific changes to the energy source in order for the bug to happen. If you remove one or the other, then it doesn't happen.

This is a minor issue and I can work around it, but I figured I'd report it anyway just in case.

Edit: perhaps this isn't just the status, but an actual electric charge issue. When I place a second accumulator, the first accumulator with the bugged status switches back to charging for a second or so, then finally switches to fully charged. So perhaps it's not actually fully charging it the first time around?


UPDATE: This is indeed an actual issue with the electric charge. When the status turns to normal instead of fully charged, it's because the entity only charged to 99.999999999% instead of 100%.
Attachments
2021-03-07 14_17_56-planetary-teleporter.lua - Krastorio2 - Visual Studio Code.png
2021-03-07 14_17_56-planetary-teleporter.lua - Krastorio2 - Visual Studio Code.png (3.41 KiB) Viewed 2728 times
2021-03-01 15_37_59-Factorio 1.1.25.png
2021-03-01 15_37_59-Factorio 1.1.25.png (48.84 KiB) Viewed 3026 times
Last edited by raiguard on Sun Mar 07, 2021 9:21 pm, edited 1 time in total.
Don't forget, you're here forever.

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 490
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: [1.1.25] Modded accumulator changing to "normal" status instead of "fully charged"

Post by Silari »

Raiguard wrote:
Mon Mar 01, 2021 10:39 pm
Edit: perhaps this isn't just the status, but an actual electric charge issue. When I place a second accumulator, the first accumulator with the bugged status switches back to charging for a second or so, then finally switches to fully charged. So perhaps it's not actually fully charging it the first time around?
A quick test printing the entity.energy in one showing 'fully charged' and one stuck in 'normal' status showed both with the same 200000000, so unless it's a weird float rounding issue it would seem it's just a status error.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 451
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [1.1.25] Modded accumulator changing to "normal" status instead of "fully charged"

Post by raiguard »

This is indeed an actual bug with the entity not being completely charged. The status is actually correct:
2021-03-07 14_17_56-planetary-teleporter.lua - Krastorio2 - Visual Studio Code.png
2021-03-07 14_17_56-planetary-teleporter.lua - Krastorio2 - Visual Studio Code.png (3.41 KiB) Viewed 2729 times
Don't forget, you're here forever.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [1.1.25] Modded accumulator sometimes not charging all of the way

Post by kovarex »

Thanks for the report, it is now fixed for the next release.

Post Reply

Return to “Resolved Problems and Bugs”