Jump to content

Rational HydroDynamics 1.1 [Apr 23, 2021]


JadeOfMaar

Recommended Posts

I am using this mod in 1.10.1 with a stupid amount of other mods.
I am using FAR and from what I hear FAR messes with water as well?.

My crafts seem to be very very buoyant I am also using a mod called MOIST https://forum.kerbalspaceprogram.com/index.php?/topic/171383-moist-underwater-technologies/ which in side the folder contains a mod/folder called SinkEmAll https://spacedock.info/mod/1705/SinkEmAll.

which from my understanding is trying to do the same as this?.

 

Are they conflicting and causing me odd issues?.

 

Thanks

Edited by stk2008
Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

ummm, no. Pre-inflation, there is no effect on the part,  Post inflation, it increases the part's buoyancy by 20%

@JadeOfMaarRight now ComfortableLanding simply changes a part's buoyancy to 1.2, when inflated.  I'm wondering if that's not good with this mod, can you explain how it works?  I can easily change it from a simple constant to a multiplier, if that makes sense

How this mod works is it declares the buoyancy key for parts and gives it a unique value depending on certain features (resources held, category, tech required, holds crew, and for some mods, the purpose of the part with respect to this mod). iirc, Buoyancy values > 1 cause krakens (I never playtested to confirm this, though it happens when you Tweakscale a thing that has Firespitter buoyancy) so this mod also tries to prevent instances like ComfortableLanding's "1.2" value.

In the case of simply buffing buoyancy when a part is inflated, I can't easily decide whether addition or multiplication would be better. I can see cases whether either one is more fitting. I'm hoping @Beetlecat can decide. For the standalone parts, them having constant values would be best.

PART
{
	buoyancy = 1 // undeclared key, default value
}

The buoyancy value isn't shown in the elementary stats panel of VAB part info so it's edited into the top of the part desc with the same cyan color so you can always see it.

Side note: you will see different pressure limits up there. That's the effect of Rational Pressure for use of the difficulty setting: Part Pressure Limits.

8U3ofpP.png

1 hour ago, stk2008 said:

I am using this mod in 1.10.1 with a stupid amount of other mods.
I am using FAR and from what I hear FAR messes with water as well?.

My crafts seem to be very very buoyant I am also using a mod called MOIST https://forum.kerbalspaceprogram.com/index.php?/topic/171383-moist-underwater-technologies/ which in side the folder contains a mod/folder called SinkEmAll https://spacedock.info/mod/1705/SinkEmAll.

which from my understanding is trying to do the same as this?.

 

Are they conflicting and causing me odd issues?.

 

Thanks

I'm not sure what FAR does, if any, with water physics, but I know that FAR can't handle water interaction well, cand causes ships that are splashed and partially submerged to infinitely drag and be immovable-- it doesn't know hot to process crafts that are exposed to air and exposed to the depths at the same time.

There should be zero conflict. From my observation, no mod (other than those of Angel-125, which I would use, and maybe Firespitter, which I never use) that affects buoyancy thinks to touch the buoyancy key measured above, and only tries to achieve sink-ability by causing parts to hold super-dense resources, which can quickly lead to krakens of opposing forces (weight by sheer density + gravity vs buoyancy) when your craft has a lot of surface area and 100% buoyancy. In fact, Rational HydroDynamics is explicitly supposed to help you with your use of SinkEmAll.

SinkEmAll and MOIST don't seem to contain any plugins and they involve a super-dense resource, so there shoul be zero conflict.

Edited by JadeOfMaar
Link to comment
Share on other sites

Thanks for replying.

I shall have a play with it more.
Yeah FAR seems to be killing movement underwater which is a shame.

If i add a wing lets say to the sub it is like the craft is frozen in the water.

I would mention it on the FAR thread but I think it has been mentioned before so the fact its still the same I assume its not an easy fix.

 

Any way thank you.

Link to comment
Share on other sites

36 minutes ago, JadeOfMaar said:

How this mod works is it declares the buoyancy key for parts and gives it a unique value depending on certain features (resources held, category, tech required, holds crew, and for some mods, the purpose of the part with respect to this mod). iirc, Buoyancy values > 1 cause krakens (I never playtested to confirm this, though it happens when you Tweakscale a thing that has Firespitter buoyancy) so this mod also tries to prevent instances like ComfortableLanding's "1.2" value.

In my testing, I've pushed the buoyancy value up to 2 without any side affects, other than the pod being very bouncy on the water

I noticed the following problem:

  • The mk1-3 pod and the Mk2 cockpit both seemed to have a buoyancy of 1.0 (in 1.10.1), seemed rather high when a tank has 0.8

Logs and MM configcache:

https://www.dropbox.com/s/o8bjoo1omkms80x/RationalHydroDynamicsPodIssue.zip?dl=0

Link to comment
Share on other sites

On 4/21/2021 at 12:50 PM, linuxgurugamer said:

@JadeOfMaar Will this work in 1.10.1?  I'm working on ComfortableLanding, it was suggested to check this out

So after the inflation, does it work?  And which version of KSP were you using, also, were you using my beta?

 

On 4/21/2021 at 2:25 PM, linuxgurugamer said:

Looking at the code, it looks like the bouyancy is changed upon start of inflation

It's possible the buoyancy value may need to be changed

It was the old version before you took it over.

Link to comment
Share on other sites

@JadeOfMaar

I did a bit of investigation, and found the following:

I looked at the mk1-3 pod only, but I suspect the results would be similar with the others,  The following are the patches which are applied to it, along with what the change is:

[LOG 23:15:07.956] Applying update RationalHydroDynamics/RationalBuoyancy/@PART:HAS[#category[Pods],#CrewCapacity[>0],~rationalBuoyancy]:FOR[00RationalBuoyancy] to Squad/Parts/Command/Mk1-3Pod/mk1-3.cfg/PART[mk1-3pod]
	%buoyancy = 0.4

[LOG 23:15:08.217] Applying update RationalHydroDynamics/RationalBuoyancy/@PART:HAS[#CrewCapacity[>0],#rationalBuoyancy]:FOR[00RationalBuoyancy] to Squad/Parts/Command/Mk1-3Pod/mk1-3.cfg/PART[mk1-3pod]
	@buoyancy += 0.35

[LOG 23:15:08.238] Applying update RationalHydroDynamics/RationalBuoyancy/@PART:HAS[@MODULE[ModuleLiftingSurface],#rationalBuoyancy]:FOR[00RationalBuoyancy] to Squad/Parts/Command/Mk1-3Pod/mk1-3.cfg/PART[mk1-3pod]
	@buoyancy += 0.3

[LOG 23:15:08.299] Applying update RationalHydroDynamics/RationalPressure/@PART:HAS[#CrewCapacity[>0],#category[Pods],#mass[>1.199],#mass[<5],~maxPressure]:FOR[00RationalPressure] to Squad/Parts/Command/Mk1-3Pod/mk1-3.cfg/PART[mk1-3pod]
	%maxPressure = 3000

[LOG 23:15:08.493] Applying update RationalHydroDynamics/RationalBuoyancy/@PART:HAS[#rationalBuoyancy]:FOR[zRationalBuoyancy] to Squad/Parts/Command/Mk1-3Pod/mk1-3.cfg/PART[mk1-3pod]
	@buoyancy *= #$@RHDScalar/BuoyancyMult$

[LOG 23:15:08.548] Applying update RationalHydroDynamics/RationalBuoyancy/@PART:HAS[#buoyancy[>1],#rationalBuoyancy]:FOR[zRationalBuoyancy] to Squad/Parts/Command/Mk1-3Pod/mk1-3.cfg/PART[mk1-3pod]
	@buoyancy = 1 // Krakens if > 1

[LOG 23:15:08.571] Applying update RationalHydroDynamics/RationalBuoyancy/@PART:HAS[#rationalBuoyancy]:FOR[zRationalBuoyancy] to Squad/Parts/Command/Mk1-3Pod/mk1-3.cfg/PART[mk1-3pod]
	@description = #<#acfffc><b>Buoyancy</b>: $buoyancy$</color><br>$description$

[LOG 23:15:08.667] Applying update RationalHydroDynamics/RationalPressure/@PART:HAS[#maxPressure]:FOR[zRationalPressure] to Squad/Parts/Command/Mk1-3Pod/mk1-3.cfg/PART[mk1-3pod]
	%maxPressure = 7000

 

So ignoring that calculation, you get:

0.4 + 0.35 + 0.3 = 1.05

and then the multiplication by #$@RHDScalar/BuoyancyMult$

Off hand, I'd suggest excluding the addition caused by the moduleLiftingService if crew > 0

I got these lines from the file Logs/ModuleManager/MMPatch.log

My fix is this:

@PART:HAS[#CrewCapacity[=0],@MODULE[ModuleLiftingSurface],#rationalBuoyancy]:FOR[00RationalBuoyancy]

and then the buoyancy for them is 0.75.

regarding the missing moduleliftingsurface, I'm sure it's a bug, you may want to open a bug report for it.  Easy fix is to add it.

Link to comment
Share on other sites

Release 1.1

DOWNLOAD :: SpaceDock :: GitHub

  • Added special handling for engines that use elevon module for tilt.
  • Added special handling for OPT plane parts.
  • Adjusted handling of crewed parts with lift surface.
  • Adjusted targetting for heatshields.
  • Fixed and expanded tech node targeting for very late to super late engines.
  • Fixed command pods with lift surface getting too much buoyancy.
Link to comment
Share on other sites

On 4/22/2021 at 1:36 PM, JadeOfMaar said:

 iirc, Buoyancy values > 1 cause krakens (I never playtested to confirm this, though it happens when you Tweakscale a thing that has Firespitter buoyancy) 

Unlikely. FSBuoyancy implements it's own buoyancy logic and removes the part.partBuoyancy thingy, and so TweakScale can't scale it as it is not found at runtime (but it still can happen on Editor time - something to investigate about).

    public void FixedUpdate()
    {
        if (!HighLogic.LoadedSceneIsFlight)
            return;
        if (vessel.mainBody.ocean && part.GetComponent<Rigidbody>() != null)
        {
            if (part.partBuoyancy != null)
            {
                Destroy(part.partBuoyancy);  // <-------- HERE!!!! ---------
            }

Source.

But since your Add'On is a set of configs, of course RationalHydroDynamics is only the screaming victim of something else's bork.

In time, anyone using TweakScale and Firespitter should install TweakScale Companion for Firespitter - as Buoyancy is only handled with it now.

Cheers!

Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...

Was anyone else expecting this mod to also help with it being basically impossible to make large boats move thru the water at anything approaching a realistic speed? Even with 4 Goliath turbine engines at max throttle, moving even a small boat thru the water (without this mod installed) seems to have a maximum speed of say 5-7 meters per second. That seems totally out of line with the amount of thrust I am applying to the vessel, by that logic to move a small boat (like a pleasure craft for instance) at high speeds across the water I'd need not merely "a few hundred horsepower" as it is in real life but instead "several ten-thousand horsepower".

I mean, it seems that having a name like "Rational Hydrodynamics" would imply some form of addressing of the issue of HORIZONTAL hydrodynamic drag being totally unrealistic in KSP, right?

Am I missing something or is this not addressed by this mod? If it is, I'll probably consider installing it.

Link to comment
Share on other sites

@SciMan KSP doesn’t model underwater thrust very well and using jet engines above the water to move a ship isn’t particularly efficient (also BG robotic propellers don’t work underwater at all as far as I’m aware). This mod is mostly focussed on buoyancy (how “floaty” parts are) so I don’t expect it to make much difference in terms of propelling ships as you’ve mentioned, however there might be some boat/ship/submarine based mods which have more effective aquatic propulsion options than slapping some big jet engines on the back and hoping for the best.

Link to comment
Share on other sites

Well like I said, those mods that include better aquatic propulsion options generally are of the form of "really high thrust and absurdly high specific impulse jet engines", which doesn't really address the problem.

The problem is that the drag is way too dang high, not that the thrust is way too dang low. Adding these extremely high performance propulsion methods just makes it all the easier to make your ship (unrealistically) bend in half or have a Kraken attack from the thrust forces being so high.

I've been putting my Goliath engines under the water line, because that's where the propellers on a boat (and therefore the center of thrust) goes on most boats.

Even the idea of making a "planing" boat like a hydrofoil or speedboat doesn't work, because that just results in your boat flipping over nose-down into the water upside down.

What I'm trying to say is that I want boats in KSP to act like Boats, not like "boat shaped objects".

Link to comment
Share on other sites

  • 2 years later...

Seems this mod might not be playing well with other mods' parts in general, save for a select few. Here's an example of what I had found in my latest KSP log (after it had crashed while loading):

[LOG 06:05:22.007] PartLoader: Compiling Part 'NearFutureElectrical/Parts/FissionReactors/reactor-0625/reactor-0625'
[WRN 06:05:22.044] PartLoader Warning: Variable rationalBuoyancy not found in Part
[WRN 06:05:22.046] PartLoader Warning: Variable rationalPressure not found in Part
[WRN 06:05:22.050] PartLoader Warning: Variable lpgLF not found in Part
[WRN 06:05:22.053] PartLoader Warning: Variable lpg not found in Part
[WRN 06:05:22.057] PartLoader Warning: Variable SSS_Tier not found in Part
[EXC 06:05:22.206] NullReferenceException: Object reference not set to an instance of an object
	FlightGlobals.get_VesselsLoaded () (at <4b449f2841f84227adfaad3149c8fdba>:0)
	ModuleDockingNode.FindNodeApproaches () (at <4b449f2841f84227adfaad3149c8fdba>:0)
	(wrapper dynamic-method) ModuleDockingNode.ModuleDockingNode.<SetupFSM>b__142_1_Patch0(ModuleDockingNode)
	KerbalFSM.FixedUpdateFSM () (at <4b449f2841f84227adfaad3149c8fdba>:0)
	ModuleDockingNode.FixedUpdate () (at <4b449f2841f84227adfaad3149c8fdba>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

That was just one example of countless mods being affected.

Methinks default settings should be given to miscellaneous parts as a failsafe?

Link to comment
Share on other sites

@Shadow Wolf TJC As far as "PartLoader Warning: Variable <whatever> not found in Part" is concerned, that's usually quite harmless. If, by chance, you have parts that use the Firespitter buoyancy module (namely the Firespitter parts pack, specifically) remove them and start KSP again. As for the exception you've shown me, another mod which affects docking ports and/or maneuvers is what's crashing your game and you'll need to troubleshoot and pick apart your install. I'm not going to mod my game as far as you did to investigate. That's not how the help desk works, sorry.

There is a catch-all built-in. I found the need for this on my own while making this mod.

Link to comment
Share on other sites

5 hours ago, JadeOfMaar said:

@Shadow Wolf TJC As far as "PartLoader Warning: Variable <whatever> not found in Part" is concerned, that's usually quite harmless. If, by chance, you have parts that use the Firespitter buoyancy module (namely the Firespitter parts pack, specifically) remove them and start KSP again.

Actually, I did have the following mods installed via CKAN:

  • Firespitter
  • Firespitter Core
  • Firespitter Resources config

However, I didn't see on CKAN that Rational Hydrodynamics would conflict with any of those Firespitter mods. Therefore, I didn't expect them to conflict.

5 hours ago, JadeOfMaar said:

As for the exception you've shown me, another mod which affects docking ports and/or maneuvers is what's crashing your game and you'll need to troubleshoot and pick apart your install. I'm not going to mod my game as far as you did to investigate. That's not how the help desk works, sorry.

Maybe, though I've got dozens of mods installed, if not over 100, so it'll take quite some time to find those problematic mods.

5 hours ago, JadeOfMaar said:

There is a catch-all built-in. I found the need for this on my own while making this mod.

Sorry. I didn't notice while looking through your mod's files. (It probably doesn't help that, while I may not be new to modding in general, I'm quite new to KSP modding specifically.):(

Link to comment
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...