Jump to content

Is there no simple solution to ballast tanks yet?


Recommended Posts

So, I've never done an underwater base before and I want to mess around with it for fun, so I am looking for a solution to make submarines.  Kind of disappointing that the new helicopter bits don't work underwater.  But still the biggest problem seems to be getting a neutral buoyancy.  Virtually every stock part floats aggressively, so you can add weight to counteract that, but in stock you need lots of extra parts to accomplish that and we all know that fewer parts on a craft is better for performance.  So what I am looking for is a simple mod that lets me sink a vessel. My preference is to have an elegant solution that does not add any new parts.

I've been searching and testing mods that cover this... 

Ballast Water Tanks  Adds some tanks and a radial compressor to fill them. Seems to work pretty good but a little fiddley in practice.  Adds some tanks that look ok alongside stock, and clones to the atmo analyser, which is pretty clever.  

MOIST adds a bunch of new parts that are all white, so they really clash with everything else. I assume it works, but didn't test further. 

Ballast and Nuclear Submarine Parts Not updated since 1.2, depends on KAX and Firespitter.  Did not test. 

Ballastanks not updated since 1.3, only adds a single part. Works great, simple, you can fill and empty the tank in flight to add/remove weight. 

SinkEmAll from the same page. Adds a new superheavy resource and adds that as another resource option that is default empty on all fuel tanks and command pods. No in-flight adjustment, but it definitely can make things sink.  Has a 1.10 update on CKAN

SubPack from RoverDude, now part of the exploration pack.  Adds a full set of submarine parts and has multiple dependencies.  Played around with it in the past and works well.  

Maritime Pack from Fengist, older mod that was updated back in 1.4, but has issues in current version from the posts in the forum thread. Not sure if this even had a ballast tank, not tested. 

Submarine Pack also from Fengist.  But that seems to be long gone. 

Maratime / Sub Pack 2.0 found a dev page for a mod that seems like it never happened.  

That is about all I can find.  

To do a submarine right you would want 4 tanks on the left/right front/back sides of your vessel.   By balancing the weight between those you should be able to keep the vessel flat and level when the engines are unpowered.  Lets do some experiments.  Here I have 4 ballast tanks that are symmetrical around the center of mass. 

xsSlQgz.jpg

In the water this behaves as expected once you find the sweet spot for how much ballast is needed. 

N7bxc63.jpg

The Ballastanks mod actually works nicely here, you can bind 2 action groups to toggle on/off the fill/empty function. 

It may not always be easy to have tanks balanced around the center of mass, so what if they are offset? 

v1GG9Xs.jpg

Its definitely leaning backward, the weight farther from the COM in the back is throwing the balance off. 

EFdGykF.jpg

I shifted some of the mass to the forward tanks and the craft balanced out.  But I had to use TAC to do it.  

Ws8y3bh.jpg

Lets try something where the COM is offset.  

O68XrR3.jpg

By playing around with the balance of the ballast you have control over the pitch and roll of the vessel while it is unpowered.  

At the end of the day the ballast  im using is just a resource like any other.  What if there were 4 ballast resources? You could remove symmetry from all the tanks and then have BallastF and BallastL in the front left tank while the other two were locked out, etc.. Then you need a way to add and remove ballast, then you need some convertors to change BallastL into BallastR, and the reverse, etc...  hm....

Ok, so here is the new test vessel with the COM really offset. 

YGKLxN8.jpg

fNNESxN.jpg

I split the tanks and locked/unlocked each type of ballast based on where it was relative to COM.  Then set two action groups to toggle tank fill/empty on all the tanks.   Only took about a minute to get the craft to dive and balance and I have simple control. 

wTMyBh3.jpg

I also changed over to using the ModuleResourceConverter and it works vessel wide, so pulling up part actions for any one tank lets you shift the balance around among all the tanks.  And thats it, seems simple and easy to use to me, will work for what I want to do.  I think I may clone the radial ore tank to use as the model in game.  

Link to post
Share on other sites
14 minutes ago, Caerfinon said:

Have you looked at USI Exploration Pack? It does add parts for the Otter Sub but not many and the ballast tanks work pretty good.

 

I did link it in my post, so yeah, played with it years ago when it was in testing. 

Link to post
Share on other sites

As I continue in trying to build an ocean floor base I have not been happy with the options for an engine to push a craft underwater. 

The jet engines can work with enough air intakes, but you still see rocket exhaust, etc.  So I don't like that.  and its hard to have enough touch to do underwater docking.  

The new props would work pretty good, but they don't function underwater for some reason.  Control surfaces do however.  So you can stick a control surface onto an engine and get something like this. 

CheapSneakyBlackbird-size_restricted.gif

It works, but you get a lot of displacement when you spin up the engines and it looks goofy, worse than the jet engine exhaust. 

MadeupEagerEelelephant-size_restricted.g

So that takes me back to the props, the ducted fan blades would work perfect.  I mean they are a long ways from a boat propeller, but they are a hell of a lot closer than any other part in the game...  Why don't they work underwater?  Looking under the hood, both parts use the same ModuleControlSurface. What would happen if I just copied the settings from the regular control surface and put it on the prop instead?  Holy excrements that actually works.

AbsoluteBestCuckoo-size_restricted.gif

Something about the size makes it prone to tearing its self apart, but if you autostrut the engines then it works reliably. A few tweaks and restarts later and we have a reasonable engine for a submarine that can do 30m/s, triple what I was able to get with the stock control surfaces. 

FrequentGlassHairstreak-size_restricted.

I was afraid it would just tear apart and explode if it got out of the water, but that seems ok too. 

MeatyBonyDutchsmoushond-size_restricted.

 

 

Edited by eberkain
Link to post
Share on other sites
On 12/17/2020 at 9:11 AM, eberkain said:

But still the biggest problem seems to be getting a neutral buoyancy.  Virtually every stock part floats aggressively

Parts are defaulted to have max buoyancy when not set in a config. This simple patch lets you calm that aggression (or shows you what to target). I've gone as low as 0.85 or 0.8.

@PART:HAS[#buoyancy[*]]
{
	%buoyancy = 1 // The valid range is 0 to 1. Do not exceed or bad things happen.
}

This is a way to target parts in a mod to give them low buoyancy. This example assumes all parts with a certain branding but also a certain feature, so let's take for example...

@PART:HAS[#manufacturer[Something?Corp],@MODULE[ModuleSomething]]
{
	%buoyancy = 0.3
}

// Angel-125's "Castillo series" boxed parts
@PART:HAS[#manufacturer[Wild?Blue?Industries],@MODULE[WBIPackingBox]]
{
	%buoyancy = 0.3
}

And give them super low buoyancy because they have zero dry mass and might float anyway because of their great surface area when inflated.

 

Link to post
Share on other sites
1 hour ago, JadeOfMaar said:

Parts are defaulted to have max buoyancy when not set in a config. This simple patch lets you calm that aggression (or shows you what to target). I've gone as low as 0.85 or 0.8.

@PART:HAS[#buoyancy[*]]
{
	%buoyancy = 1 // The valid range is 0 to 1. Do not exceed or bad things happen.
}

This is a way to target parts in a mod to give them low buoyancy. This example assumes all parts with a certain branding but also a certain feature, so let's take for example...

@PART:HAS[#manufacturer[Something?Corp],@MODULE[ModuleSomething]]
{
	%buoyancy = 0.3
}

// Angel-125's "Castillo series" boxed parts
@PART:HAS[#manufacturer[Wild?Blue?Industries],@MODULE[WBIPackingBox]]
{
	%buoyancy = 0.3
}

And give them super low buoyancy because they have zero dry mass and might float anyway because of their great surface area when inflated.

 

Thank you for this. I am so out of my element with MM configs. 

Link to post
Share on other sites

Have you looked at the WBI Buffalo mod? There are some parts there designed for submarines (by which I mean trimmable ballast tanks), and Angel15 has an example craft with the mod, though I haven't done the necessary work to grok how it works. 

Link to post
Share on other sites
2 hours ago, capi3101 said:

Have you looked at the WBI Buffalo mod? There are some parts there designed for submarines (by which I mean trimmable ballast tanks), and Angel15 has an example craft with the mod, though I haven't done the necessary work to grok how it works. 

I forgot about that one, I checked it out again and it is pretty nice.  Some engines and some ballast tanks, but man that mod is huge.  I'm doing my best to have minimum mods so the performance stays decent.  

The modified prop blades are just too jank to be reliable which makes me sad.  Might explain why the official bug tracker issue is still open after over a year.  https://bugs.kerbalspaceprogram.com/issues/23271

Link to post
Share on other sites

A simple MM mod to override all stock part buoyancy settings is a great idea.  I’m imagining subs that can rise or sink by opening and closing cargo bays (“flooding the tanks” etc), needing to test whether your reentry capsules float, seaplanes requiring certain wing and fuselage structures to float, etc.  All with stock parts and no clipped Vectors and ore tanks etc.  I would definitely contribute and play test.

An duplicate of stock prop models that actually work in water (and don’t work in air) would be a nice option too, if progress is made on that.  I don’t really go for part mods but I love stock overhauls that add depth (pun not intended)

Link to post
Share on other sites

Seems like I've been working on this mod forever, it does address the ballast/buoyancy issues by not using them.  I play at making mods just to see if it can be done and can I do it. There is nothing realistic  or stock about it but it works most of the time. There are still issues to be resolved.

Just an example of what can be done.


 

 

 

 

 

 

 

 

 

Link to post
Share on other sites
  • 1 month later...

I too would appreciate a decent ballast system.  Perhaps when active the ballast would cause the buoyancy of the craft's collective parts to be set to the inverse of (90% * ballast setting).  Not especially realistic, but it would serve the fundamental purpose of allowing a craft to sink or float at a controllable rate.  Seems like that would be a fairly simple mod to make, but I don't know nearly enough about KSP modding to do it myself...

Link to post
Share on other sites
  • 2 weeks later...
On 12/17/2020 at 9:11 AM, eberkain said:

But still the biggest problem seems to be getting a neutral buoyancy.  Virtually every stock part floats aggressively,

I have yet to see evidence that any ballast plugin mod has addressed this, so I did something about it.

On 1/31/2021 at 3:11 AM, SkyRender said:

I too would appreciate a decent ballast system. 

Actually, all ballast system mods are decent, however, none are known to be effective because they are inhibited by parts all having maximum and excessive buoyancy. They should be quite effective now...

On 12/21/2020 at 6:53 PM, fourfa said:

A simple MM mod to override all stock part buoyancy settings is a great idea.  I’m imagining subs that can rise or sink by opening and closing cargo bays (“flooding the tanks” etc), needing to test whether your reentry capsules float, seaplanes requiring certain wing and fuselage structures to float, etc.  All with stock parts and no clipped Vectors and ore tanks etc.  I would definitely contribute and play test.

Let the testing begin. :)

 

Link to post
Share on other sites
  • 2 months later...

Hi to anyone reading, Don't know if the topic got a resolution so here is a thought for you. Either get the Leviatan carrier mod or create a resorces config file that has this.

RESOURCE_DEFINITION
{
  name = Liquids
  density = 1.00
  unitCost = 0.01
  flowMode = STAGE_PRIORITY_FLOW
  transfer = PUMP
  isTweakable = true
}

If you don't already know you just open a new text document with Notepad [assuming you are on a windows pc] copy and paste this and save it with a cfg suffix. eg Resource.cfg.

The next can be done with any part but for me I chose the Baguette radial tank which is stock and found in Gamedata/Squad/Parts/FuelTank/FoilTanks/RadialTank_Capsule.cfg . Open it and then immediately "Save AS" something else. In my case I called it, RadialBallast_Capsule.cfg

Always do that so you don't bugger the original. Then amend or copy and paste the following to create your new part.

PART
{
    name = BallastTankCapsule
    module = Part
    author = RoverDude
    rescaleFactor = 1.0
    // --- node definitions ---
    // definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z, [node size], [crossfeed, def=1 i.e. true], [rigid attach, def=0 i.e. false]
    node_attach = 0.3, 0.0, 0.0, 1.0, 0.0, 0.0, 0
    TechRequired = start
    entryCost = 1500
    cost = 50
    category = Utility
    subcategory = 0
    title = 'Baguette' Ballast Tank
    manufacturer = #autoLOC_501662   //#autoLOC_501662 = C7 Aerospace Division
    description = #autoLOC_501809   //#autoLOC_501809 = As convenient as it is fashionable. This part actually won a modern-art design prize.
    // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
    attachRules = 0,1,0,1,0
    mass = 0.001
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.3
    angularDrag = 2
    crashTolerance = 15
    breakingForce = 5000
    breakingTorque = 5000
    maxTemp = 2000 // = 3000
    fuelCrossFeed = True
    bulkheadProfiles = srf
    tags = Ballast weight

    MODEL
    {
        model = Squad/Parts/FuelTank/FoilTanks/RadialTank_Capsule       
    }
    MODULE
    {
        name = ModuleGenerator
        requiresAllInputs = true
        activateGUIName = Fill Start
        shutdownGUIName = Fill Stop
        
    INPUT_RESOURCE
        {
            name = ElectricCharge
            rate = 1
        }
    OUTPUT_RESOURCE
        {
            name = Liquids
            rate = 2
        }    
    }

    MODULE
    {
        name = ModuleGenerator
        requiresAllInputs = true
        activateGUIName = Empty Start
        shutdownGUIName = Empty Stop
        
    INPUT_RESOURCE
        {
            name = Liquids
            rate = 2
        }
    }

    RESOURCE
    {
        name = Liquids
        amount = 0.00
        maxAmount = 50.0
    }
    MODULE
    {
        name = TweakScale
        type = stack
        defaultScale = 1.25
    }
}

 

If you copy and paste then make sure you replace all the existing text so it only looks like the above. Save it and leave it where you found the cfg file so it uses the right mesh and textures. If you have tweakscale it will be resizable. It can then be found in game by typing ballast in the search. Attach to the bottom of your sub on the keel [centre bottom] then use the move tool to move it just far enough up to not be visible. I find it best to add liquid after launch. Using the fill or empty commands. They are separate functions so don't turn them on at the same time or the level won't change. So radio buttons if you right click on the part or pre assign to a custom function when creating in the hangar. I find 1 of the correct volume works fine or two , 1 front and 1 back and remembering to turn off flow to 1 tank at a time with the green triangle, is good for leveling. Mechjeb2 can give you a vertical velocity dislplay that will allow you to get within mm/s of neutral buoyancy. Enjoy.

Edited by ColdJ
Link to post
Share on other sites
On 1/30/2021 at 11:11 PM, SkyRender said:

I too would appreciate a decent ballast system.  Perhaps when active the ballast would cause the buoyancy of the craft's collective parts to be set to the inverse of (90% * ballast setting).  Not especially realistic, but it would serve the fundamental purpose of allowing a craft to sink or float at a controllable rate.  Seems like that would be a fairly simple mod to make, but I don't know nearly enough about KSP modding to do it myself...

The Wild Blue Tools plugin has a dive computer for controlling a part’s buoyancy as its ballast resource is filled. Buffalo has ballast parts too but you would need to cull what you don’t want.

Link to post
Share on other sites

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...