Jump to content

[1.3] Buoyancy Control - Add a Buoyancy Control Slider to every part's context menu


Xyphos

Recommended Posts

To use, simply enable "Advanced Tweakables" in the main menu settings then you'll be able to see the Buoyancy slider on the context menu for every part. Then you can adjust the part's buoyancy to your liking.

  • 0.0 will cause the part to sink.
  • 0.5 is likely to sink it partially. (not always guaranteed)
  • 1.0 will make it float.
  • 2.0 will make it almost unsinkable.

NOTE: Some parts in Stock KSP will have their default buoyancy above 1.0

Download from SpaceDock

Source Code on GitHub

Link to comment
Share on other sites

11 minutes ago, linuxgurugamer said:

Can you adjust the slider in game or is it only work in the editor the VAB or in the SPH?

editor only.

I figured in-flight adjustments wouldn't make much sense.

Edited by Xyphos
Link to comment
Share on other sites

THANK-YOU ! I have been alarmed by some of my capsules sinking in some configurations and thought of the loss of Liberty Bell 7 and the near drowning of Gus Grissom who was later killed in the Apollo One fire.

Link to comment
Share on other sites

10 hours ago, Drew Kerman said:

@SpannerMonkey(smce) do you think this would mess with any ship stuff, yours or otherwise?

Hi, yup, it takes quite a while to get the hulls floating correctly by a combination of mass and buoyancy reduction. Having a slider would infer that cfg settings are irrelevant, and the user could override any setting there.  The larger hulls, (120mtr +)  LBP size operate right on the edge of KSP's  physics as it is, and it's only a tiny difference between good game play and a kraken festival.  Many of the later hulls and the subs especially run very low buoyancy values as it is, and it will not take much to ruin the balance

Other knock on effects, it will wreck the HullBreach mod, as that relies on once again, values that are worked out over time and fixed, if you reduce the buoyancy by 50% you'd have to let the plugin know somehow that you had  otherwise it'll be instant sink,instead of flood.

Obviously it's a done deal now, but without doubt, it puts anyone who uses a buoyancy slider  on the ships boats, in uncharted territory, quite simply if you adjust the buoyancy value and it all goes wrong, it's all on you :) 

Very suprised it's not been done before. . I'm aware that some stock parts have ludicrous buoyancy but would strongly advise caution before applying it to SM mods, things that are supposed to sink usually do, even down to panels and rails, and things that are meant to float , have an adjusted buoyancy to make sure they float appropriately

 

Link to comment
Share on other sites

3 hours ago, SpannerMonkey(smce) said:

Hi, yup, it takes quite a while to get the hulls floating correctly by a combination of mass and buoyancy reduction.

now you can use this mod to alter your buoyancy and speed up production. imagine simply reverting to editor and changing the setting, rather than changing a config file and reloading the game.

Link to comment
Share on other sites

Yes, it's really power help for floating craft, especially with mod's parts.

But please note, the part's buoyancy depends from part's collider volume. So if part haven't collider, then will be drown anyway.

Here yesterday's tests and examples where this mod not working:

Spoiler

OKTO2 is excellent pod for experiments - it have a neutral buoyancy.

For test part buoyancy=max (2).

k0DjKJH.png

x9lV7QL.png

TliD077.png

4CYu2mQ.png

 

Edited by Aerospacer
typo
Link to comment
Share on other sites

17 minutes ago, Xyphos said:

imagine simply reverting to editor and changing the setting

or being able to do it in the game, which is why it was asked for, not so much as a "cheat" but just a practical way of figuring out what works

Link to comment
Share on other sites

1 minute ago, Xyphos said:

now you can use this mod to alter your buoyancy and speed up production. imagine simply reverting to editor and changing the setting, rather than changing a config file and reloading the game.

It would seem that way but  unless it a global alteration of a craft and parts buoyancy rather than on a part by part basis it doesn't really work, and having to set it every single time  for up to 12 hull sections would get old fast. I'll  stick with getting it right and applying the value permanently in the cfg.

I actually find the idea of leaving it to the user to set the buoyancy of the hull parts very unappealing, I'm not sure they'd enjoy ot much either.  I'm sure it would cause more grief than it would solve as buoyancy is not something I have a problem dealing with via stock cfg options, and getting it spot on matters when you do things as below. 

I don't disapprove of the mod in any way, but would still advise users of SM Marine and LBP to be very cautious when messing with the hull buoyancy of my parts.

Spoiler

CP49mz0.png

lg94EBB.png

 

 

 

Link to comment
Share on other sites

25 minutes ago, Xyphos said:

now you can use this mod to alter your buoyancy and speed up production. imagine simply reverting to editor and changing the setting, rather than changing a config file and reloading the game.

The point @SpannerMonkey(smce) was making was that SMM and LBP parts have very specific, hard coded buoyancy that should be left alone so that they function correctly.

Link to comment
Share on other sites

8 minutes ago, Aerospacer said:

buoyancy depends from part's collider volume. So if part haven't collider, then will be drown anyway.

certain parts had their colliders omitted to remain "physics-less" nothing I can do about that one.

Link to comment
Share on other sites

Updated to v1.0.2.0 - Added support for mod part makers to disable this mod via cfg settings

 

 

@SpannerMonkey(smce) you can now disable this mod in your part's cfg - sorry, I didn't mean to step on your toes and I respect the amount of work you put in to your creations.

@PART[YOUR_PART_NAME_HERE]:FINAL
{
	%MODULE[BuoyancyControl]
	{
		enabled = false
	}
}

 

Link to comment
Share on other sites

37 minutes ago, Xyphos said:

Updated to v1.0.2.0 - Added support for mod part makers to disable this mod via cfg settings

 

 

@SpannerMonkey(smce) you can now disable this mod in your part's cfg - sorry, I didn't mean to step on your toes and I respect the amount of work you put in to your creations.


@PART[YOUR_PART_NAME_HERE]:FINAL
{
	%MODULE[BuoyancyControl]
	{
		enabled = false
	}
}

 

I think what you need to do is work backwards here. Create the mod, but by default it is disabled for everything except stock, and allow other mod makers the decision to add it in as they see fit rather than it encompassing everything and making it so they have to disable it by doing more work. Even provide the MM patches, but leave them in a disabled state.

Link to comment
Share on other sites

Just now, monstah said:

Or, you can add this to this mod instead:


@PART[*]:HAS[@RESOURCE[BallastWater]]
{
	%MODULE[BuoyancyControl]
	{
		enabled = false
	}
}

Seems to me these are the parts that are painstakingly balanced, right @SpannerMonkey(smce)?

There's also a SeaWater resource added through Hullbreach, which would also be affected by this mod. So yeah, these entries should be with this mod, rather than forcing Spanner and Gomker to make adjustments to theirs.

Link to comment
Share on other sites

2 hours ago, XOC2008 said:

I think what you need to do is work backwards here. Create the mod, but by default it is disabled for everything except stock, and allow other mod makers the decision to add it in as they see fit rather than it encompassing everything and making it so they have to disable it by doing more work. Even provide the MM patches, but leave them in a disabled state.

you do realize, there's no easy way to specify all 303 stock parts, plus all the mod parts that may want this feature?
SpannerMonkey was the only exception thus far, and I offered this patch as an apology, instead I get insulted and hit with a false claim of "creating more work" when really, it's just a copy/paste job, I did all the work to make it possible. sheesh.

Edited by Xyphos
Link to comment
Share on other sites

No one is insulting you or your mod. But why should Spanner and other mod makers have to edit hundreds of cfgs to "opt out" when you could more easily add in that MM patch that @monstah posted, and adjust it for other mods that rely on buoyancy that has been carefully and painstakingly adjusted to give the best results?

Link to comment
Share on other sites

1 minute ago, XOC2008 said:

No one is insulting you or your mod. But why should Spanner and other mod makers have to edit hundreds of cfgs to "opt out" when you could more easily add in that MM patch that @monstah posted, and adjust it for other mods that rely on buoyancy that has been carefully and painstakingly adjusted to give the best results?

be my guest, and submit a pull request. :)

Link to comment
Share on other sites

3 minutes ago, XOC2008 said:

No one is insulting you or your mod.

I think he means this:

2 hours ago, DoctorDavinci said:

By giving him more work to do on his creations :confused:

But, in any case, let's drop the personal back-and-forth and go back to discussing the mod :)

edit: eh, ninja'd. Very well, I might do a pull request when I get back home.

One question (not that it matters for some players, but out of curiosity): how do you visualize it happening "in game"?

I mean, some players (myself included) already think that an invisible, mass-less autostrut is "cheaty" (again, not that it matters, it's a personal opinion). This mod makes parts buoyant, alright, but is it by magic?

Edited by monstah
Link to comment
Share on other sites

1 hour ago, monstah said:

This mod makes parts buoyant, alright, but is it by magic?

in real life, why do certain things float, despite their size and mass, but other things sink, also despite size and mass?
if you're looking for an explanation or some sort of back story, to support whatever false beliefs you possess, you can pretend there's a layer of buoyant material (or lack thereof) used for construction of the part. but need I remind you, Kerbals convert rocks into fuel; how cheaty is that?

I only created this mod as a simple way to support underwater exploration, primarily mine ore from Laythe's seafloor with a submarine with stock parts, and being able to adjust the buoyancy on the ore tanks and other parts allows such.

I didn't mean for this mod to stir up so much trouble.

Edited by Xyphos
Link to comment
Share on other sites

2 hours ago, Xyphos said:

SpannerMonkey was the only exception thus far, and I offered this patch as an apology, instead I get insulted and hit with a false claim of "creating more work" when really, it's just a copy/paste job, I did all the work to make it possible. sheesh.

*I* appreciate your efforts and as the OFFICIAL arbiter and judge of all that is good and right in the world, you should feel most accomplished. :D  Those who wish to complain are completely free to not use your mod.

Link to comment
Share on other sites

  • 2 weeks later...
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...