Fixed Fuel calculation badly bugged [00938]

Discussion in 'Fixed (Read Only)' started by Vollinger, Jun 2, 2023.

  1. Vollinger

    Vollinger Lieutenant

    Joined:
    Jan 16, 2022
    Messages:
    39
    Likes Received:
    71
    Build: 1.9.14. 4139
    Mode: survival
    Mode: MP

    SERVER NAME: any
    SEED-ID: any

    If applicable:
    MODIFIED PLAYFIELDS: vanilla, RE, probably others too.

    Reproducibility: Always
    Severity: Major

    Type: Fuel calculation

    Summary: Fuel consumption calculation bugged, empties your fuel tanks all the time!

    Description: Fuel calculations after log-in or playfield-loads are broken so that powered off vessels lose a lot of fuel once they're powered on. Seemingly the consumption calculation removes fuel as if they have been powered on the whole time (with the power consumption at the moment of the powering on).
    This also has severe effects in modifications with devices that consume negative power (Reforged Eden solar panels and RTGs).
    In the end: as a player you now have to remove all the fuel from all your ships before you log off or leave a playfield for hours, since you'll probably lose all or most of the fuel when you turn your ships back on. This is seriously annoying and tiring, admins with a lot of players can't do anything about it since this would mean an overwhelming amount of constant work.
    There are also reports of SVs losing fuel like that, but i couldn't reproduce them in my tests yet.

    Steps to Reproduce:
    1) Build a simple CV1 with a generator, fuel tanks and a teleporter (or any other device that consumes power).
    2) Create a copy of that CV1 next to it (as CV2), fill up both CVs. power off CV1
    3) Log off for a few hours
    4) Log on again, power on CV1 and see how the fuel drops to about the same level as CV2 (as if it was powered all the time). (you can clearly see that in the video below, which was recorded on a local vanilla test server)

    Edit: Please keep the fuel calculation so that devices with negative power keep being supported, since some modifications (RE) use such devices. Most big and popular builds for RE make heavy use of these devices and its crucial that the calculation works properly :)

    Screenshots, Crash Logs, any other Relevant Information or Download links:

    Video of Check2 from the test below: https://imgur.com/a/Pi76eyn

    Here are the exact information about all my tests and steps of reproduction on a local vanilla test server (CV1&2 and SV1&2 are just simple structures with gens and fuel tanks and some power consuming device, see video)
    Code:
    #############################################################################
     EGS1.9.14b4139 VANILLA
    #############################################################################
    
    CV1: 25 kPU capacity, 6 kPU power usage, 96k fuel capacity, power left: 15:54 hours when full., powered off
    CV2: 25 kPU capacity, 6 kPU power usage, 96k fuel capacity, power left: 15:54 hours when full., powered on
    
    SV1: 3 kPU capacity, 381 PU power usage, 6k fuel capacity, power left: 15:44 when full., powered off
    SV2: 3 kPU capacity, 381 PU power usage, 6k fuel capacity, power left: 15:44 when full., powered on
    
    Expected result:
    CV1: power on, nothing happens.
    CV2: fuel reduced according to check time, power left accordingly.
    
    SV1: power on, nothing happens.
    SV2: fuel reduced according to check time, power left accordingly.
    *refilled all tanks at 22:30 gmt+2
    
    
    Check 1 at:  0:00 UTC+2 (1,5h passed)
    **BUG** CV1: power on, a few seconds later fuel dropped to ~87k 91%, power left 14:31
    CV2: fuel reduced according to check time (~87k, 91%), power left accordingly (14:28)
    
    SV1: power on, nothing happens, fuel still at 100%.
    SV2: fuel reduced according to check time (5.4k, 90%), power left accordingly (14:12).
    * refilled all tanks 01.06.23 2:15 UTC+2 (server was down)
    
    
    Check 2 at:  16:45 UTC+2 (14,5h passed) (with video!)
    **BUG** CV1: power on, a few seconds later fuel dropped to ~9k 10%, power left 1:33
    CV2: fuel reduced according to check time (~9k, 10%), power left accordingly (1:31)
    
    SV1: power on, nothing happens, fuel still at 100%.
    SV2: fuel reduced according to check time (487, 8%), power left accordingly (1:16).
    
    And here the complete info about the tests on a local reforged eden test server.
    Code:
    #############################################################################
     EGS1.9.14b4139 RE1.9b48
    #############################################################################
    
    CV1: 15 kW capacity, 2 kW power usage, 48k fuel capacity, power left: unlimited, powered off
    CV2: 15 kW capacity, 2 kW power usage, 48k fuel capacity, power left: 24 hours when full, powered on
    CV3: 15 kW capacity, -1,59 kW power usage (full solar), 48k fuel capacity, power left: unlimited, powered on
    CV4: 15 kW capacity, -38 W power usage (solar), 48k fuel capacity, power left: unlimited, powered on
    CV5: 15 kW capacity, 11 W power usage (RTG), 48k fuel capacity, power left: 4300 hours when full, powered on
    
    SV1: 2.25 KW capacity, 246 W power usage, 6k fuel capacity, power left: 24 hours when full. powered off
    SV2: 2.25 KW capacity, 246 W power usage, 6k fuel capacity, power left: 24 hours when full. powered on
    
    -> turned on everything at: 0100 UTC+2
    expectation:
    CV1: no change
    CV2: power left according to new log time
    CV3: no change in fuel
    CV4: no change in fuel
    CV5: power left according to new log time.
    
    SV1: no change
    SV2: power left according to new log time.
    
    
    Check 1 at: 0300 UTC+2 (2 hours passed)
    CV1: no change in fuel after turn on.
    CV2: power left: 22hours, fuel left: ~43k, adding 2 teleporter changed nothing.
    **BUG**: CV3: no change in fuel. Once i added 2 teleporter (powerusave>0), it dropped instantly to ~43k.
    **BUG**: CV4: no change in fuel. Once i added 2 teleporter (powerusage>>0), it dropped instantly to ~40k.
    CV5: power left: 4354 hours, adding 2 teleporter changed nothing.
    
    SV1: no change
    SV2: power left: 22 hours.
    * refilled all tanks
    
    Check 2 at: 1737 UTC+2 (~14 hours passed)
    **BUG**: CV1: no change in fuel. After turn on, fuel dropped to 40% (19k), now only 9 hours left.
    CV2: power left: 9hours, fuel left: ~19k, adding 2 teleporter changed nothing.
    **BUG**: CV3: no change in fuel. Once i added 1 teleporter (powerusave=411w), it dropped instantly to ~42k.
    **BUG**: CV4: no change in fuel. Once i added 1 teleporter (powerusage=1,96kW), it dropped instantly to ~19k.
    CV5: power left: 4338 hours, adding 2 teleporter changed nothing.
    
    SV1: no change
    SV2: power left: ~9 hours.
    * refilled all tanks
    
    Check 3 at: 2150 UTC+2 (~27 hours passed)
    CV1: no change in fuel. After turn on, nothing happened :/ (opposed to bug that happened in the last check)
    CV2: was still at 100% for a few seconds, then fuel dropped to 0 and structure powered off.
    **BUG**: CV3: no change in fuel. Once i added 1 teleporter (powerusave=411w), it dropped instantly to ~36k.
    **BUG**: CV4: no change in fuel. Once i added 1 teleporter (powerusage=1,96kW), it dropped instantly to 0, structure powered off.
    CV5: power left: 4324 hours, adding 2 teleporter changed nothing.
    
    SV1: no change
    SV2: was still at 100% for a few seconds, then fuel dropped to 0 and structure powered off.
    * refilled all tanks
    
    Check 4 at: 1640 UTC+2 (~18 hours passed)
    **BUG**: CV1: no change in fuel. After turn on, fuel dropped to 20% (10k), now only 5 hours left.
    CV2: power left: 5hours, fuel left: ~10k
    **BUG**: CV3: no change in fuel. Once i added 1 teleporter (powerusave=411w), it dropped instantly to ~40k.
    **BUG**: CV4: no change in fuel. Once i added 1 teleporter (powerusage=1,96kW), it dropped instantly to ~11k
    CV5: power left: 4331 hours
    
    SV1: no change, powered on, nothing happened.
    SV2: fuel at 23%
    
     
    #1
    Last edited: Jul 11, 2023
  2. Stan2112

    Stan2112 Lieutenant

    Joined:
    Sep 21, 2020
    Messages:
    18
    Likes Received:
    29
    TY so much for taking the time to quantify this! This is a seriously annoying bug that absolutely affects the enjoyment of a play session. There have been cases where the fuel doesn't disappear right away, but as much as 20 minutes later, conveniently right when you're in the middle of something ... important.
     
    #2
  3. -AKEVA-BANSHEE-

    -AKEVA-BANSHEE- Commander

    Joined:
    Oct 9, 2020
    Messages:
    239
    Likes Received:
    202
    Thank you for doing this report!
     
    #3
    Myrmidon and kronologic like this.
  4. atak

    atak Ensign

    Joined:
    Feb 12, 2022
    Messages:
    1
    Likes Received:
    2
    This is fantastic! Thank you for this Vollinger, I've lost so many fuel cells from this over the last few week, I thought I was just going crazy when my ship would suddenly run out of power and leave me a drift...
     
    #4
    Myrmidon and kronologic like this.
  5. lyken4

    lyken4 Ensign

    Joined:
    Jun 2, 2023
    Messages:
    1
    Likes Received:
    2
    Ty for this report! I had this several times
     
    #5
    Myrmidon and kronologic like this.
  6. ChiefSgtBradley

    ChiefSgtBradley Ensign

    Joined:
    Dec 13, 2021
    Messages:
    28
    Likes Received:
    12
    Thank you for reporting this! Happened to me 3 times now.
     
    #6
    Myrmidon and kronologic like this.
  7. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,282
    Likes Received:
    11,939
    Happened to my brother on his private RE server he just started a couple days ago.
    Thank you for figuring this out and reporting it!
     
    #7
    A Mueller, Myrmidon and kronologic like this.
  8. Insopor

    Insopor Commander

    Joined:
    Oct 17, 2021
    Messages:
    147
    Likes Received:
    124
    I'll do some testing of my own. But I'm pretty confident it now calculates the fuel consumption based on how it is at the time of login and then averages that over the entire offline time.

    Only it's not exactly at login, it's a few seconds after.
    - I had a ship which was full of fuel, enough to last like 40 hours. I powered off the ship (On official servers) and logged out for a couple hours.
    - I logged back in and the ship was still off, full of fuel.
    - I quickly turned it on and went for the teleporter (teleporter is on a motion sensor and only comes on when you stand on it.)
    - Once I activated the teleporter, the ship lost all fuel. (Because a teleporter being on for that many hours would indeed drain the whole tank)

    Either way, my ship which was off while I was offline and remained off at login immediately drained all fuel once I logged in and turned on the teleporter. (which was about 10 - 15 seconds after login.)

    So yeah, it's very very messed up.
     
    #8
  9. Pantera

    Pantera Administrator Staff Member

    • Developer
    • Moderator
    Joined:
    Aug 15, 2016
    Messages:
    3,238
    Likes Received:
    5,676
    @Vollinger thanks for you detailed report.
    We will approach this in the very near future.
     
    #9
  10. Insopor

    Insopor Commander

    Joined:
    Oct 17, 2021
    Messages:
    147
    Likes Received:
    124
    Do add to this, reinforcing what I said above.
    Here's a video. If it's a double of what OP linked, sorry, imgur link won't open for me.

    From Official NA server, just about two hours ago.

    Basically if you teleport to a base that's been left alone for several hours, you only have three options:
    1. all fuel drained because teleporter eats 12kPU when powered and no one builds bases with enough fuel to run that for a whole day.
    2. all fuel drained because the shield warm-up uses 50kPU and definitely no one builds bases with enough fuel to run that for even a few hours.
    3. No fuel drained because you turn base off upon loading and it calculates no fuel used the whole time.

    For reference, my bases are set up as follows:
    Teleporter has motion sensor which activates the teleporter only when you stand on it, and simultaneously deactivates shield. So when you step off teleporter or TP out, the shield will come back online once you're gone.

    So for my bases (which are placed in PvP) my only options are to either throw away fuel every time I teleport in, or switch the base off and use no fuel at all (which is exploitative if you ask me). My only other option is to never use teleporters at all, and only fly to the bases via ship.

    Solar does not calculate while offline either, it only calculates how much solar is present upon playfield load and spreads that over the entire time since last load. (see near end of video when my base suddenly gains massive amounts of battery)

    If there are any questions regarding my video, hit me up. I can share blueprints for the first two bases referenced (as those are soon to be going on the workshop anyway). Hope this helps.

    This can also be replicated on vessels or structures which were offline the entire time but only switched on right at playfield load.
     
    #10
  11. Ionic

    Ionic Ensign

    Joined:
    Jun 27, 2023
    Messages:
    1
    Likes Received:
    2
    I was able to reproduce this bug for SVs as well. Tested on the Vanilla offical server. Test SVs had basic components and 20 fridges for a high idle power use. Test results as follows:

    Code:
    SV1: 126 PU power usage, 300/300 fuel, powered off
    SV2: 126 PU power usage, 300/300 fuel, powered on
    
    Expected result:
    SV1: power on, nothing happens.
    SV2: fuel reduced according to time passed.
    
    Tests started 25/06/2023 ended 26/06/2023, logoff/logon times approximate and are UTC+1. SV1 was usually left running for a few minutes after power on to allow time for the problem to occur, hence small fuel use shown in some test results.
    
    Test 1:
    Logoff 15:12
    Logon 16:30
    SV1: power on, 294/300 fuel.
    SV2: 144/300 fuel.
    
    Refueled SV2, now 290/300 fuel.
    
    Test 2:
    Logoff 16:33
    Logon 17:35
    SV1: power on, 280/300 fuel.
    SV2: 154/300 fuel.
    
    Refueled SV1, now 299/300 fuel.
    Refueled SV2, now 292/300 fuel.
    
    Test 3:
    Logoff 17:47
    Logon 20:16
    SV1: power on, 148/300 fuel. **BUG**
    SV2: 0/300 fuel.
    
    Took 3 or so seconds after power on then SV1's fuel dropped.
    
    Refueled SV1, now 291/300 fuel.
    Refueled SV2, now 300/300 fuel.
    
    Test 4:
    Logoff 20:22
    Logon 12:38
    SV1: power on, 290/300 fuel.
    SV2: 0/300 fuel.
    
    Refueled SV2, now 300/300 fuel.
    
    Test 5:
    Logoff 12:43
    Logon 20:00
    SV1: power on, 259/300 fuel. **BUG**
    SV2: 0/300 fuel.
    
     
    #11
    ChiefSgtBradley and Vollinger like this.
  12. Insopor

    Insopor Commander

    Joined:
    Oct 17, 2021
    Messages:
    147
    Likes Received:
    124
    If you do any more tests, I'd advise you to keep track of how long after login or how long after loading the playfield you power on the first SV.

    My findings are that the calculations are taken shortly after load, so the bug may or may not occur if you delay a significant time after load before you power on.
     
    #12
  13. Jorgodan

    Jorgodan Commander

    Joined:
    Jul 29, 2020
    Messages:
    141
    Likes Received:
    101
    This is really a very bad massive bug. Because when you switch on via the P menu, you still see a full tank and only after switching to flight mode the tank is emptied. I had logged out in the CV in the orbital area and only the power and the engines were switched off and the oxygen and shields were left on so that they are immediately available after power on. After switching on, the tank was still full and I was attacked. When I wanted to flee, everything suddenly ran out because the fuel was gone. no oxygen, no engines, no shields. My ship was completely destroyed.
    This needs to be fixed really quickly

    But it didn't always happen all the time. I haven't been able to verify it conclusively, but I have a feeling that if you first leave the pilot's seat (and be somewhere else in the CV) and then turn off power and log out, it doesn't happen.
     
    #13
    Insopor likes this.
  14. Insopor

    Insopor Commander

    Joined:
    Oct 17, 2021
    Messages:
    147
    Likes Received:
    124
    Until this is fixed, try waiting about 30 seconds when you enter a playfield or log on and go to anything left alone for more than an hour. The calculation is made when the playfield loads, but it lags up to about 30 seconds sometimes. If nothing changes in that time, it won't mess up the calculations (mostly, unrelated bugs not covered).

    That's what's been working for me.
     
    #14
    A Mueller and Slam Jones like this.
  15. ChiefSgtBradley

    ChiefSgtBradley Ensign

    Joined:
    Dec 13, 2021
    Messages:
    28
    Likes Received:
    12
    Last couple of days the full fueltanks emtied themselves sometimes 1-2hours+ ingame in Reforged with Solarpower and -0.3kW.
    Please dear devs prioritize this gamebreaking mess!
     
    #15
    A Mueller and Slam Jones like this.
  16. Vollinger

    Vollinger Lieutenant

    Joined:
    Jan 16, 2022
    Messages:
    39
    Likes Received:
    71
    For anyone looking for advice here, you can not avoid the fuel bug, it will hit you. What you can do is prepare for this and reduce the impact:

    Advice:
    Keep the fuel tanks on your vessels as low as possible at all times. If you're going to log out, empty them on all your vessels as much as possible.

    Workarounds:
    To circumvent losing fuel when you log back in for powered on vessels on negative power (in RE)
    1) Log in
    2) Turn them off (*before* you turn on anything else!)
    3) Wait for a few seconds, then turn them on again.
    That seems to skip the buggy fuel calculation - beware though, if you turn them on too fast, it may hit you again.

    For CVs that were powered off already, remove all fuel before you turn them on. Turn on, wait for it to turn off (due to being out of fuel), then refill a bit and continue.

    Good luck, and keep your fuel in your storage instead :p
     
    #16
  17. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,282
    Likes Received:
    11,939
    Do we have an estimated fix on this? It was reported 3 months ago and has been causing some pretty major gameplay blocking issues on servers.
     
    #17
  18. Pantera

    Pantera Administrator Staff Member

    • Developer
    • Moderator
    Joined:
    Aug 15, 2016
    Messages:
    3,238
    Likes Received:
    5,676
    Update: A fix for this will be available next week on the experimental branch.
     
    #18

Share This Page