UBOAT
ждун Nov 14, 2020 @ 12:08pm
[REL] Sinking Physics Overhaul
Sinking Physics Overhaul mod is now released!

This mod addresses sinking physics for ships. You can expect ships to sink properly realistic. Much slower then in the base game and in a more spectacular way. Sometimes getting heavy list, flip vertically or capsize.

https://steamcommunity.com/sharedfiles/filedetails/?id=2290280091

Compatibility
The mod should be compatible with (almost) any other mod. No any mod is known yet to conflict with SPO.
It does not require a new carrier start and will work with saves created without the mod.
It applies its changes globally to all NPC ships. Including custom ships from mods.

Features overview:

Slower Sinking Rate
All vessels will sink much slower then in base game where they certainly sink way too fast for their size. Depending on how a ship is being hit and influenced by momentum forces occurring due to flooding compartments you can expect varying sinking times between 5 and 10 minutes in average. Sometimes though when receiving devastating damage or breaking in two halves they may sink in a matter of about 30 seconds. In rare cases without additional attention it may take up to 30 minutes or even more. It strongly depends on how many and which compartments are flooding, on the size of leaks and many other factors.

Heeling, capsizing and flipping vertically
Modification of calculation of center of mass for each flooding compartment and entire rigid body allows to increase momentum forces applied to the rigid body during the sinking process. This makes the sinking look more realistic and more spectacular with ships becoming heavily heeled, sometimes even capsize or flip vertically before they sink. Also initial center of mass height is slightly displaced randomly for each vessel which will vary the chance of capsizing.

Adjusted Damage implication
Damage applied to ships by different types of ordnance will result in a wider variety of influence on the sinking process making it less predictable and more suspenseful. In Example Torpedoes will not quickly result in a kill but instead apply heavy flooding which may progress over time to nearby compartments making predicting whether the vessel will sink more challenging. The deckgun shells will start flooding of internal compartments earlier, though will produce smaller leaks resulting in very slow flooding rate and making sinking using deckgun only a long-lasting matter.

Full Stop when heeled too much.
The vessels will full stop from certain degree of heeling as they would do in reality in order to reduce stress on the hull and prolong the sinking process in order to properly apply damage control by the crew or prepare its safe evacuation.

Later Evacuation
The crew will evacuate later in the process of sinking providing damage control over longer time and will evacuate when sinking becomes obvious. However it will full stop the vessel usually much earlier.

Force Sinking
Ships that would not be able to stay afloat in their current state will certainly sink. When flipped vertically or when capsized a force sinking effect will be applied significantly expediting the sinking process in the final stage. It will happen only in a state when sinking is already certain and unavoidable.

HP Bar disabled (optional)
In order to achieve greater immersion the HP bar is disabled by default. It will premise a certain degree of expertise and experience to predict whether the vessel is going to sink or particularly requires some more attention applied. UBOAT Skippers will have to be patient and stay in the area watching their victims and evaluate the sinking process in order to meet this decision properly. HP Bar can be optionally enabled by using HPBar true console command or disabled again by using HPBar false.

Not accounted kills fixed
The base game has an issue that it does not count a kill if a ship sinks while you have lost contact on it. Because of longer sinking time, and potential lost of contact due to depth charges going off, this mod will make sure that your kill will get counted as long as it sinks not further then 10km away of your position.

Compatibility information for modders
SPO is utilizing harmony and is patching following methods:
EntitySelectionUI.Update
EntitySelectionUI.Open
Hull.Start
Hull.AddDamage
Hull.Update
Observator.Observation_Changed
PeriscopeUI.UpdateParameters


Screenshots from BETA tests:

https://steamcommunity.com/sharedfiles/filedetails/?id=2286952383
https://steamcommunity.com/sharedfiles/filedetails/?id=2286952427
https://steamcommunity.com/sharedfiles/filedetails/?id=2286480531
https://steamcommunity.com/sharedfiles/filedetails/?id=2286952473
https://steamcommunity.com/sharedfiles/filedetails/?id=2291652520

https://steamcommunity.com/sharedfiles/filedetails/?id=2286479993
https://steamcommunity.com/sharedfiles/filedetails/?id=2286480272
https://steamcommunity.com/sharedfiles/filedetails/?id=2286480193
https://steamcommunity.com/sharedfiles/filedetails/?id=2286480246
https://steamcommunity.com/sharedfiles/filedetails/?id=2289845859
Last edited by ждун; Jun 14, 2021 @ 8:27pm
< >
Showing 1-15 of 261 comments
Davinci Nov 14, 2020 @ 12:21pm 
Looks Great, Keep up the Excellent Work!

Any thoughts on keeping some of the sunken ships oil spills burning longer?
ждун Nov 14, 2020 @ 12:33pm 
Originally posted by Davinci:
Any thoughts on keeping some of the sunken ships oil spills burning longer?

will consider this
Frank Machin Nov 14, 2020 @ 7:26pm 
Wow.
ждун Nov 14, 2020 @ 8:43pm 
Looking at original code ive figured out some interestning stuff.

Each freighter has internal compartments. The bigger the ship the more compartments. Empire Explorer has 48, with 12 sections with 4 compartments each.

When damage is applied either with the deckgun or torpedoe, it remembers each hit, with its position on the hull and the hole radius.

Each hit has base damage (from projectile) and some extra damage depending on the hole radius and some random factor.

A certain amount of minimum damage needs to be applied to a compartment before it starts flooding. In original game its about 5 hits with HE ammo to same spot.

When it starts flooding the rate of flooding is depending on different factors. Mainly on the amount of damage applied to that compartment. The flooding rate can be increased applying more damage to it. However this only icreses the flooding rate to this particular compartment. Meaning that it will just fill up faster, but will not necessarily reduce floatability more then to a point when the compartment is filled up to the top.

Considering this, it means there is no any reason to continue shelling at same spot when it already started flooding. More efficient would be to damage more compartments so they also start flooding. The more compartments are flooding the less floatability will remain once they fill up to the top.

The ships have no health points (HP). Instead it all about floatability. They can take a certain amount of water before their floatability is neglected, and then they will sink for certain.

Now let me explain that green bar that looks like HP bar, in fact its floatability bar.

https://steamcommunity.com/sharedfiles/filedetails/?id=2287713419

The ship on figure above has multiple damaged compartements which are now flooding.
They are about half full in avarage.

The bright green color indicates how much floatability the ship will have when the flooding compartements are filled up to the top. It is in this example it indicates about 50%, meaning when the damaged compartements are full, it will have lost about half of its floatability, but will still be well afloat. This will not sink by itself.

The darker green color indicates the flooding level for the damaged compartements. They are now half full (in avarage) as it is now half way down to green bar.

The blue color in the background indicates how much floatability it has lost already.

The ship will highly likely sink, when the bright green bar drops to 0%. This means when all its damaged compartements fill up to the top it will lose the required floatability to stay afloat.

It will start sinking and will be counted as sank, when the dark green bar drops to 0% as this is the moment when the floatability gets neglected and there is no other way then to the sea ground.
Davinci Nov 14, 2020 @ 9:15pm 
@ждун - Question - What Program are you using to view all of this information?

Thanks,
ждун Nov 15, 2020 @ 2:07am 
Originally posted by Davinci:
@ждун - Question - What Program are you using to view all of this information?

Thanks,

Using dotPeek to decompile the game code.

https://www.jetbrains.com/decompiler/
Davinci Nov 15, 2020 @ 7:25am 
Originally posted by ждун:
Originally posted by Davinci:
@ждун - Question - What Program are you using to view all of this information?

Thanks,

Using dotPeek to decompile the game code.

https://www.jetbrains.com/decompiler/
Thanks, Downloading it Now!
Urfisch Nov 16, 2020 @ 12:19pm 
ждун got the clue ;) very nice work!
emilkant Nov 16, 2020 @ 9:17pm 
Incredible work!
Black Dog Nov 17, 2020 @ 1:08am 
Wow, just wow. This is really awesome work.
I think once you release the mod for B128final it will become a staple for my games.

Hope the Devs see it and maybe even include some of it into the base game.

Keep it up!
Zolk Ironblood Nov 17, 2020 @ 2:46am 
how do i download it
ждун Nov 17, 2020 @ 2:52am 
Originally posted by Skritch Ironblood:
how do i download it

Its not yet available, work in progress. I hope to prepare beta next days.
Urfisch Nov 17, 2020 @ 3:55am 
Du F u c h s :)
Last edited by Urfisch; Nov 17, 2020 @ 3:56am
< >
Showing 1-15 of 261 comments
Per page: 1530 50