Infinite battery glitch

Michal Vodicka shared this bug 4 months ago
Reported

Setup

  • I have some cluster (A) of batteries set on auto.
  • Second cluster (B) of batteries set on discharge, but offline (they do nothing).
  • Event control (AND gate active):
    IF stored power in A drops below 90% => B turn on, A set on recharge
    ELSE => B turn off, A set on auto
  • some refineries eating power
  • no other source of energy (no wind turbines, solars, reactors or docked grids are present).

What I would expect

B cluster should be recharging A cluster. B should be losing energy. A should keep close to 90% as long as B has energy.

What do I observe (NA1)

When batteries from B cluster activates, it reads "output energy", but doesn't lose any energy. At the same time, batteries from A claster reads "input energy" and they do gain energy.

Result: B cluster never loses any energy. A cluster keeps recharging.

I have been observing this for multiple hours now and also after the restart. Sometime energy values changes, but it is rare.

Clues

Not sure what exactly causes this issue. I think it requires to be setup in some sweat pot. My long shot would be "rounding error" of dedicated server.

BP: https://steamcommunity.com/sharedfiles/filedetails/?id=3265161347

Replies (3)

photo
1

I have additional info about this glitch, here is the test grid:


https://steamcommunity.com/sharedfiles/filedetails/?id=3267051857

Precise steps of replication

  • Build a grid, start with event control, then place Battery 1, Battery 2, Battery 3
  • You need to discharge Battery 1 fully (0 stored power), then put Battery 1 and Battery 2 in the same group, lets call it Discharge Group. Set this group to discharge and also set this group off
  • Lets call Battery 3 your Main Battery now
  • Now setup the event control in this way:
    IF stored power IS LESS THEN x%
    Selected blocks -> Main Battery
    THEN
    Actions 1:
    Discharge Group -> switch on
    Main Battery -> set recharge
    Actions 2:
    Discharge Group -> switch off
    Main Battery -> set auto
  • Set the Event control % of stored power close to current stored power of your main battery. Lets say main battery has 30% now, so set it to 29,5%.
  • Now add some energy spenders to this grid. I use o2h2 generators. I recommend to start with few (1) and keep adding more

Observation

Event control can be fired quite often (every 2, 3 or more seconds). You should see that Battery 2 will constantly be switching on and off. And while on, it will read "current output 12MW", but it will never lose any stored power. In the meantime Main Battery will also keep changing it state, but it will be recharging during recharge state.

You can roughly have 4,5MW output on Main Battery, which is 9 o2h2 generators. If you will add more generators, sometimes Battery 2 will lose some energy. I belive this is a "rounding issue", where if output is larger than 4,5MW, then it might take "more ticks" to recharge the battery and then it will actually discharge Battery 2. But if the window is small enough, it doesnt discharge anything.

It is likely this can be played with by adding one of the battery type (fully discharged, discharger or main battery).

photo
1

PS: I have replicated this bug in single player and NA1 server

photo
1

Hello, Engineer.


We've managed to reproduce the issue on our side with the first grid you've attached. We've added it to our internal system and passed it for evaluation. We will update this thread when we know more.


Kind Regards

Keen Software House

QA Department

Leave a Comment
 
Attach a file