gomker

[1.3] HullBreach - Making things Sink

16 posts in this topic

In collaboration with SMSolutions I present my first efforts in KSP modding , HullBreach is designed to simulate flooding of submerged parts and allow them to sink. 

Features

  • Uses heat "damage" to trigger the flow of water into part
  • Parts can be set as "Hydroexplosive" - once underwater they will take on extra heat based on depth to simulate increasing pressure, used for Hulls that take on water
  • Parts that are configured as "Crushable" will be destroyed at set depth, used for other parts that will not take on water that you want destroyed when sunk
  • Parts with Electric charge are drained when fully sumberged
  • Parts marked as Crushable will have their buoyancy set to 0 when fully submerged to keep from having floaty bits around
  • Included Module Manager patches for Large Boat Parts, SMMarine and NAS

Example Configurations

Hull Parts

Spoiler

	MODULE
	{
		name = ModuleHullBreach
		flowRate = 100
		critFlowRate = 200
		breachTemp = 0.4
		critBreachTemp = 0.8
    	hull = true 
	    hydroExplosive = true
	}
	RESOURCE
	{
		name = SeaWater
		amount = 50
		maxAmount = 3750
		
	}

 

Crushable Parts

Spoiler

	MODULE
	{
		name = ModuleHullBreach
		hull = false
		hydroExplosive = false
		crushable = true
		crushDepth = 100
	}

 

Notes on configuration

  • Parts should not be marked as Hydroexplosive AND Crushable - only one is applicable
     
  • Some helpful notes courtesy of  @SpannerMonkey(smce) on how we designed this to work with other parts

Notes to prospective users.  The effectiveness of HullBreach is purely determined by the patch you write for the part, while it is very easy to get a hull to sink, getting it to sink at a realistic rate can take a little bit of cfg tuning. As mentioned in the OP both SM Marine and the LBP have been enabled for HullBreach and you can inspect  the patch cfg's there,  they will serve as a reference point for similar sized craft and parts

For weapon mod makers it is suggested that you ensure that your turrets will not float, simply adding buoyancy = -2  to the part cfg  will prevent floaty turret syndrome. Floaty turret syndrome is caused by the buoyant turrets detaching from the crushing exploding parts and floating back to the surface, this  usually results in a nice outline of where the ship used to be being formed by the floaty turrets. Also has been known to mess up screenshots. nothing looks as odd as a 40ton turret bobbing in the waves :) 

All SMM And LBP structural parts are zero buoyancy to so that they will sink along with the hull. If you have a ship or boat mod or parts that you'd like to use on ships i recommend that you do the same. The only buoyant parts ideally will be hull parts, i also change the buoyancy value for things that would never float, such as girder formed masts, structural panels etc into  negative buoyancy parts, so in the same way as the weapon mods add buoyancy = -2 to anything you want to sink like a stone and more neutral numbers for things that should sink slowly, i find the gradual disappearance of parts adds to the whole effect.

 

Download

Required Mods

Recommended Mods

Reporting Issues / Support

  • For support please ensure you are following these instructions and provide logs

    The Logs

    Spoiler

    These are text files that the game spits out for debugging purposes as it runs; if something broke horribly in-game, there will be something in here about it. You should upload the entire log as a file (i.e. not to pastebin); you can use dropbox or an equivalent host to upload the file. Make sure the entire file gets uploaded; you may have to zip it first, as logs can be very long. Here is where you can find the log:
    Windows: KSP_win\KSP_Data\output_log.txt (32bit) or KSP_win64\KSP_x64_Data\output_log.txt (64bit)
    Mac OS X: Open Console, on the left side of the window there is a menu that says 'files'. Scroll down the list and find the Unity drop down, under Unity there will be Player.log ( Files>~/Library/Logs>Unity>Player.log )
    Linux: ~/.config/unity3d/Squad/Kerbal\ Space\ Program/Player.log

     

  • Github Issues  - Github is the preferred way to communicate issues or feature requests, feel free to discuss in thread of course.

License 

This work is shared under CC BY-NC-SA 3.0 license

Change Log

Spoiler

v0.1.5.5.4 

- Updates to Module Manager Configs for release of SMMarine and LBP

Special thanks to @SpannerMonkey(smce) for helping me out with my first plugin and the video above

 

Edited by gomker
2 people like this

Share this post


Link to post
Share on other sites

@gomker   Congrats on your first official mod release. Definitely one of the best collaborations I've been involved in. thanks for the missing part of any ship or boat mod. 

I thought it appropriate to show some of the shots from development

GdDj2SZ.gif

8udVxBF.png

IgdXHA5.png?1

FBEAlle.png

0gwUpXd.png?1

Share this post


Link to post
Share on other sites

How does the mod deside if a hull breach happens or not? Is it something to do with the weapons individual damage or is it accumitative? I can slam 4 Mark XII aerial torpedos into a Carrier hull section and get nothing but 4 203mm cannon shells can destroy it. The parts I'm refering to are from LBP and NAS mod.

Share this post


Link to post
Share on other sites

Pretty sure it has to do with the heat imparted to the part, so the torpedoes may not generate enough against the hull section compared to the cannon shells.

Share this post


Link to post
Share on other sites
16 minutes ago, Vjrcr said:

How does the mod deside if a hull breach happens or not? Is it something to do with the weapons individual damage or is it accumitative? I can slam 4 Mark XII aerial torpedos into a Carrier hull section and get nothing but 4 203mm cannon shells can destroy it. The parts I'm refering to are from LBP and NAS mod.

 

6 minutes ago, XOC2008 said:

Pretty sure it has to do with the heat imparted to the part, so the torpedoes may not generate enough against the hull section compared to the cannon shells.

Hi yes it's all heat triggered the LBP now uses a sanity patch to place the values for heat and damage at high but acceptable levels,  a breach is simulated when  the temperature of the part gets above 50% of it's max value, It is very likely that the shells from NAS have a much higher heat output than the torpedoes. if in fact the torpedoes have a heat output at all.  It's completely in the hands of NAS how they balance their products, they i believe use real world values for the shells as it their right , though ideally to work best with LBP they should be considerably less, somewhere around 65% works well

Share this post


Link to post
Share on other sites
1 hour ago, SpannerMonkey(smce) said:

 

Hi yes it's all heat triggered the LBP now uses a sanity patch to place the values for heat and damage at high but acceptable levels,  a breach is simulated when  the temperature of the part gets above 50% of it's max value, It is very likely that the shells from NAS have a much higher heat output than the torpedoes. if in fact the torpedoes have a heat output at all.  It's completely in the hands of NAS how they balance their products, they i believe use real world values for the shells as it their right , though ideally to work best with LBP they should be considerably less, somewhere around 65% works well

Does water effect heat? I did get a bull breach once but it was when I drop 2 torpedos into the hull just above the water line. But if not then I'll work on something to get it working.

Share this post


Link to post
Share on other sites
9 hours ago, Vjrcr said:

Does water effect heat? I did get a bull breach once but it was when I drop 2 torpedos into the hull just above the water line. But if not then I'll work on something to get it working.

Hi. I'll take a look at NAS, maybe it's something we can teak with a MM patch.  Water has no effect on heating that I've noticed, and I've sunk a lot of ships :)

Share this post


Link to post
Share on other sites

I usually prefer modifying the ballast tanks on large boat parts slightly to allow them to perpetually take in water upon staging, and stick pumps to the side, so you can achieve listing or flipping when submerged, but it sometimes has a tendency to release the kraken though...(not to mention having to add 4 0's to the max heat on every part to prevent part exploding and refloating)

Share this post


Link to post
Share on other sites

Posted (edited)

Is there way to stop water coming in ? Like if I get heat again under 50% it starts getting wawter out? Some electric pumps? Ok, see the pump, sorry for necro...

Edited by Toonu

Share this post


Link to post
Share on other sites
1 minute ago, Toonu said:

Is there way to stop water coming in ? Like if I get heat again under 50% it starts getting wawter out? Some electric pumps?

There is a large sea water pump in HullBreach using the resource convertor method.  I use them by setting them to switch on at launch, that way they stand the best chance of keeping a ship afloat, the sooner you start removing water the better chance you have of renaming afloat.

They will ,if you have enough of them ,stop the ship sinking while you escape hostilities, do note that they will not keep a ship afloat that has reached critical condition as that simulates a massive breach and they will not stop you sinking while still being fired upon, as the water ingress will rapidly exceed the water removal.  .   Hope this helps 

1 person likes this

Share this post


Link to post
Share on other sites
7 hours ago, SpannerMonkey(smce) said:

There is a large sea water pump in HullBreach using the resource convertor method.  I use them by setting them to switch on at launch, that way they stand the best chance of keeping a ship afloat, the sooner you start removing water the better chance you have of renaming afloat.

They will ,if you have enough of them ,stop the ship sinking while you escape hostilities, do note that they will not keep a ship afloat that has reached critical condition as that simulates a massive breach and they will not stop you sinking while still being fired upon, as the water ingress will rapidly exceed the water removal.  .   Hope this helps 

The pump never seems to pump out water, all it is says is "missing SeaWater" even though there is SeaWater in the hull and the pump is on.

Share this post


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

The pump never seems to pump out water, all it is says is "missing SeaWater" even though there is SeaWater in the hull and the pump is on.

I'll recheck the function and get back to you.

Share this post


Link to post
Share on other sites

Hey, remeber that config I made? Is it in the mod now?

Share this post


Link to post
Share on other sites

I noticed that @SpannerMonkey(smce)'s Battleship parts from LBP don't sink all the way.

My Battleship just stays half afloat, even with all that Sea Water...

Share this post


Link to post
Share on other sites

Probably needs a re pass on everything , i noticed CK is reluctant to sink too.  I'll add it to the bug fixing list that I'm currently working through

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now