Jump to content

[1.3.1 - 1.8.x] WorldStabilizer - Bugfix for vessels bouncing on scene load


whale_2

Recommended Posts

As some reports suggest, 1.5.1 still suffers from it...

The infamous bouncing bug was mostly fixed in 1.4.1, however, in some odd situations it is reported to appear again. If this happens to you, you're welcome to try this mod.

 

But surprisingly, there are reports that 1.4.5 has the bug again: Squad Bugtracker Issue #16159, note #19

 

There's a bug that was seemingly fixed in 1.3 and reintroduced in 1.3.1 - when you enter the scene with some vessels landed they jump up in the air (or in the lack of it).

Bug #16159

If you don't experience it, just ignore this post. However, many, including me, do experience it and it is rather frustrating. It is unclear when and how this would be fixed officially, chances are it will only happen in Release 1.4 and this release in my understanding could potentially break many mods, so 1.3.1 might be around for quite a long time.

The root reason of this seems to be that the game places the vessels slightly beneath the ground and after that physics kicks in and the ground pushes the vessels outwards with significant force. In many cases, especially on low-gravity worlds this could be disastrous.

  Reveal hidden contents

 

Features and caveats:

  • Vessels on launch clamps are not affected
  • Kerbals on EVA are not affected by default (configurable)
  • Vessels in Prelaunch state (i.e. just launched from VAB/SPH) are affected by default (configurable)
  • Vessels that are Splashed, Flying, Orbiting, Escaping, or on Sub-orbital trajectory are not affected  
  • Particular vessels can be excluded from stabilization (see config file)
  • If there is a Hangar with attached anchor, it would be reattached after the hangar settled
  • If the vessel is moored to the surface with KAS harpoon, it should be safe (no longer valid for KAS 1.0 as there are no harpoons at the moment of writing)
  • If the vessel contains KAS pylons/concrete blocks in attached state (with staticAttached = true, that have physical connection to the ground), they will be reattached like Hangar anchors (NOTE - relevant for old KAS < 1.0, new KAS is yet to be addressed)
  • You might experience some FPS drop during the stabilization, for instance when you are coming into physics range with some other vessel and it goes off-rails.
    This usually lasts only about 3 seconds and can be reduced further in config file in exchange for less gentle vessel release.  

 

Compatibility and Robustness

This fix has been tested in a bunch of other people's games including mine and so far no issues were reported, but I'm pretty sure something will eventually be blown up - some parts or mods me and all participated in testing don't have weren't tested. Some specific mod may require special treatment. Some particular situations may require special treatment as well. For instance, I'm pretty sure if your base is hanging on a cliff, it would not survive. I just didn't find a cliff in KSP to hang a base on it.

BACK UP YOUR SAVE BEFORE TRYING THIS FIX and please report the issue if bad things happen.

 

Configuration is being done via WorldStabilizer.cfg file inside the mod directory, it should be pretty self-explanatory and there are comments.

The mod comes with MiniAVC version checker - obligatory notice: 

This mod includes version checking using MiniAVC. If you opt-in, it will use the internet to check whether there is a new version available. Data is only read from the internet and no personal information is sent. For a more comprehensive version checking experience, please download the KSP-AVC Plugin.

Licensed under MIT License

Kudos to @BahamutoD, @Papa_Joe and all participants of this thread for code pieces I pried into.

Thanks for all who participated in testing.

 

Latest version for KSP 1.3.1 is 0.8.4, for 1.4.3 - 0.9.2, for 1.5.1 - 0.9.3, currently available on GitHub, SpaceDock, CurseForge and CKAN. As there are reports for 1.4.5, proper recompile is expected soon, but other people report 0.9.2 works just fine. Ping me if you badly want 1.4.5 recompile with fixed AVC version.

Since 0.9.4 I start doing multi-builds, so at least 0.9.4 is available on GitHub for KSP-1.3.1, 1.5.1, 1.6.1, 1.7.3. However 1.8 has changed quite a lot, so recent builds (0.9.6-0.9.7) are for 1.8.x only

Download from GitHub

Download from SpaceDock

Download from CurseForge

Source code is on GitHub as well.

Changelog

  Reveal hidden contents

 

Development thread for posterity.

Edited by whale_2
0.9.7
Link to comment
Share on other sites

I have experienced this bug on Kerbin actually. I had KIS/KAS installed and it caused whole large base to flip, even though it was designed in the way that small MK2 fuel tanks were used for bottom for extra stability.
Thank you for looking into this, I will try it out and report any problems!

Link to comment
Share on other sites

  On 1/7/2018 at 3:44 PM, brusura said:

Been waiting for this for so long....

 

Nope...some parts exploded :( what do you need to debug it? Save, log?

Expand  

Yes, could you please turn on debug log in config file, then go blow it up again, post the craft file, the log and maybe some screenshots. I'll look into it this night.

Link to comment
Share on other sites

  On 1/7/2018 at 5:44 PM, whale_2 said:

Yes, could you please turn on debug log in config file, then go blow it up again, post the craft file, the log and maybe some screenshots. I'll look into it this night.

Expand  

https://drive.google.com/drive/folders/1mVehhOhglv9xA-0Sh779o7LffUWv4rGr?usp=sharing

I can not give you the craft file is a base assembled over time on minmus, in the link there is log, whole savegame and screenshoot ( the smoke you see is a Rockomax brand adapter exploding inside the terrain ) , the same structure do not explode on load without the mod

PS: to load the savegame you need KIS/KAS and OSE workshop 

Edited by brusura
Link to comment
Share on other sites

  On 1/8/2018 at 2:56 AM, whale_2 said:

Am I right, it does explode without WorldStabilizer too? 
First thing I see is solar panels starting to flap like a bird wings...

Expand  

Nope it do not explode without WorldStabilizer

In my game I have also Joint Reinforcemente from Ferram and the solar panels do not flap

Link to comment
Share on other sites

  On 1/8/2018 at 5:41 PM, brusura said:

Thanks for taking the time, I also remember terrain detail is important, mine in this case was set to default

Expand  

I think I've fixed this. Please try 0.7.1

Hope I didn't add any regression, I've checked for most obvious ones. The reason was in the way I determine which mesh should be used to calculate part bounds. Some parts have their hierarchy crafted differently from others, like it was with stock large adapter in this particular case.

Link to comment
Share on other sites

  On 1/8/2018 at 9:33 PM, whale_2 said:

I think I've fixed this. Please try 0.7.1

Hope I didn't add any regression, I've checked for most obvious ones. The reason was in the way I determine which mesh should be used to calculate part bounds. Some parts have their hierarchy crafted differently from others, like it was with stock large adapter in this particular case.

Expand  

Confirming no explosion :-)

Link to comment
Share on other sites

Released 0.8.0 with support for KAS pylons / concrete blocks. I somehow missed the fact that they can form physical connection to the ground. Now if such pylon is found, it is detached before raising the vessel and re-attached when stabilization stops. It works fine on Kerbin with default settings for stabilization ticks but might result in blocks permanently floating above surface if there are too few ticks, minimum downward movement set for something big or if surface gravity is weak. I plan to rework this part.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...