Fuel tank quantity changes between SPH and launch after tweaking fuel in MK1 tanks

Issue #78 invalid
bonesbro created an issue

I added radial symmetrical MK1 2m Universal Fuselages to a simple spaceplane, set them to LF mode, and tweaked the tanks to hold different amounts of fuel.

When I go to launch the amount of fuel in each tank changes. Sometimes it is the amount I tweaked into the left tank, sometimes it's the amount I tweaked into the right, and sometimes it's a different (but similar) number.

Also, when I go back into the SPH the amount of fuel in the tanks has changed again.

I originally discovered this when I was trying to add four engine mounts to an SSTO with slightly less fuel in the outer pair so that I could shut that pair off when fuel ran low.

Setup:

  • Go to the SPH and create a new vessel. Add a cockpit; I used the MK2.

Repro steps:

  1. Activate symmetry mode.
  2. Select the MK1 2m Universal Fuselage and add once to the cockpit which will add a pair of tanks.
  3. Right click on the left tank and click "Next part variant" once to switch to Shielded LF mode.
  4. Change the fuel quantity from its default of 420 to a smaller value. I randomly picked 253.4.
  5. Right click on the right tank and observe that its fuel quantity is also 253.4.
  6. Hit Launch to go to the runway.
  7. Observe Bug: Right click on the left tank and see that it has 252/420 fuel instead of 253. Right click on the right tank and see that it has 253/420 fuel as expected.
  8. Hit escape and revert to the SPH.
  9. Observe Bug: Right click on each tank and note that they now have 252.0/420 fuel instead of the value we designed (253.4). This new value remains stable through future launch/recovery steps.

Other bugs noted:

  • I changed the fuel in the right tank to 294 then left to 148 and launched. Both tanks showed 148 (as expected due to symmetry).

    After recovering, the left tank has 148 but the right tank has 168.

  • I added one additional pair of tanks, radially attached to the existing tanks, and switched it to LF mode too.

    I tweaked the outer left tank to 100.4 fuel and the inner left tank to 200.9. Right clicked each other tank to confirm they had the correct values. Launched.

    On runway, the tanks had (left to right): 84.0, 210, 201, 100.

    After reverting they were: 100.4, 200.9, 210, 84.

    I checked them left to right, and after I'd checked the two right tanks the left tanks were set to the right tank's values, so things were 84, 210, 210, 84.

    Those values were stable after launch & recovery.

Comments (7)

  1. Leonardo Valeri Manera repo owner

    I tried this with the latest pre-release FireSpitter from git, and it seems to be fixed.

    I've pushed it to B9 trunk, so you could you update and try again with the updated .dll and confirm its resolved? Thanks :)

  2. bonesbro reporter

    The issue is still there, but I think I figured out what's going on. Normally, when tweaking fuel quantities in tanks, there are about 10 discrete divisions that you can pick from. Either after installing Tweakscale or installing b9 v5 (not sure which, did both at the same time) the choice of fuel quantities is much more granular. However, the quantity in the tank snaps back to the old quantity granularities at some point. So that's why it was going from 100 -> 84; the tank holds 420 and so normally lets you pick quantities that are multiples of 42. So it snapped back to the closest normally-allowed value, 84. Same with 200.9 -> 210.

    Here are shorter repro steps:

    1. Add symmetrical stock tanks
    2. Right click and tweak one to 100.4
    3. Right click the other to see it at 100.4 as well
    4. Right click on the first one again and it's reset to 84.

    Is the granularity in fuel quantities a firespitter feature or a tweakscale feature? I'd like to send the bug to the appropriate place.

  3. Leonardo Valeri Manera repo owner

    Hey bonesbro.

    I don't have it here, so its probably tweakscale, but just to make sure you're putting the issue in the right place, remove everything but B9 and its plugins, and add things back in one at a time.

    Its known that tweakscale can cause problems with B9 R5 - its going to need an update to properly support FSfuelSwitch.

  4. Log in to comment